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:
Boris Barbulovski 2014-02-11 18:46:14 +01:00 committed by Dirk Hohndel
parent af8c44fa22
commit 507a929a27
4 changed files with 17 additions and 30 deletions

View file

@ -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() \
{ \