diff options
author | hjk <hjk121@nokiamail.com> | 2013-10-11 13:55:45 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-10-14 14:49:11 +0200 |
commit | f50ffd614c25f66a5e237f19ea6f0982f665bc27 (patch) | |
tree | 63f42e89d788ae1c6565e2bcdf4fa66037af8ffc /src/plugins/ios/iosdevice.cpp | |
parent | e96e77690d7289bd6e20a3f892132a95d7a960c8 (diff) | |
download | qt-creator-f50ffd614c25f66a5e237f19ea6f0982f665bc27.tar.gz |
Ios: Make it the plugin compilable (but not functional) outside Mac
Change-Id: I1149ce410f2875c6ad8bd0d62c23bb6181f4c1ac
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/ios/iosdevice.cpp')
-rw-r--r-- | src/plugins/ios/iosdevice.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index 616158636e..378cf43031 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -39,15 +39,18 @@ #include <QVariantMap> #include <QMessageBox> +#ifdef Q_OS_MAC #include <IOKit/IOKitLib.h> #include <IOKit/usb/IOUSBLib.h> #include <CoreFoundation/CoreFoundation.h> +#endif + using namespace ProjectExplorer; static bool debugDeviceDetection = false; -namespace { -QString CFStringRef2QString(CFStringRef s) +#ifdef Q_OS_MAC +static QString CFStringRef2QString(CFStringRef s) { unsigned char buf[250]; CFIndex len = CFStringGetLength(s); @@ -67,8 +70,7 @@ QString CFStringRef2QString(CFStringRef s) delete[] bigBuf; return res; } - -} +#endif namespace Ios { namespace Internal { @@ -349,6 +351,7 @@ void IosDeviceManager::infoGathererFinished(IosToolHandler *gatherer) gatherer->deleteLater(); } +#ifdef Q_OS_MAC namespace { io_iterator_t gAddedIter; io_iterator_t gRemovedIter; @@ -418,9 +421,11 @@ void deviceDisconnectedCallback(void *refCon, io_iterator_t iterator) } // extern C } // anonymous namespace +#endif void IosDeviceManager::monitorAvailableDevices() { +#ifdef Q_OS_MAC CFMutableDictionaryRef matchingDictionary = IOServiceMatching("IOUSBDevice" ); { @@ -469,7 +474,7 @@ void IosDeviceManager::monitorAvailableDevices() // Iterate once to get already-present devices and arm the notification deviceConnectedCallback(NULL, gAddedIter); deviceDisconnectedCallback(NULL, gRemovedIter); - +#endif } |