diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-03-06 15:55:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-12 09:16:42 +0100 |
commit | eccef8c9366d7ad8e1a88a84dd37abb108d9544b (patch) | |
tree | 908ebfc7e5c5ba022eb90ff6045efbca67ada5b5 /tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp | |
parent | cd035286c59f550ecc772eee7126679f9c065bb3 (diff) |
Fix warnings about overloaded virtuals in tests (CLANG).
Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp')
-rw-r--r-- | tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index d914142e13..ea1f846258 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -89,7 +89,8 @@ struct PublicView : public QTreeView MovePrevious = QAbstractItemView::MovePrevious }; - inline QModelIndex moveCursor(PublicCursorAction ca, Qt::KeyboardModifiers kbm) + // enum PublicCursorAction and moveCursor() are protected in QTreeView. + inline QModelIndex doMoveCursor(PublicCursorAction ca, Qt::KeyboardModifiers kbm) { return QTreeView::moveCursor((CursorAction)ca, kbm); } inline void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) @@ -1802,7 +1803,7 @@ void tst_QTreeView::moveCursor() QCOMPARE(view.currentIndex(), expected); //then pressing down should go to the next line - QModelIndex actual = view.moveCursor(PublicView::MoveDown, Qt::NoModifier); + QModelIndex actual = view.doMoveCursor(PublicView::MoveDown, Qt::NoModifier); expected = model.index(2, 1, QModelIndex()); QCOMPARE(actual, expected); @@ -1811,7 +1812,7 @@ void tst_QTreeView::moveCursor() // PageUp was broken with uniform row heights turned on view.setCurrentIndex(model.index(1, 0)); - actual = view.moveCursor(PublicView::MovePageUp, Qt::NoModifier); + actual = view.doMoveCursor(PublicView::MovePageUp, Qt::NoModifier); expected = model.index(0, 0, QModelIndex()); QCOMPARE(actual, expected); @@ -2855,7 +2856,7 @@ void tst_QTreeView::evilModel() view.setSelection(rect, QItemSelectionModel::Select); model.change(); - view.moveCursor(PublicView::MoveDown, Qt::NoModifier); + view.doMoveCursor(PublicView::MoveDown, Qt::NoModifier); model.change(); view.resizeColumnToContents(1); |