mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Migrate MainTab models(QStringListModel)
Migrate MainTab models from static xxxCompletioModel::instance() to private MainTab variable members. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
af8c44fa22
commit
507a929a27
4 changed files with 17 additions and 30 deletions
|
@ -2,21 +2,6 @@
|
|||
#include "dive.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#define CREATE_SINGLETON(X) \
|
||||
X* X::instance() \
|
||||
{ \
|
||||
static QScopedPointer<X> self(new X()); \
|
||||
return self.data(); \
|
||||
}
|
||||
|
||||
CREATE_SINGLETON(BuddyCompletionModel);
|
||||
CREATE_SINGLETON(DiveMasterCompletionModel);
|
||||
CREATE_SINGLETON(LocationCompletionModel);
|
||||
CREATE_SINGLETON(SuitCompletionModel);
|
||||
CREATE_SINGLETON(TagCompletionModel);
|
||||
|
||||
#undef CREATE_SINGLETON
|
||||
|
||||
#define CREATE_UPDATE_METHOD(Class, diveStructMember) \
|
||||
void Class::updateModel() \
|
||||
{ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue