Fix a few warnings · DelphiGit/sqlitebrowser@743bdf9 · GitHub
Skip to content

Commit 743bdf9

Browse files
committed
Fix a few warnings
1 parent 90f651d commit 743bdf9

8 files changed

Lines changed: 9 additions & 22 deletions

File tree

‎src/DbStructureModel.cpp‎

Lines changed: 2 additions & 1 deletion

‎src/ImportCsvDialog.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void rollback(
8282
class CSVImportProgress : public CSVProgress
8383
{
8484
public:
85-
CSVImportProgress(size_t filesize)
85+
explicit CSVImportProgress(size_t filesize)
8686
{
8787
m_pProgressDlg = new QProgressDialog(
8888
QObject::tr("Decoding CSV file..."),

‎src/MainWindow.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MainWindow : public QMainWindow
2727
Q_OBJECT
2828

2929
public:
30-
MainWindow(QWidget* parent = 0);
30+
explicit MainWindow(QWidget* parent = 0);
3131
~MainWindow();
3232

3333
DBBrowserDB* getDb() { return &db; }

‎src/csvparser.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CSVParser::CSVParser(bool trimfields, const QChar& fieldseparator, const QChar&
88
, m_cFieldSeparator(fieldseparator)
99
, m_cQuoteChar(quotechar)
1010
, m_pCSVProgress(0)
11+
, m_nColumns(0)
1112
, m_nBufferSize(4096)
1213
{
1314
}

‎src/sqlitedb.cpp‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,20 +1015,6 @@ bool DBBrowserDB::renameTable(const QString& from_table, const QString& to_table
10151015
}
10161016
}
10171017

1018-
QStringList DBBrowserDB::getBrowsableObjectNames() const
1019-
{
1020-
objectMap::ConstIterator it;
1021-
QStringList res;
1022-
1023-
for(it=objMap.begin();it!=objMap.end();++it)
1024-
{
1025-
if(it.key() == "table" || it.key() == "view")
1026-
res.append(it.value().getname());
1027-
}
1028-
1029-
return res;
1030-
}
1031-
10321018
objectMap DBBrowserDB::getBrowsableObjects() const
10331019
{
10341020
objectMap::ConstIterator it;

‎src/sqlitedb.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DBBrowserDB : public QObject
4343
Q_OBJECT
4444

4545
public:
46-
explicit DBBrowserDB () : _db( 0 ) {}
46+
explicit DBBrowserDB () : _db(0), isEncrypted(false) {}
4747
virtual ~DBBrowserDB (){}
4848
bool open ( const QString & db);
4949
bool attach(const QString& filename, QString attach_as = "");
@@ -102,7 +102,6 @@ class DBBrowserDB : public QObject
102102
*/
103103
bool renameColumn(const QString& tablename, const QString& name, sqlb::FieldPtr to, int move = 0);
104104

105-
QStringList getBrowsableObjectNames() const;
106105
objectMap getBrowsableObjects() const;
107106
DBBrowserObject getObjectByName(const QString& name) const;
108107
bool isOpen() const;

‎src/sqlitetablemodel.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ QStringList SqliteTableModel::getColumns(const QString& sQuery, QVector<int>& fi
510510
QStringList listColumns;
511511
if(SQLITE_OK == status)
512512
{
513-
status = sqlite3_step(stmt);
513+
sqlite3_step(stmt);
514514
int columns = sqlite3_data_count(stmt);
515515
for(int i = 0; i < columns; ++i)
516516
{

‎src/sqlitetypes.h‎

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)