aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp8
-rw-r--r--desktop-widgets/tab-widgets/maintab.h9
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;