Fix crash when sorting one table in the Browse Tab and changing to another

Fix a crash when sorting the n-th column of a table in the Browse Tab
and then changing to a table with less than n columns.
This commit is contained in:
Martin Kleusberg
2014-07-03 22:40:03 +02:00
parent e1ea78fdda
commit 88a4caedba
2 changed files with 13 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ class SqliteTableModel : public QAbstractTableModel
Q_OBJECT
public:
explicit SqliteTableModel(QObject *parent = 0, DBBrowserDB* db = 0, size_t chunkSize = 50000);
void reset();
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int totalRowCount() const;