Skip to content
Snippets Groups Projects
Commit ccf968c0 authored by Eike Ziller's avatar Eike Ziller
Browse files

Ios: Fix compilation with Qt4


Change-Id: I6505d158d2456bc63572e274b47dcef486ca241d
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 44dd2b6b
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@
#include <projectexplorer/runconfiguration.h>
#include <qt4projectmanager/qmakerunconfigurationfactory.h>
#include <qcompilerdetection.h>
#include <utils/qtcoverride.h>
namespace ProjectExplorer {
class RunControl;
......@@ -50,25 +50,25 @@ class IosRunConfigurationFactory : public Qt4ProjectManager::QmakeRunConfigurati
public:
explicit IosRunConfigurationFactory(QObject *parent = 0);
Q_DECL_OVERRIDE QString displayNameForId(const Core::Id id) const;
Q_DECL_OVERRIDE QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
QString displayNameForId(const Core::Id id) const QTC_OVERRIDE;
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const QTC_OVERRIDE;
Q_DECL_OVERRIDE bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
Q_DECL_OVERRIDE ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent,
const Core::Id id);
bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const QTC_OVERRIDE;
ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent,
const Core::Id id) QTC_OVERRIDE;
Q_DECL_OVERRIDE bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
Q_DECL_OVERRIDE ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent,
const QVariantMap &map);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const QTC_OVERRIDE;
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent,
const QVariantMap &map) QTC_OVERRIDE;
Q_DECL_OVERRIDE bool canClone(ProjectExplorer::Target *parent,
ProjectExplorer::RunConfiguration *source) const;
Q_DECL_OVERRIDE ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent,
ProjectExplorer::RunConfiguration *source);
bool canClone(ProjectExplorer::Target *parent,
ProjectExplorer::RunConfiguration *source) const QTC_OVERRIDE;
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent,
ProjectExplorer::RunConfiguration *source) QTC_OVERRIDE;
Q_DECL_OVERRIDE bool canHandle(ProjectExplorer::Target *t) const;
Q_DECL_OVERRIDE QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Target *t,
ProjectExplorer::Node *n);
bool canHandle(ProjectExplorer::Target *t) const QTC_OVERRIDE;
QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Target *t,
ProjectExplorer::Node *n) QTC_OVERRIDE;
private:
ProjectExplorer::RunConfiguration *doCreate(ProjectExplorer::Target *parent, const Core::Id id);
ProjectExplorer::RunConfiguration *doRestore(ProjectExplorer::Target *parent,
......
......@@ -7,7 +7,7 @@ include(../../../../qtcreator.pri)
# 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\" \
-fobjc-link-runtime
LIBS += \
......
......@@ -8,7 +8,11 @@
#import <AppKit/AppKit.h>
#import "iphonesimulator.h"
#include <QLibrary>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QApplication>
#else
#include <QGuiApplication>
#endif
#include <QString>
#include <QStringList>
......@@ -21,7 +25,12 @@
* Runs the iPhoneSimulator backed by a main runloop.
*/
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
//NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
......
......@@ -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;
};
......
......@@ -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
......
......@@ -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();
......
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