summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2013-05-01 11:16:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-08 00:55:15 +0200
commit263b86a5591082fb173c400a05ac81372072934b (patch)
tree44753b0d5851002031a8f4f6ea22370c92bc35f3 /tests/auto/tools
parent758f064558f26eb32a74d4bf426ee443fe6e8f4b (diff)
moc: use fprintf instead of qWarning
qWarning now depends on QT_MESSAGE_PATTERN, depending on that variable. It will show things like the moc process id or the Parser::error function name. We don't want that. Change-Id: I5b35401200f0f7de2442aa77d700a82402081489 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 3cd2f1f936..e0179b393b 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1734,6 +1734,11 @@ void tst_Moc::warnings()
#endif
QProcess proc;
+
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert("QT_MESSAGE_PATTERN", "no qDebug or qWarning please");
+ proc.setProcessEnvironment(env);
+
proc.start("moc", args);
QVERIFY(proc.waitForStarted());