diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-10-02 18:13:22 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-10-02 18:18:31 +0200 |
commit | ccf968c05c1ed1d9ee749577ece8413a3a050337 (patch) | |
tree | 57f9d0d89f72ba65524879901120192b29bd8100 /src/tools/iostool | |
parent | 44dd2b6bdf22c61889cae586fa463a3f56b2664c (diff) | |
download | qt-creator-ccf968c05c1ed1d9ee749577ece8413a3a050337.tar.gz |
Ios: Fix compilation with Qt4
Change-Id: I6505d158d2456bc63572e274b47dcef486ca241d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/tools/iostool')
-rw-r--r-- | src/tools/iostool/iosdevicemanager.h | 2 | ||||
-rw-r--r-- | src/tools/iostool/iostool.pro | 2 | ||||
-rw-r--r-- | src/tools/iostool/main.cpp | 13 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/tools/iostool/iosdevicemanager.h b/src/tools/iostool/iosdevicemanager.h index 81fa646061..4616d46126 100644 --- a/src/tools/iostool/iosdevicemanager.h +++ b/src/tools/iostool/iosdevicemanager.h @@ -41,6 +41,7 @@ namespace Ios { namespace Internal { +class DevInfoSession; class IosDeviceManagerPrivate; } // namespace Internal @@ -84,6 +85,7 @@ private slots: void checkPendingLookups(); private: friend class Internal::IosDeviceManagerPrivate; + friend class Internal::DevInfoSession; IosDeviceManager(QObject *parent = 0); Internal::IosDeviceManagerPrivate *d; }; diff --git a/src/tools/iostool/iostool.pro b/src/tools/iostool/iostool.pro index 1e503887e2..fe3392c667 100644 --- a/src/tools/iostool/iostool.pro +++ b/src/tools/iostool/iostool.pro @@ -8,7 +8,7 @@ CONFIG += console # Prevent from popping up in the dock when launched. # We embed the Info.plist file, so the application doesn't need to # be a bundle. -QMAKE_LFLAGS += -sectcreate __TEXT __info_plist $$shell_quote($$PWD/Info.plist) +QMAKE_LFLAGS += -sectcreate __TEXT __info_plist \"$$PWD/Info.plist\" CONFIG -= app_bundle LIBS += -framework CoreFoundation -framework CoreServices -framework IOKit -lssl -lbz2 -framework Security -framework SystemConfiguration diff --git a/src/tools/iostool/main.cpp b/src/tools/iostool/main.cpp index 44136fc316..1cfab9d581 100644 --- a/src/tools/iostool/main.cpp +++ b/src/tools/iostool/main.cpp @@ -26,7 +26,12 @@ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ +#include <qglobal.h> +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#include <QApplication> +#else #include <QGuiApplication> +#endif #include <QTextStream> #include <QDebug> #include <QXmlStreamWriter> @@ -81,7 +86,11 @@ IosTool::IosTool(QObject *parent): outFile(), out(&outFile) { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + outFile.open(stdout, QIODevice::WriteOnly, QFile::DontCloseHandle); +#else outFile.open(stdout, QIODevice::WriteOnly, QFileDevice::DontCloseHandle); +#endif out.setAutoFormatting(true); out.setCodec("UTF-8"); } @@ -376,7 +385,11 @@ void IosTool::errorMsg(const QString &msg) int main(int argc, char *argv[]) { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + QApplication a(argc, argv); +#else QGuiApplication a(argc, argv); +#endif IosTool tool; tool.run(QCoreApplication::arguments()); int res = a.exec(); |