diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-13 18:14:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-15 10:30:04 +1200 |
commit | 822b88ab3d77499f90f2cbd5dadd4252a5e4a537 (patch) | |
tree | 986b6465811af23e0c4a9fc60cb2752f744d96de /desktop-widgets/tab-widgets | |
parent | fe61f6b69e03d4700e28724e6977e9b365541724 (diff) | |
download | subsurface-822b88ab3d77499f90f2cbd5dadd4252a5e4a537.tar.gz |
Cleanup: remove completers from MainTab object
This struct is used to store the completers during construction
of the object. But it is never accessed afterwards. Therefore,
remove it from the object and remove the structure definition
from the header file.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 8 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index c07e24fd9..0e0398733 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -41,6 +41,13 @@ #include <QDesktopServices> #include <QStringList> +struct Completers { + QCompleter *divemaster; + QCompleter *buddy; + QCompleter *suit; + QCompleter *tags; +}; + MainTab::MainTab(QWidget *parent) : QTabWidget(parent), editMode(NONE), lastSelectedDive(true), @@ -105,6 +112,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.DiveType->insertItems(0, types); connect(ui.DiveType, SIGNAL(currentIndexChanged(int)), this, SLOT(divetype_Changed(int))); + Completers completers; completers.buddy = new QCompleter(&buddyModel, ui.buddy); completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster); completers.suit = new QCompleter(&suitModel, ui.suit); diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index 06ebe02f0..c65d7fe32 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -21,14 +21,6 @@ class ExtraDataModel; class DivePictureModel; -class QCompleter; - -struct Completers { - QCompleter *divemaster; - QCompleter *buddy; - QCompleter *suit; - QCompleter *tags; -}; class TabBase; class MainTab : public QTabWidget { @@ -96,7 +88,6 @@ private: DiveMasterCompletionModel diveMasterModel; SuitCompletionModel suitModel; TagCompletionModel tagModel; - Completers completers; bool modified; bool lastSelectedDive; int lastTabSelectedDive; |