diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-20 14:26:05 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-20 22:27:46 +0000 |
commit | ce73b4db62574fc966192e6a4f65b7e2b2280e38 (patch) | |
tree | d73af1000b0114f031ac4aee9f42fa44e740434f /src/widgets/itemviews/qtreeview.cpp | |
parent | 4dab6184f5f885bac21eef9e17a87219e64ba7dc (diff) |
Remove dead code from Qt 4 times
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.
Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtreeview.cpp')
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 53e546bb4d..823be1ca08 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -2173,35 +2173,6 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie return QModelIndex(); } int vi = -1; -#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && QT_CONFIG(style_mac) - // Selection behavior is slightly different on the Mac. - if (d->selectionMode == QAbstractItemView::ExtendedSelection - && d->selectionModel - && d->selectionModel->hasSelection()) { - - const bool moveUpDown = (cursorAction == MoveUp || cursorAction == MoveDown); - const bool moveNextPrev = (cursorAction == MoveNext || cursorAction == MovePrevious); - const bool contiguousSelection = moveUpDown && (modifiers & Qt::ShiftModifier); - - // Use the outermost index in the selection as the current index - if (!contiguousSelection && (moveUpDown || moveNextPrev)) { - - // Find outermost index. - const bool useTopIndex = (cursorAction == MoveUp || cursorAction == MovePrevious); - int index = useTopIndex ? INT_MAX : INT_MIN; - const QItemSelection selection = d->selectionModel->selection(); - for (int i = 0; i < selection.count(); ++i) { - const QItemSelectionRange &range = selection.at(i); - int candidate = d->viewIndex(useTopIndex ? range.topLeft() : range.bottomRight()); - if (candidate >= 0) - index = useTopIndex ? qMin(index, candidate) : qMax(index, candidate); - } - - if (index >= 0 && index < INT_MAX) - vi = index; - } - } -#endif if (vi < 0) vi = qMax(0, d->viewIndex(current)); |