Skip to content
Snippets Groups Projects
Commit f50ffd61 authored by hjk's avatar hjk
Browse files

Ios: Make it the plugin compilable (but not functional) outside Mac


Change-Id: I1149ce410f2875c6ad8bd0d62c23bb6181f4c1ac
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e96e7769
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ include(../../qtcreatorplugin.pri)
QT += xml network
LIBS += -framework CoreFoundation -framework IOKit
macx: LIBS += -framework CoreFoundation -framework IOKit
HEADERS += \
iosconstants.h \
......
......@@ -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
}
......
......@@ -48,11 +48,8 @@ SUBDIRS = \
todo \
qnx \
clearcase \
baremetal
macx {
SUBDIRS += ios
}
baremetal \
ios
isEmpty(QBS_INSTALL_DIR): QBS_INSTALL_DIR = $$(QBS_INSTALL_DIR)
exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment