diff options
author | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2020-06-27 14:18:09 +0200 |
---|---|---|
committer | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2020-07-07 11:51:48 +0200 |
commit | 6ce2f3f26bf08b4c6952f492a3731eb4fe5a42bc (patch) | |
tree | 727427eb4c603e74954d4da462484ea7bf5c65bb /tests/auto/widgets | |
parent | d9cc1499954829faf9486fb72056e29f1bad58e3 (diff) |
Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/widgets')
6 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index b3b6e69c79..20c0dd993b 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -71,7 +71,7 @@ QT_END_NAMESPACE static inline bool isCaseSensitiveFileSystem(const QString &path) { - Q_UNUSED(path) + Q_UNUSED(path); #if defined(Q_OS_MAC) return pathconf(QFile::encodeName(path).constData(), _PC_CASE_SENSITIVE); #elif defined(Q_OS_WIN) diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index dcb44ef18b..8387d6f1dd 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -4020,7 +4020,7 @@ void tst_QGraphicsScene::polishItems() PolishItem *parent = new PolishItem; scene.addItem(parent); PolishItem *child = new PolishItem(parent); - Q_UNUSED(child) + Q_UNUSED(child); // test that QGraphicsScenePrivate::_q_polishItems() doesn't crash QMetaObject::invokeMethod(&scene,"_q_polishItems"); } diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp index 99f82f92b2..02be27ffc7 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp @@ -64,7 +64,7 @@ static inline void moveCursorAway(const QWidget *topLevel) #ifndef QT_NO_CURSOR QCursor::setPos(topLevel->geometry().topRight() + QPoint(100, 0)); #else - Q_UNUSED(topLevel) + Q_UNUSED(topLevel); #endif } @@ -204,8 +204,8 @@ public: void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { - Q_UNUSED(model) - Q_UNUSED(index) + Q_UNUSED(model); + Q_UNUSED(index); QDialog *dialog = qobject_cast<QDialog *>(editor); result = static_cast<QDialog::DialogCode>(dialog->result()); diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp index 1cbfb4d7be..8e2f5ba068 100644 --- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -2190,7 +2190,7 @@ void tst_QTableView::resizeRowsToContents() QFETCH(int, cellHeight); QFETCH(int, rowHeight); QFETCH(int, columnWidth); - Q_UNUSED(columnWidth) + Q_UNUSED(columnWidth); QtTestTableModel model(rowCount, columnCount); QtTestTableView view; @@ -2236,7 +2236,7 @@ void tst_QTableView::resizeColumnsToContents() QFETCH(int, cellHeight); QFETCH(int, rowHeight); QFETCH(int, columnWidth); - Q_UNUSED(rowHeight) + Q_UNUSED(rowHeight); QtTestTableModel model(rowCount, columnCount); QtTestTableView view; @@ -3780,13 +3780,13 @@ public: int rowCount(const QModelIndex &parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return 10000000; } int columnCount(const QModelIndex &parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return 20000000; } }; @@ -3956,7 +3956,7 @@ public: private: bool eventFilter(QObject *obj, QEvent *e) override { - Q_UNUSED(obj) + Q_UNUSED(obj); if (e->type() == QEvent::Paint) ++paintEventCount_; return false; diff --git a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp index 2479fa07a7..fa1bc3e57a 100644 --- a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp +++ b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp @@ -175,7 +175,7 @@ void tst_QGestureRecognizer::panGesture() QFETCH(int, panSubTest); QFETCH(bool, gestureExpected); - Q_UNUSED(panSubTest) // Single finger pan will be added later. + Q_UNUSED(panSubTest); // Single finger pan will be added later. const int panPoints = 2; const Qt::GestureType gestureType = Qt::PanGesture; @@ -219,7 +219,7 @@ void tst_QGestureRecognizer::pinchGesture() QFETCH(int, pinchSubTest); QFETCH(bool, gestureExpected); - Q_UNUSED(pinchSubTest) + Q_UNUSED(pinchSubTest); const Qt::GestureType gestureType = Qt::PinchGesture; TestWidget widget(GestureTypeVector(1, gestureType)); diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 4b6703e07e..6e9224cb5f 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -2119,9 +2119,9 @@ static void dumpFocusChain(QWidget *start, bool bForward, const char *desc = nul cur = bForward ? widgetPrivate->focus_next : widgetPrivate->focus_prev; } while (cur != start); #else - Q_UNUSED(start) - Q_UNUSED(bForward) - Q_UNUSED(desc) + Q_UNUSED(start); + Q_UNUSED(bForward); + Q_UNUSED(desc); #endif } @@ -7398,7 +7398,7 @@ void tst_QWidget::render_task188133() // Make sure QWidget::render does not trigger QWidget::repaint/update // and asserts for Qt::WA_WState_Created. const QPixmap pixmap = mainWindow.grab(QRect(QPoint(0, 0), QSize(-1, -1))); - Q_UNUSED(pixmap) + Q_UNUSED(pixmap); } void tst_QWidget::render_task211796() |