diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2012-11-14 14:54:13 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-27 23:55:43 +0100 |
commit | d8b3465dd3482040f0de077f87545415a1a2a5b6 (patch) | |
tree | a08a6ec407ac60b5991419fdc9369911f1fc0a4d | |
parent | e71ca36161626020f7c641dcc83c0c02dc4d561b (diff) |
iOS: Don't use IOKit in QTestLib, it's a private framework on iOS
Change-Id: I271a480b79c7768942911a28c84d6bb5a8d840d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r-- | src/testlib/qtestcase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index f9f21c6a8f..ef8ffa570b 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -82,7 +82,7 @@ #include <time.h> #endif -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) #include <IOKit/pwr_mgt/IOPMLib.h> #endif @@ -2078,7 +2078,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) int callgrindChildExitCode = 0; #endif -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) bool macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0); IOPMAssertionID powerID; #endif @@ -2093,7 +2093,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX); #endif -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (macNeedsActivate) { CFStringRef reasonForActivity= CFSTR("No Display Sleep"); IOReturn ok = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &powerID); @@ -2146,7 +2146,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) } QTestLog::stopLogging(); -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (macNeedsActivate) { IOPMAssertionRelease(powerID); } @@ -2163,7 +2163,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) QSignalDumper::endDump(); -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (macNeedsActivate) { IOPMAssertionRelease(powerID); } |