Fix compilation without process support

Change-Id: I88ef96bf15f40e459bacc4b2abe4dfe84e257495
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Maurice Kalinowski 2016-05-19 10:47:27 +02:00 committed by Maurice Kalinowski
parent c276aa5130
commit 8e8bd90e44

View File

@ -717,6 +717,7 @@ void tst_QIcon::fromThemeCache()
QIcon::setThemeSearchPaths(QStringList());
QSKIP("gtk-update-icon-cache not run (binary not found)");
}
#ifndef QT_NO_PROCESS
QProcess process;
process.start(gtkUpdateIconCache,
QStringList() << QStringLiteral("-f") << QStringLiteral("-t") << (dir.path() + QLatin1String("/testcache")));
@ -726,6 +727,7 @@ void tst_QIcon::fromThemeCache()
QVERIFY(process.waitForFinished());
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
#endif // QT_NO_PROCESS
QVERIFY(QFileInfo(cacheName).lastModified() >= QFileInfo(dir.path() + QLatin1String("/testcache/16x16/actions")).lastModified());
QIcon::setThemeSearchPaths(QStringList() << dir.path()); // reload themes
QVERIFY(!QIcon::fromTheme("button-open").isNull());