Changeset 14502


Ignore:
Timestamp:
Apr 20, 2015, 9:28:26 AM (6 years ago)
Author:
mikedld
Message:

Ifdef the code which does manual relayout on compact view toggle to Qt < 5.4 (QTBUG-33537)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r14499 r14502  
    10491049
    10501050      case Prefs::COMPACT_VIEW: {
     1051#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) // QTBUG-33537
    10511052            QItemSelectionModel * selectionModel (ui.listView->selectionModel ());
    10521053            const QItemSelection selection (selectionModel->selection ());
    10531054            const QModelIndex currentIndex (selectionModel->currentIndex ());
     1055#endif
    10541056            b = myPrefs.getBool (key);
    10551057            ui.action_CompactView->setChecked (b);
    10561058            ui.listView->setItemDelegate (b ? myTorrentDelegateMin : myTorrentDelegate);
     1059#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) // QTBUG-33537
    10571060            selectionModel->clear ();
    10581061            ui.listView->reset (); // force the rows to resize
    10591062            selectionModel->select (selection, QItemSelectionModel::Select);
    10601063            selectionModel->setCurrentIndex (currentIndex, QItemSelectionModel::NoUpdate);
     1064#endif
    10611065            break;
    10621066        }
Note: See TracChangeset for help on using the changeset viewer.