diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-21 16:32:47 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-23 16:57:03 +0200 |
commit | 78c8f0cd4d0df7feaa1f3128b085565961be875d (patch) | |
tree | a058fb588dcf1f44e4d9542ee1bad1119dd37015 /src/testlib/qtestcase.cpp | |
parent | 5b525e8e54384600b92415b08b5ec94020faf40c (diff) |
Deprecate QTest::qWarn() and replace its last use
The one place that actually called it with file and line number was
internal to QtTest, so could call QtTestLog::warn().
Change-Id: I8be10fc81996cc3de4d2eea3ecedc59671ffe759
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index aec7b986a9..ce10b0a8eb 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2064,12 +2064,16 @@ bool QTest::qExpectFail(const char *dataIndex, const char *comment, return QTestResult::expectFail(dataIndex, qstrdup(comment), mode, file, line); } -/*! \internal +#if QT_DEPRECATED_SINCE(6, 3) +/*! + \internal + \deprecated [6.3] Use qWarning() instead */ void QTest::qWarn(const char *message, const char *file, int line) { QTestLog::warn(message, file, line); } +#endif /*! Ignores messages created by qDebug(), qInfo() or qWarning(). If the \a message @@ -2315,7 +2319,7 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co if (found.isEmpty()) { - QTest::qWarn(qPrintable( + QTestLog::warn(qPrintable( QString::fromLatin1("testdata %1 could not be located!").arg(base)), file, line); } else if (QTestLog::verboseLevel() >= 1) { |