Require Qt4 >=4.8.0; remove some ifdefs on qt version

This commit is contained in:
Fabio Bas 2014-06-25 16:00:48 +02:00
parent c4458b16b2
commit 2354ed6909
4 changed files with 1 additions and 19 deletions

View file

@ -76,7 +76,7 @@ FIND_PACKAGE(Qt5Widgets)
IF(Qt5Widgets_FOUND)
MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}")
ELSE()
FIND_PACKAGE(Qt4 REQUIRED)
FIND_PACKAGE(Qt4 4.8.0 REQUIRED)
IF(Qt4_FOUND)
MESSAGE(STATUS "Found Qt ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
ELSE()

View file

@ -68,9 +68,7 @@ QVariant CardDatabaseModel::headerData(int section, Qt::Orientation orientation,
void CardDatabaseModel::updateCardList()
{
#if QT_VERSION >= 0x050000
beginResetModel();
#endif
for (int i = 0; i < cardList.size(); ++i)
disconnect(cardList[i], 0, this, 0);
@ -79,11 +77,7 @@ void CardDatabaseModel::updateCardList()
for (int i = 0; i < cardList.size(); ++i)
connect(cardList[i], SIGNAL(cardInfoChanged(CardInfo *)), this, SLOT(cardInfoChanged(CardInfo *)));
#if QT_VERSION < 0x050000
reset();
#else
endResetModel();
#endif
}
void CardDatabaseModel::cardInfoChanged(CardInfo *card)

View file

@ -30,9 +30,7 @@ DeckListModel::~DeckListModel()
void DeckListModel::rebuildTree()
{
#if QT_VERSION >= 0x050000
beginResetModel();
#endif
root->clearTree();
InnerDecklistNode *listRoot = deckList->getRoot();
@ -59,11 +57,7 @@ void DeckListModel::rebuildTree()
}
}
#if QT_VERSION < 0x050000
reset();
#else
endResetModel();
#endif
}
int DeckListModel::rowCount(const QModelIndex &parent) const

View file

@ -258,17 +258,11 @@ void RemoteDeckList_TreeModel::deckListFinished(const Response &r)
{
const Response_DeckList &resp = r.GetExtension(Response_DeckList::ext);
#if QT_VERSION >= 0x050000
beginResetModel();
#endif
root->clearTree();
#if QT_VERSION < 0x050000
reset();
#else
endResetModel();
#endif
ServerInfo_DeckStorage_TreeItem tempRoot;
tempRoot.set_id(0);