Fix test for WinRT

Only on win32 we can omit creating a new window.

Change-Id: Ie49ef45ccb745aaa43f58096e7810c71671124ba
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Maurice Kalinowski 2016-09-23 07:42:48 +02:00
parent 0889e9da20
commit 9888a2c138

View File

@ -46,7 +46,7 @@ void tst_qdesktopservices::openUrl()
{ {
// At the bare minimum check that they return false for invalid url's // At the bare minimum check that they return false for invalid url's
QCOMPARE(QDesktopServices::openUrl(QUrl()), false); QCOMPARE(QDesktopServices::openUrl(QUrl()), false);
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// this test is only valid on windows on other systems it might mean open a new document in the application handling .file // this test is only valid on windows on other systems it might mean open a new document in the application handling .file
const QRegularExpression messagePattern("ShellExecute 'file://invalid\\.file' failed \\(error \\d+\\)\\."); const QRegularExpression messagePattern("ShellExecute 'file://invalid\\.file' failed \\(error \\d+\\)\\.");
QVERIFY(messagePattern.isValid()); QVERIFY(messagePattern.isValid());