diff options
| author | Arno <arno@disconnect.de> | 2017-12-31 21:53:06 +0100 | 
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2017-12-31 21:53:06 +0100 | 
| commit | 640ffd5ce718b97148ad0260a7ac5d356a095b7a (patch) | |
| tree | a4c0f726b0ffdf72fc71ee8aac079964383b71c8 /dbanalyzer.h | |
| parent | 98819e4ce68fef0f02eddb6728a1eb9fa322fade (diff) | |
| download | SheMov-640ffd5ce718b97148ad0260a7ac5d356a095b7a.tar.gz SheMov-640ffd5ce718b97148ad0260a7ac5d356a095b7a.tar.bz2 SheMov-640ffd5ce718b97148ad0260a7ac5d356a095b7a.zip  | |
Give DbAnalyzer some love
* use type-safe connect syntax
* remove unnecessary includes
* remove Q_FOREACH
* inline selectionModel()
Diffstat (limited to 'dbanalyzer.h')
| -rw-r--r-- | dbanalyzer.h | 10 | 
1 files changed, 2 insertions, 8 deletions
diff --git a/dbanalyzer.h b/dbanalyzer.h index 9fc2ef2..a7a9887 100644 --- a/dbanalyzer.h +++ b/dbanalyzer.h @@ -10,14 +10,10 @@  #include <QDialog>  #include <QSqlDatabase> -#include <QModelIndex> -class SmTreeView; -class QLabel; -class QStackedLayout; +#include "smtreeview.h"  class QStandardItemModel; -class QItemSelectionModel;  class DbEmptyDialog : public QDialog {      Q_OBJECT @@ -25,7 +21,7 @@ class DbEmptyDialog : public QDialog {          DbEmptyDialog(const QString &caption, QWidget *parent = 0, Qt::WindowFlags f = 0);          QStandardItemModel *model() { return mModel; }          QSqlDatabase db() { return mDb; } -        QItemSelectionModel *selectionModel(); +        QItemSelectionModel *selectionModel() { return mView->selectionModel(); }      public slots:          virtual void populate(); @@ -33,8 +29,6 @@ class DbEmptyDialog : public QDialog {      private:          SmTreeView *mView; -        QPushButton *mClose; -        QPushButton *mDelete;          QStandardItemModel *mModel;          QSqlDatabase mDb;  };  | 
