From 822b88ab3d77499f90f2cbd5dadd4252a5e4a537 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 13 Apr 2019 18:14:50 +0200 Subject: 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 --- desktop-widgets/tab-widgets/maintab.cpp | 8 ++++++++ desktop-widgets/tab-widgets/maintab.h | 9 --------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'desktop-widgets/tab-widgets') 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 #include +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; -- cgit v1.2.3-70-g09d2