summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-07-31 18:25:42 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-05 01:10:19 +0200
commit4a1618ab9dfd27663e9882823e4f51e6b4d70775 (patch)
tree2fbaade571c08d458659a8838dff81698db0afda /tests/benchmarks
parent3e7c6a87b33a479cee14499b1576241e6b8cdb0a (diff)
testlib: Deprecate QWARN() in favor of qWarning()
The QtTest best practices documentations recommends using output mechanisms such as qDebug() and qWarning() for diagnostic messages, and this is also what most of our own tests do. The QWARN() macro and corresponding internal QTest::qWarn() function was added when QtTest was first implemented, but was likely meant as an internal implementation detail, like its cousin QTestLog::info(), which does not have any corresponding macro. This theory is backed by our own QtTest self-test (tst_silent) describing the output from QWARN() as "an internal testlib warning". The only difference between QWARN() and qWarning(), besides the much richer feature set of the latter, is that qWarning() will not pass on file and line number information in release mode, but QWARN() will. This is an acceptable loss of functionality, considering that the user can override this behavior by defining QT_MESSAGELOGCONTEXT. [ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning() Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit bef57b317f2efc0e73f2275d594be9d69f5a75d0) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index 1c17f86cf9..418f0623b3 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -101,7 +101,7 @@ void tst_LanceBench::initTestCase()
QDir qpsDir(scriptsDir);
qpsFiles = qpsDir.entryList(QStringList() << QLatin1String("*.qps"), QDir::Files | QDir::Readable);
if (qpsFiles.isEmpty()) {
- QWARN("No qps script files found in " + qpsDir.path().toLatin1());
+ qWarning() << "No qps script files found in" << qpsDir.path();
QSKIP("Aborted due to errors.");
}