mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
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>
This commit is contained in:
parent
fe61f6b69e
commit
822b88ab3d
2 changed files with 8 additions and 9 deletions
|
@ -41,6 +41,13 @@
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
struct Completers {
|
||||||
|
QCompleter *divemaster;
|
||||||
|
QCompleter *buddy;
|
||||||
|
QCompleter *suit;
|
||||||
|
QCompleter *tags;
|
||||||
|
};
|
||||||
|
|
||||||
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||||
editMode(NONE),
|
editMode(NONE),
|
||||||
lastSelectedDive(true),
|
lastSelectedDive(true),
|
||||||
|
@ -105,6 +112,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||||
ui.DiveType->insertItems(0, types);
|
ui.DiveType->insertItems(0, types);
|
||||||
connect(ui.DiveType, SIGNAL(currentIndexChanged(int)), this, SLOT(divetype_Changed(int)));
|
connect(ui.DiveType, SIGNAL(currentIndexChanged(int)), this, SLOT(divetype_Changed(int)));
|
||||||
|
|
||||||
|
Completers completers;
|
||||||
completers.buddy = new QCompleter(&buddyModel, ui.buddy);
|
completers.buddy = new QCompleter(&buddyModel, ui.buddy);
|
||||||
completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster);
|
completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster);
|
||||||
completers.suit = new QCompleter(&suitModel, ui.suit);
|
completers.suit = new QCompleter(&suitModel, ui.suit);
|
||||||
|
|
|
@ -21,14 +21,6 @@
|
||||||
|
|
||||||
class ExtraDataModel;
|
class ExtraDataModel;
|
||||||
class DivePictureModel;
|
class DivePictureModel;
|
||||||
class QCompleter;
|
|
||||||
|
|
||||||
struct Completers {
|
|
||||||
QCompleter *divemaster;
|
|
||||||
QCompleter *buddy;
|
|
||||||
QCompleter *suit;
|
|
||||||
QCompleter *tags;
|
|
||||||
};
|
|
||||||
|
|
||||||
class TabBase;
|
class TabBase;
|
||||||
class MainTab : public QTabWidget {
|
class MainTab : public QTabWidget {
|
||||||
|
@ -96,7 +88,6 @@ private:
|
||||||
DiveMasterCompletionModel diveMasterModel;
|
DiveMasterCompletionModel diveMasterModel;
|
||||||
SuitCompletionModel suitModel;
|
SuitCompletionModel suitModel;
|
||||||
TagCompletionModel tagModel;
|
TagCompletionModel tagModel;
|
||||||
Completers completers;
|
|
||||||
bool modified;
|
bool modified;
|
||||||
bool lastSelectedDive;
|
bool lastSelectedDive;
|
||||||
int lastTabSelectedDive;
|
int lastTabSelectedDive;
|
||||||
|
|
Loading…
Add table
Reference in a new issue