diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-11-12 14:55:31 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-11-12 14:55:31 (GMT) |
commit | 75a4ac51b191092bee4a995a9742832c640188eb (patch) | |
tree | 0497bb57b67de253280e657ebe893b818ce7368a /tests/auto/guiapplauncher/tst_guiapplauncher.cpp | |
parent | 58dbae4f9bed45b5657546898f8d0bca5a3d4c56 (diff) | |
download | Qt-75a4ac51b191092bee4a995a9742832c640188eb.zip Qt-75a4ac51b191092bee4a995a9742832c640188eb.tar.gz Qt-75a4ac51b191092bee4a995a9742832c640188eb.tar.bz2 |
Launcher test: Clean stderr whitelist
Diffstat (limited to 'tests/auto/guiapplauncher/tst_guiapplauncher.cpp')
-rw-r--r-- | tests/auto/guiapplauncher/tst_guiapplauncher.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/guiapplauncher/tst_guiapplauncher.cpp b/tests/auto/guiapplauncher/tst_guiapplauncher.cpp index 2a6c1e2..a61bd5e 100644 --- a/tests/auto/guiapplauncher/tst_guiapplauncher.cpp +++ b/tests/auto/guiapplauncher/tst_guiapplauncher.cpp @@ -439,6 +439,19 @@ static inline void ensureTerminated(QProcess *p) qWarning("Unable to terminate process"); } +static const QStringList &stderrWhiteList() +{ + static QStringList rc; + if (rc.empty()) { + rc << QLatin1String("QPainter::begin: Paint device returned engine == 0, type: 2") + << QLatin1String("QPainter::setRenderHint: Painter must be active to set rendering hints") + << QLatin1String("QPainter::setPen: Painter not active") + << QLatin1String("QPainter::setBrush: Painter not active") + << QLatin1String("QPainter::end: Painter not active, aborted"); + } + return rc; +} + bool tst_GuiAppLauncher::runApp(const AppLaunchData &data, QString *errorMessage) const { qDebug("Launching: %s\n", qPrintable(data.binary)); @@ -483,7 +496,7 @@ bool tst_GuiAppLauncher::runApp(const AppLaunchData &data, QString *errorMessage const QStringList stderrOutput = QString::fromLocal8Bit(process.readAllStandardOutput()).split(QLatin1Char('\n')); foreach(const QString &stderrLine, stderrOutput) { // Skip expected QPainter warnings from oxygen. - if (stderrLine.startsWith(QLatin1String("QPainter:"))) { + if (stderrWhiteList().contains(stderrLine)) { qWarning("%s: stderr: %s\n", qPrintable(data.binary), qPrintable(stderrLine)); } else { if (!stderrLine.isEmpty()) { // Split oddity gives empty messages |