diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e2f0ee..9c74b40e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/cockatrice/src/carddatabasemodel.cpp b/cockatrice/src/carddatabasemodel.cpp index 65b08d49..a77bbd12 100644 --- a/cockatrice/src/carddatabasemodel.cpp +++ b/cockatrice/src/carddatabasemodel.cpp @@ -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) diff --git a/cockatrice/src/decklistmodel.cpp b/cockatrice/src/decklistmodel.cpp index 8a1065f0..de18a9c5 100644 --- a/cockatrice/src/decklistmodel.cpp +++ b/cockatrice/src/decklistmodel.cpp @@ -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 diff --git a/cockatrice/src/remotedecklist_treewidget.cpp b/cockatrice/src/remotedecklist_treewidget.cpp index 809f3fe8..cb96ef7f 100644 --- a/cockatrice/src/remotedecklist_treewidget.cpp +++ b/cockatrice/src/remotedecklist_treewidget.cpp @@ -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);