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 | |
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')
44 files changed, 120 insertions, 120 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() diff --git a/tests/benchmarks/corelib/time/qdatetime/main.cpp b/tests/benchmarks/corelib/time/qdatetime/main.cpp index 1d63547f8f..c6d2b84597 100644 --- a/tests/benchmarks/corelib/time/qdatetime/main.cpp +++ b/tests/benchmarks/corelib/time/qdatetime/main.cpp @@ -126,7 +126,7 @@ void tst_QDateTime::create() QBENCHMARK { for (int jd = JULIAN_DAY_2010; jd < JULIAN_DAY_2020; ++jd) { QDateTime test(QDate::fromJulianDay(jd), QTime::fromMSecsSinceStartOfDay(0)); - Q_UNUSED(test) + Q_UNUSED(test); } } } @@ -427,7 +427,7 @@ void tst_QDateTime::equivalent() for (const QDateTime &test : list) result = (test == other); } - Q_UNUSED(result) + Q_UNUSED(result); } void tst_QDateTime::equivalentUtc() @@ -440,7 +440,7 @@ void tst_QDateTime::equivalentUtc() for (const QDateTime &test : list) result = (test == other); } - Q_UNUSED(result) + Q_UNUSED(result); } void tst_QDateTime::lessThan() @@ -453,7 +453,7 @@ void tst_QDateTime::lessThan() for (const QDateTime &test : list) result = (test < other); } - Q_UNUSED(result) + Q_UNUSED(result); } void tst_QDateTime::lessThanUtc() @@ -466,7 +466,7 @@ void tst_QDateTime::lessThanUtc() for (const QDateTime &test : list) result = (test < other); } - Q_UNUSED(result) + Q_UNUSED(result); } void tst_QDateTime::currentDateTime() diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp index d01d00c6a9..86c7cebfd4 100644 --- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp +++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp @@ -53,7 +53,7 @@ private: void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm ) { int fontHeight = fm.height(); - Q_UNUSED(fontHeight) + Q_UNUSED(fontHeight); } void tst_QFontMetrics::fontmetrics_create() diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index 192da24f3f..ef88f64d8f 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -399,7 +399,7 @@ void tst_QText::paintLayoutToPixmap_painterFill() void tst_QText::document() { QTextDocument *doc = new QTextDocument; - Q_UNUSED(doc) + Q_UNUSED(doc); QBENCHMARK { QTextDocument *doc = new QTextDocument; diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp index 961cf4e03c..e5214b51fb 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp @@ -215,7 +215,7 @@ void AbstractItemView::setSelectionModel(QItemSelectionModel *smodel) /*virtual*/ void AbstractItemView::currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous) { - Q_UNUSED(previous) + Q_UNUSED(previous); if (current != m_currentIndex) m_currentIndex = current; @@ -225,24 +225,24 @@ void AbstractItemView::currentIndexChanged(const QModelIndex ¤t, const QMo void AbstractItemView::currentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) { - Q_UNUSED(selected) - Q_UNUSED(deselected) + Q_UNUSED(selected); + Q_UNUSED(deselected); } /*virtual*/ void AbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { - Q_UNUSED(topLeft) - Q_UNUSED(bottomRight) + Q_UNUSED(topLeft); + Q_UNUSED(bottomRight); // TODO implement if we like to edit view items. } /*virtual*/ void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start, int end) { - Q_UNUSED(index) - Q_UNUSED(start) - Q_UNUSED(end) + Q_UNUSED(index); + Q_UNUSED(start); + Q_UNUSED(end); // TODO implement } @@ -250,17 +250,17 @@ void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start /*virtual*/ void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end) { - Q_UNUSED(index) - Q_UNUSED(start) - Q_UNUSED(end) + Q_UNUSED(index); + Q_UNUSED(start); + Q_UNUSED(end); } /*virtual*/ void AbstractItemView::rowsRemoved(const QModelIndex &parent,int start, int end) { - Q_UNUSED(parent) - Q_UNUSED(start) - Q_UNUSED(end) + Q_UNUSED(parent); + Q_UNUSED(start); + Q_UNUSED(end); if (start <= m_currentIndex.row() && m_currentIndex.row() <= end) { QModelIndex newCurrentIndex = m_model->index(start, 0, m_rootIndex); diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp index 39847b8edb..e4588cc1d1 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp @@ -166,8 +166,8 @@ bool AbstractScrollArea::event(QEvent *e) void AbstractScrollArea::scrollContentsBy(qreal dx, qreal dy) { - Q_UNUSED(dx) - Q_UNUSED(dy) + Q_UNUSED(dx); + Q_UNUSED(dy); prepareGeometryChange(); } diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp index 6a6df15e23..dbd7c40c35 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp @@ -96,7 +96,7 @@ void AbstractViewItem::themeChange() /*virtual*/ void AbstractViewItem::setSubtreeCacheEnabled(bool enabled) { - Q_UNUSED(enabled) + Q_UNUSED(enabled); ; // No impl } diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp index 9f5f16d373..1b928ab908 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp @@ -58,7 +58,7 @@ void BackgroundItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - Q_UNUSED(widget) + Q_UNUSED(widget); painter->setCompositionMode(QPainter::CompositionMode_Source); painter->drawPixmap(option->exposedRect, m_background, option->exposedRect); } diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp index 3682ae55e1..93285c0723 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp @@ -41,6 +41,6 @@ GvbWidget::~GvbWidget() void GvbWidget::keyPressEvent(QKeyEvent *event) { - Q_UNUSED(event) + Q_UNUSED(event); } diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp index 933af2f770..1aa2cfa1ea 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp @@ -69,9 +69,9 @@ QVariant ListModel::data(const QModelIndex &index, int role) const bool ListModel::setData(const QModelIndex &index, const QVariant &value, int role) { // TODO implement if we like to edit list items - Q_UNUSED(index) - Q_UNUSED(value) - Q_UNUSED(role) + Q_UNUSED(index); + Q_UNUSED(value); + Q_UNUSED(role); return false; } diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp index 7ff089fa1e..b1467238f8 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp @@ -409,7 +409,7 @@ void SimpleListView::setListItemCaching(bool enabled) void SimpleListView::scrollContentsBy(qreal dx, qreal dy) { Q_D(SimpleListView); - Q_UNUSED(dx) + Q_UNUSED(dx); QRectF contentRect = d->m_content->boundingRect(); QRectF viewportRect = viewport()->boundingRect(); QPointF contentPos = d->m_content->pos(); diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp index 59ed50157b..d09bd43214 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp @@ -88,7 +88,7 @@ void WebViewPrivate::_q_loadStarted() void WebViewPrivate::_q_loadProgress(int progress) { - Q_UNUSED(progress) + Q_UNUSED(progress); // qDebug() << "WebView: load progress" << progress; adjustSize(); } diff --git a/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp b/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp index 8a588c6e21..943f85d92e 100644 --- a/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp +++ b/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp @@ -35,7 +35,7 @@ extern "C" int LLVMFuzzerTestOneInput(const char *data, size_t size) { // to reduce noise and increase speed static char quiet[] = "QT_LOGGING_RULES=qt.gui.icc=false"; static int pe = putenv(quiet); - Q_UNUSED(pe) + Q_UNUSED(pe); static int argc = 3; static char arg1[] = "fuzzer"; static char arg2[] = "-platform"; diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp index dc95241473..002220507b 100644 --- a/tests/manual/diaglib/debugproxystyle.cpp +++ b/tests/manual/diaglib/debugproxystyle.cpp @@ -63,7 +63,7 @@ QDebug operator<<(QDebug debug, const QStyleOption *option) debug << ", \"" << (textSize < 20 ? ivo->text : ivo->text.left(20) + QLatin1String("...")) << '"'; debug << ", "; #else // Qt 5 - Q_UNUSED(ivo) + Q_UNUSED(ivo); #endif } else { debug << "QStyleOption("; diff --git a/tests/manual/embeddedintoforeignwindow/main.cpp b/tests/manual/embeddedintoforeignwindow/main.cpp index 8edb3a3e9b..d6cff8ac04 100644 --- a/tests/manual/embeddedintoforeignwindow/main.cpp +++ b/tests/manual/embeddedintoforeignwindow/main.cpp @@ -111,7 +111,7 @@ static void showNativeWindow(WId wid) #ifdef Q_OS_WIN ShowWindow(HWND(wid), SW_SHOW); #else // Q_OS_WIN - Q_UNUSED(wid) + Q_UNUSED(wid); Q_UNIMPLEMENTED(); #endif } @@ -121,7 +121,7 @@ static void setFocusToNativeWindow(WId wid) #ifdef Q_OS_WIN SetFocus(HWND(wid)); #else // Q_OS_WIN - Q_UNUSED(wid) + Q_UNUSED(wid); Q_UNIMPLEMENTED(); #endif } @@ -131,7 +131,7 @@ static void destroyNativeWindow(WId wid) #ifdef Q_OS_WIN DestroyWindow(HWND(wid)); #else // Q_OS_WIN - Q_UNUSED(wid) + Q_UNUSED(wid); Q_UNIMPLEMENTED(); #endif } diff --git a/tests/manual/filetest/main.cpp b/tests/manual/filetest/main.cpp index 22c74af327..290dc7064e 100644 --- a/tests/manual/filetest/main.cpp +++ b/tests/manual/filetest/main.cpp @@ -197,7 +197,7 @@ static int rm(const char *fileName) static int rmr(const char *dirName) { #if QT_VERSION < 0x050000 - Q_UNUSED(dirName) + Q_UNUSED(dirName); return 1; #else QDir dir(QString::fromLocal8Bit(dirName)); @@ -213,7 +213,7 @@ static int rmr(const char *dirName) int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); - Q_UNUSED(a) + Q_UNUSED(a); if (argc >= 3 && !qstrcmp(argv[1], "ls")) return ls(argc -2, const_cast<const char **>(argv + 2), true); diff --git a/tests/manual/foreignwindows/main.cpp b/tests/manual/foreignwindows/main.cpp index cad71d183a..cc5b16391c 100644 --- a/tests/manual/foreignwindows/main.cpp +++ b/tests/manual/foreignwindows/main.cpp @@ -82,7 +82,7 @@ static WId createInternalWindow(const QString &name) } } #else // Q_OS_WIN - Q_UNUSED(name) + Q_UNUSED(name); #endif return result; } diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp index 1086498553..0ba8a19913 100644 --- a/tests/manual/qnetworkreply/main.cpp +++ b/tests/manual/qnetworkreply/main.cpp @@ -175,7 +175,7 @@ void tst_qnetworkreply::setSslConfiguration() #elif defined(Q_OS_MAC) QCOMPARE(rootCertLoadingAllowed, false); #else - Q_UNUSED(rootCertLoadingAllowed) + Q_UNUSED(rootCertLoadingAllowed); #endif // other platforms: undecided (Windows: depends on the version) if (works) { QCOMPARE(reply->error(), QNetworkReply::NoError); |