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 | |
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')
27 files changed, 80 insertions, 80 deletions
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp index 2b7de50971..8fc6d1ac61 100644 --- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp +++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp @@ -83,8 +83,8 @@ public: virtual void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState) { - Q_UNUSED(oldState) - Q_UNUSED(newState) + Q_UNUSED(oldState); + Q_UNUSED(newState); }; }; diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp index 18a6268ec0..8b36a7a246 100644 --- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp +++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp @@ -96,8 +96,8 @@ public: virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { - Q_UNUSED(oldState) - Q_UNUSED(newState) + Q_UNUSED(oldState); + Q_UNUSED(newState); }; }; @@ -112,8 +112,8 @@ public: virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { - Q_UNUSED(oldState) - Q_UNUSED(newState) + Q_UNUSED(oldState); + Q_UNUSED(newState); }; virtual int duration() const { diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index aae2d1b7d0..63a254c26a 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -100,8 +100,8 @@ public: virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { - Q_UNUSED(oldState) - Q_UNUSED(newState) + Q_UNUSED(oldState); + Q_UNUSED(newState); }; }; diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp index 1072cb44f9..1671e9d98b 100644 --- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp +++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp @@ -195,22 +195,22 @@ public: // bool link(const QString &newName) // { - // Q_UNUSED(newName) + // Q_UNUSED(newName); // return false; // } // bool mkdir(const QString &dirName, bool createParentDirectories) const // { - // Q_UNUSED(dirName) - // Q_UNUSED(createParentDirectories) + // Q_UNUSED(dirName); + // Q_UNUSED(createParentDirectories); // return false; // } // bool rmdir(const QString &dirName, bool recurseParentDirectories) const // { - // Q_UNUSED(dirName) - // Q_UNUSED(recurseParentDirectories) + // Q_UNUSED(dirName); + // Q_UNUSED(recurseParentDirectories); // return false; // } @@ -247,7 +247,7 @@ public: // bool setPermissions(uint perms) // { - // Q_UNUSED(perms) + // Q_UNUSED(perms); // return false; // } @@ -373,8 +373,8 @@ public: // typedef QAbstractFileEngineIterator Iterator; // Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) // { - // Q_UNUSED(filters) - // Q_UNUSED(filterNames) + // Q_UNUSED(filters); + // Q_UNUSED(filterNames); // return 0; // } diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp index 66a9e85dff..fc0f847dc0 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp @@ -2823,7 +2823,7 @@ public: bool hasChildren(const QModelIndex &parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return true; } @@ -2834,7 +2834,7 @@ public: int columnCount(const QModelIndex& parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return cols; } @@ -3986,14 +3986,14 @@ public: using QAbstractListModel::QAbstractListModel; QVariant data(const QModelIndex &index, int role) const override { - Q_UNUSED(index) - Q_UNUSED(role) + Q_UNUSED(index); + Q_UNUSED(role); return QVariant(); } int rowCount(const QModelIndex &parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return 0; } @@ -4034,15 +4034,15 @@ public: int rowCount(const QModelIndex &parent = QModelIndex()) const override { - Q_UNUSED(parent) + Q_UNUSED(parent); return 10; } bool canDropMimeData(const QMimeData *, Qt::DropAction, int row, int column, const QModelIndex &parent) const override { - Q_UNUSED(row) - Q_UNUSED(column) + Q_UNUSED(row); + Q_UNUSED(column); return parent.row() % 2 == 0; } }; @@ -4771,7 +4771,7 @@ void tst_QSortFilterProxyModel::filterAndInsertColumn() {} bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const override { - Q_UNUSED(source_parent) + Q_UNUSED(source_parent); switch (filerMode){ case FilterAll: return true; @@ -5030,8 +5030,8 @@ void tst_QSortFilterProxyModel::invalidateColumnsOrRowsFilter() } bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const override { - Q_UNUSED(source_column) - Q_UNUSED(source_parent) + Q_UNUSED(source_column); + Q_UNUSED(source_parent); columnFiltered++; return true; diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp b/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp index ea44980657..a5043b956a 100644 --- a/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp @@ -713,7 +713,7 @@ void tst_QTransposeProxyModel::span() {} QSize span(const QModelIndex &index) const override { - Q_UNUSED(index) + Q_UNUSED(index); return QSize(2, 1); } }; diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp index d1e138d8eb..126d2bb435 100644 --- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp +++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp @@ -32,8 +32,8 @@ // This is a testcase for QTBUG-11213 int main(int argc, char **argv) { - Q_UNUSED(argc) - Q_UNUSED(argv) + Q_UNUSED(argc); + Q_UNUSED(argv); // Now print a few uuids. printf("%s", qPrintable(QUuid::createUuid().toString())); diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp index cef67d680b..6a09512235 100644 --- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp @@ -609,15 +609,15 @@ class ErrorDevice : public QIODevice protected: qint64 readData(char *data, qint64 maxlen) override { - Q_UNUSED(data) - Q_UNUSED(maxlen) + Q_UNUSED(data); + Q_UNUSED(maxlen); return -1; } qint64 writeData(const char *data, qint64 len) override { - Q_UNUSED(data) - Q_UNUSED(len) + Q_UNUSED(data); + Q_UNUSED(len); return -1; } }; diff --git a/tests/auto/corelib/text/qchar/tst_qchar.cpp b/tests/auto/corelib/text/qchar/tst_qchar.cpp index 83a6765f2e..bad8665d90 100644 --- a/tests/auto/corelib/text/qchar/tst_qchar.cpp +++ b/tests/auto/corelib/text/qchar/tst_qchar.cpp @@ -881,7 +881,7 @@ void tst_QChar::normalization() QFETCH(QStringList, columns); QFETCH(int, part); - Q_UNUSED(part) + Q_UNUSED(part); // CONFORMANCE: // 1. The following invariants must be true for all conformant implementations diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index 61a0db26de..23a734f428 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -2640,7 +2640,7 @@ void instantiateContainer() constIt = constContainer.end(); constIt = constContainer.cend(); container.constEnd(); - Q_UNUSED(constIt) + Q_UNUSED(constIt); container.clear(); container.contains(value); @@ -2663,7 +2663,7 @@ void instantiateMutableIterationContainer() typename ContainerType::iterator it; it = container.begin(); it = container.end(); - Q_UNUSED(it) + Q_UNUSED(it); } template <typename ContainerType, typename ValueType> @@ -2824,7 +2824,7 @@ void tst_Collections::qtimerList() template <typename Container> void testContainerTypedefs(Container container) { - Q_UNUSED(container) + Q_UNUSED(container); { QVERIFY_TYPE(typename Container::value_type); } { QVERIFY_TYPE(typename Container::iterator); } { QVERIFY_TYPE(typename Container::const_iterator); } @@ -2838,7 +2838,7 @@ void testContainerTypedefs(Container container) template <typename Container> void testPairAssociativeContainerTypedefs(Container container) { - Q_UNUSED(container) + Q_UNUSED(container); // TODO: Not sure how to define value_type for our associative containers // { QVERIFY_TYPE(typename Container::value_type); } @@ -2860,7 +2860,7 @@ void testPairAssociativeContainerTypedefs(Container container) template <typename Container> void testSetContainerTypedefs(Container container) { - Q_UNUSED(container) + Q_UNUSED(container); { QVERIFY_TYPE(typename Container::iterator); } { QVERIFY_TYPE(typename Container::const_iterator); } { QVERIFY_TYPE(typename Container::reference); } diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index c7f20ec6a4..ccba312807 100644 --- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp +++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp @@ -736,7 +736,7 @@ size_t CountedObject::liveCount = 0; void tst_QArrayData::arrayOps() { - CountedObject::LeakChecker leakChecker; Q_UNUSED(leakChecker) + CountedObject::LeakChecker leakChecker; Q_UNUSED(leakChecker); const int intArray[5] = { 80, 101, 100, 114, 111 }; const QString stringArray[5] = { @@ -901,7 +901,7 @@ void tst_QArrayData::arrayOps() void tst_QArrayData::arrayOps2() { - CountedObject::LeakChecker leakChecker; Q_UNUSED(leakChecker) + CountedObject::LeakChecker leakChecker; Q_UNUSED(leakChecker); //////////////////////////////////////////////////////////////////////////// // appendInitialize diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index e099b4dfc7..d6ce37438b 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -250,9 +250,9 @@ static bool runHelper(const QString &program, const QStringList &arguments, QByt } return true; #else // QT_CONFIG(process) - Q_UNUSED(program) - Q_UNUSED(arguments) - Q_UNUSED(errorMessage) + Q_UNUSED(program); + Q_UNUSED(arguments); + Q_UNUSED(errorMessage); return false; #endif // QT_CONFIG(process) } diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index 874468c954..5a0702951e 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -423,7 +423,7 @@ void tst_QKeySequence::mnemonic() QFETCH(bool, warning); #ifdef QT_NO_DEBUG - Q_UNUSED(warning) + Q_UNUSED(warning); #else if (warning) { QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurrences of '&'").arg(string); diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index caba2a1409..32c897e172 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -160,7 +160,7 @@ struct SharedResource : public QOpenGLSharedResource void freeResource(QOpenGLContext *context) { Q_ASSERT(context == QOpenGLContext::currentContext()); - Q_UNUSED(context) + Q_UNUSED(context); resource = 0; if (tracker) tracker->freeResourceCalls++; diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index 5d7f41efda..4e51ccea43 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -240,9 +240,9 @@ void tst_QTextDocument::writeActualAndExpected(const char *testTag, const QStrin out.close(); } #else - Q_UNUSED(testTag) - Q_UNUSED(actual) - Q_UNUSED(expected) + Q_UNUSED(testTag); + Q_UNUSED(actual); + Q_UNUSED(expected); #endif } diff --git a/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp b/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp index 78cc1da36e..474b2def60 100644 --- a/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp +++ b/tests/auto/gui/text/qtextmarkdownimporter/tst_qtextmarkdownimporter.cpp @@ -382,7 +382,7 @@ void tst_QTextMarkdownImporter::pathological() // avoid crashing on crazy input QFile f(QFINDTESTDATA(filename)); QVERIFY(f.open(QFile::ReadOnly)); #ifdef QT_NO_DEBUG - Q_UNUSED(warning) + Q_UNUSED(warning); #else if (!warning.isEmpty()) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index 419d13e33c..2e59480c90 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -990,12 +990,12 @@ void tst_Http2::invalidFrame() void tst_Http2::invalidRequest(quint32 streamID) { - Q_UNUSED(streamID) + Q_UNUSED(streamID); } void tst_Http2::decompressionFailed(quint32 streamID) { - Q_UNUSED(streamID) + Q_UNUSED(streamID); } void tst_Http2::receivedRequest(quint32 streamID) @@ -1021,7 +1021,7 @@ void tst_Http2::receivedData(quint32 streamID) void tst_Http2::windowUpdated(quint32 streamID) { - Q_UNUSED(streamID) + Q_UNUSED(streamID); ++windowUpdates; } diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index e8d4c773f0..00afdd8177 100644 --- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -233,7 +233,7 @@ void tst_QHttpNetworkConnection::finishedReply() void tst_QHttpNetworkConnection::finishedWithError(QNetworkReply::NetworkError errorCode, const QString &detail) { - Q_UNUSED(detail) + Q_UNUSED(detail); finishedWithErrorCalled = true; netErrorCode = errorCode; } @@ -425,7 +425,7 @@ void tst_QHttpNetworkConnection::_connect() void tst_QHttpNetworkConnection::challenge401(const QHttpNetworkRequest &request, QAuthenticator *authenticator) { - Q_UNUSED(request) + Q_UNUSED(request); QHttpNetworkReply *reply = qobject_cast<QHttpNetworkReply*>(sender()); if (reply) { @@ -563,7 +563,7 @@ void tst_QHttpNetworkConnection::compression() #ifndef QT_NO_SSL void tst_QHttpNetworkConnection::sslErrors(const QList<QSslError> &errors) { - Q_UNUSED(errors) + Q_UNUSED(errors); QHttpNetworkReply *reply = qobject_cast<QHttpNetworkReply*>(sender()); if (reply) { diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp index 90da0b64e2..c84120a6e5 100644 --- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp +++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp @@ -266,11 +266,11 @@ void tst_QNetworkProxyFactory::genericSystemProxy() QCOMPARE(systemProxy.first().port(), static_cast<quint16>(port)); qunsetenv(envVar); #else - Q_UNUSED(envVar) - Q_UNUSED(url) - Q_UNUSED(proxyType) - Q_UNUSED(hostName) - Q_UNUSED(port) + Q_UNUSED(envVar); + Q_UNUSED(url); + Q_UNUSED(proxyType); + Q_UNUSED(hostName); + Q_UNUSED(port); QSKIP("Generic system proxy not available on this platform."); #endif } diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index 81dcaa0975..cdc04f33a0 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -414,7 +414,7 @@ public: SelectRowOverrideTestModel(QObject *parent, QSqlDatabase db):QSqlTableModel(parent, db) { } bool selectRow(int row) { - Q_UNUSED(row) + Q_UNUSED(row); return select(); } }; diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.h b/tests/auto/tools/qmakelib/tst_qmakelib.h index acfeb43ecd..b4a4d95b6f 100644 --- a/tests/auto/tools/qmakelib/tst_qmakelib.h +++ b/tests/auto/tools/qmakelib/tst_qmakelib.h @@ -91,7 +91,7 @@ public: { print(fileName, lineNo, type, msg); } virtual void fileMessage(int type, const QString &msg) - { Q_UNUSED(type) doPrint(msg); } + { Q_UNUSED(type); doPrint(msg); } virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {} virtual void doneWithEval(ProFile *) {} 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() |