mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-04-26 06:28:24 -05:00
Fix a few warnings
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
#include <QApplication>
|
||||
|
||||
DbStructureModel::DbStructureModel(QObject* parent)
|
||||
: QAbstractItemModel(parent)
|
||||
: QAbstractItemModel(parent),
|
||||
m_db(0)
|
||||
{
|
||||
// Create root item and use its columns to store the header strings
|
||||
QStringList header;
|
||||
|
||||
@@ -82,7 +82,7 @@ void rollback(
|
||||
class CSVImportProgress : public CSVProgress
|
||||
{
|
||||
public:
|
||||
CSVImportProgress(size_t filesize)
|
||||
explicit CSVImportProgress(size_t filesize)
|
||||
{
|
||||
m_pProgressDlg = new QProgressDialog(
|
||||
QObject::tr("Decoding CSV file..."),
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
explicit MainWindow(QWidget* parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
DBBrowserDB* getDb() { return &db; }
|
||||
|
||||
@@ -8,6 +8,7 @@ CSVParser::CSVParser(bool trimfields, const QChar& fieldseparator, const QChar&
|
||||
, m_cFieldSeparator(fieldseparator)
|
||||
, m_cQuoteChar(quotechar)
|
||||
, m_pCSVProgress(0)
|
||||
, m_nColumns(0)
|
||||
, m_nBufferSize(4096)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1015,20 +1015,6 @@ bool DBBrowserDB::renameTable(const QString& from_table, const QString& to_table
|
||||
}
|
||||
}
|
||||
|
||||
QStringList DBBrowserDB::getBrowsableObjectNames() const
|
||||
{
|
||||
objectMap::ConstIterator it;
|
||||
QStringList res;
|
||||
|
||||
for(it=objMap.begin();it!=objMap.end();++it)
|
||||
{
|
||||
if(it.key() == "table" || it.key() == "view")
|
||||
res.append(it.value().getname());
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
objectMap DBBrowserDB::getBrowsableObjects() const
|
||||
{
|
||||
objectMap::ConstIterator it;
|
||||
|
||||
+1
-2
@@ -43,7 +43,7 @@ class DBBrowserDB : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DBBrowserDB () : _db( 0 ) {}
|
||||
explicit DBBrowserDB () : _db(0), isEncrypted(false) {}
|
||||
virtual ~DBBrowserDB (){}
|
||||
bool open ( const QString & db);
|
||||
bool attach(const QString& filename, QString attach_as = "");
|
||||
@@ -102,7 +102,6 @@ public:
|
||||
*/
|
||||
bool renameColumn(const QString& tablename, const QString& name, sqlb::FieldPtr to, int move = 0);
|
||||
|
||||
QStringList getBrowsableObjectNames() const;
|
||||
objectMap getBrowsableObjects() const;
|
||||
DBBrowserObject getObjectByName(const QString& name) const;
|
||||
bool isOpen() const;
|
||||
|
||||
@@ -510,7 +510,7 @@ QStringList SqliteTableModel::getColumns(const QString& sQuery, QVector<int>& fi
|
||||
QStringList listColumns;
|
||||
if(SQLITE_OK == status)
|
||||
{
|
||||
status = sqlite3_step(stmt);
|
||||
sqlite3_step(stmt);
|
||||
int columns = sqlite3_data_count(stmt);
|
||||
for(int i = 0; i < columns; ++i)
|
||||
{
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ typedef QVector< FieldPtr > FieldVector;
|
||||
class Table
|
||||
{
|
||||
public:
|
||||
Table(const QString& name): m_name(name), m_rowidColumn("_rowid_") {}
|
||||
explicit Table(const QString& name): m_name(name), m_rowidColumn("_rowid_") {}
|
||||
virtual ~Table();
|
||||
|
||||
void setName(const QString& name) { m_name = name; }
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
class CreateTableWalker
|
||||
{
|
||||
public:
|
||||
CreateTableWalker(antlr::RefAST r)
|
||||
explicit CreateTableWalker(antlr::RefAST r)
|
||||
: m_root(r)
|
||||
, m_bModifySupported(true)
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user