forked from qt-creator/qt-creator
Move QtVersionFactory to QtSupport module
After this is done, QbsProjectManager/CMakeProjectManager will be able to have full Qt support work without having to depend on Qt4ProjectManager. It's should belong here. Change-Id: I577d47cb8a40eb697aa862fbec36c56ff05004f0 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Daniel Teske
parent
a9ca00bd11
commit
4f82c36a19
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/qt4runconfiguration.h \
|
|
||||||
$$PWD/desktopqtversionfactory.h \
|
|
||||||
$$PWD/simulatorqtversionfactory.h \
|
|
||||||
$$PWD/desktopqtversion.h \
|
|
||||||
$$PWD/simulatorqtversion.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
$$PWD/qt4runconfiguration.cpp \
|
|
||||||
$$PWD/desktopqtversionfactory.cpp \
|
|
||||||
$$PWD/simulatorqtversionfactory.cpp \
|
|
||||||
$$PWD/desktopqtversion.cpp \
|
|
||||||
$$PWD/simulatorqtversion.cpp
|
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "qt4buildconfiguration.h"
|
#include "qt4buildconfiguration.h"
|
||||||
|
|
||||||
#include "qmakebuildinfo.h"
|
#include "qmakebuildinfo.h"
|
||||||
|
#include "qmakekitinformation.h"
|
||||||
#include "qt4project.h"
|
#include "qt4project.h"
|
||||||
#include "qt4projectconfigwidget.h"
|
#include "qt4projectconfigwidget.h"
|
||||||
#include "qt4projectmanagerconstants.h"
|
#include "qt4projectmanagerconstants.h"
|
||||||
@@ -49,7 +50,6 @@
|
|||||||
#include <projectexplorer/toolchainmanager.h>
|
#include <projectexplorer/toolchainmanager.h>
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <qtsupport/qtversionmanager.h>
|
#include <qtsupport/qtversionmanager.h>
|
||||||
#include <qt4projectmanager/qmakekitinformation.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ HEADERS += \
|
|||||||
librarydetailscontroller.h \
|
librarydetailscontroller.h \
|
||||||
findqt4profiles.h \
|
findqt4profiles.h \
|
||||||
qt4projectmanager_global.h \
|
qt4projectmanager_global.h \
|
||||||
winceqtversionfactory.h \
|
qt4runconfiguration.h \
|
||||||
winceqtversion.h \
|
|
||||||
profilecompletionassist.h
|
profilecompletionassist.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
@@ -119,8 +118,7 @@ SOURCES += \
|
|||||||
addlibrarywizard.cpp \
|
addlibrarywizard.cpp \
|
||||||
librarydetailscontroller.cpp \
|
librarydetailscontroller.cpp \
|
||||||
findqt4profiles.cpp \
|
findqt4profiles.cpp \
|
||||||
winceqtversionfactory.cpp \
|
qt4runconfiguration.cpp \
|
||||||
winceqtversion.cpp \
|
|
||||||
profilecompletionassist.cpp
|
profilecompletionassist.cpp
|
||||||
|
|
||||||
FORMS += makestep.ui \
|
FORMS += makestep.ui \
|
||||||
@@ -136,5 +134,4 @@ FORMS += makestep.ui \
|
|||||||
RESOURCES += qt4projectmanager.qrc \
|
RESOURCES += qt4projectmanager.qrc \
|
||||||
wizards/wizards.qrc
|
wizards/wizards.qrc
|
||||||
|
|
||||||
include(qt-desktop/qt-desktop.pri)
|
|
||||||
include(customwidgetwizard/customwidgetwizard.pri)
|
include(customwidgetwizard/customwidgetwizard.pri)
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ QtcPlugin {
|
|||||||
"qt4projectmanagerconstants.h",
|
"qt4projectmanagerconstants.h",
|
||||||
"qt4projectmanagerplugin.cpp", "qt4projectmanagerplugin.h",
|
"qt4projectmanagerplugin.cpp", "qt4projectmanagerplugin.h",
|
||||||
"qtmodulesinfo.cpp", "qtmodulesinfo.h",
|
"qtmodulesinfo.cpp", "qtmodulesinfo.h",
|
||||||
"winceqtversion.cpp", "winceqtversion.h",
|
"qt4runconfiguration.cpp", "qt4runconfiguration.h",
|
||||||
"winceqtversionfactory.cpp", "winceqtversionfactory.h"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,18 +83,6 @@ QtcPlugin {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
|
||||||
name: "Qt/Desktop"
|
|
||||||
prefix: "qt-desktop/"
|
|
||||||
files: [
|
|
||||||
"desktopqtversion.cpp", "desktopqtversion.h",
|
|
||||||
"desktopqtversionfactory.cpp", "desktopqtversionfactory.h",
|
|
||||||
"qt4runconfiguration.cpp", "qt4runconfiguration.h",
|
|
||||||
"simulatorqtversion.cpp", "simulatorqtversion.h",
|
|
||||||
"simulatorqtversionfactory.cpp", "simulatorqtversionfactory.h"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "Wizards"
|
name: "Wizards"
|
||||||
prefix: "wizards/"
|
prefix: "wizards/"
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "qmakestep.h"
|
#include "qmakestep.h"
|
||||||
#include "makestep.h"
|
#include "makestep.h"
|
||||||
#include "qt4buildconfiguration.h"
|
#include "qt4buildconfiguration.h"
|
||||||
|
#include "qt4runconfiguration.h"
|
||||||
#include "wizards/consoleappwizard.h"
|
#include "wizards/consoleappwizard.h"
|
||||||
#include "wizards/guiappwizard.h"
|
#include "wizards/guiappwizard.h"
|
||||||
#include "wizards/librarywizard.h"
|
#include "wizards/librarywizard.h"
|
||||||
@@ -49,10 +50,6 @@
|
|||||||
#include "qt4project.h"
|
#include "qt4project.h"
|
||||||
#include "externaleditors.h"
|
#include "externaleditors.h"
|
||||||
#include "profilecompletionassist.h"
|
#include "profilecompletionassist.h"
|
||||||
#include "qt-desktop/qt4runconfiguration.h"
|
|
||||||
#include "qt-desktop/desktopqtversionfactory.h"
|
|
||||||
#include "qt-desktop/simulatorqtversionfactory.h"
|
|
||||||
#include "winceqtversionfactory.h"
|
|
||||||
#include "qmakekitinformation.h"
|
#include "qmakekitinformation.h"
|
||||||
#include "profilehighlighterfactory.h"
|
#include "profilehighlighterfactory.h"
|
||||||
|
|
||||||
@@ -149,10 +146,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
|||||||
addAutoReleasedObject(new DesignerExternalEditor);
|
addAutoReleasedObject(new DesignerExternalEditor);
|
||||||
addAutoReleasedObject(new LinguistExternalEditor);
|
addAutoReleasedObject(new LinguistExternalEditor);
|
||||||
|
|
||||||
addAutoReleasedObject(new DesktopQtVersionFactory);
|
|
||||||
addAutoReleasedObject(new SimulatorQtVersionFactory);
|
|
||||||
addAutoReleasedObject(new WinCeQtVersionFactory);
|
|
||||||
|
|
||||||
addAutoReleasedObject(new ProFileCompletionAssistProvider);
|
addAutoReleasedObject(new ProFileCompletionAssistProvider);
|
||||||
addAutoReleasedObject(new ProFileHoverHandler(this));
|
addAutoReleasedObject(new ProFileHoverHandler(this));
|
||||||
addAutoReleasedObject(new ProFileHighlighterFactory);
|
addAutoReleasedObject(new ProFileHighlighterFactory);
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
#include "qt4runconfiguration.h"
|
#include "qt4runconfiguration.h"
|
||||||
|
|
||||||
#include "../qt4nodes.h"
|
#include "qt4nodes.h"
|
||||||
#include "../qt4project.h"
|
#include "qt4project.h"
|
||||||
#include "../qt4buildconfiguration.h"
|
#include "qt4buildconfiguration.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <projectexplorer/localenvironmentaspect.h>
|
#include <projectexplorer/localenvironmentaspect.h>
|
||||||
@@ -28,14 +28,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "desktopqtversion.h"
|
#include "desktopqtversion.h"
|
||||||
|
#include "qtsupportconstants.h"
|
||||||
|
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
|
||||||
#include <coreplugin/featureprovider.h>
|
#include <coreplugin/featureprovider.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
DesktopQtVersion::DesktopQtVersion()
|
DesktopQtVersion::DesktopQtVersion()
|
||||||
: BaseQtVersion()
|
: BaseQtVersion()
|
||||||
@@ -61,15 +61,15 @@ DesktopQtVersion *DesktopQtVersion::clone() const
|
|||||||
|
|
||||||
QString DesktopQtVersion::type() const
|
QString DesktopQtVersion::type() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::DESKTOPQT);
|
return QLatin1String(Constants::DESKTOPQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList DesktopQtVersion::warningReason() const
|
QStringList DesktopQtVersion::warningReason() const
|
||||||
{
|
{
|
||||||
QStringList ret = BaseQtVersion::warningReason();
|
QStringList ret = BaseQtVersion::warningReason();
|
||||||
if (qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
|
if (qtVersion() >= QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
|
||||||
ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
|
ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
|
||||||
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
if (qtVersion() >= QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
||||||
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -86,18 +86,18 @@ QString DesktopQtVersion::description() const
|
|||||||
|
|
||||||
Core::FeatureSet DesktopQtVersion::availableFeatures() const
|
Core::FeatureSet DesktopQtVersion::availableFeatures() const
|
||||||
{
|
{
|
||||||
Core::FeatureSet features = QtSupport::BaseQtVersion::availableFeatures();
|
Core::FeatureSet features = BaseQtVersion::availableFeatures();
|
||||||
features |= Core::FeatureSet(QtSupport::Constants::FEATURE_DESKTOP);
|
features |= Core::FeatureSet(Constants::FEATURE_DESKTOP);
|
||||||
features |= Core::Feature(QtSupport::Constants::FEATURE_QMLPROJECT);
|
features |= Core::Feature(Constants::FEATURE_QMLPROJECT);
|
||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DesktopQtVersion::platformName() const
|
QString DesktopQtVersion::platformName() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::DESKTOP_PLATFORM);
|
return QLatin1String(Constants::DESKTOP_PLATFORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DesktopQtVersion::platformDisplayName() const
|
QString DesktopQtVersion::platformDisplayName() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::DESKTOP_PLATFORM_TR);
|
return QLatin1String(Constants::DESKTOP_PLATFORM_TR);
|
||||||
}
|
}
|
||||||
@@ -30,13 +30,12 @@
|
|||||||
#ifndef DESKTOPQTVERSION_H
|
#ifndef DESKTOPQTVERSION_H
|
||||||
#define DESKTOPQTVERSION_H
|
#define DESKTOPQTVERSION_H
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include "baseqtversion.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
|
||||||
|
|
||||||
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DesktopQtVersion : public QtSupport::BaseQtVersion
|
class DesktopQtVersion : public BaseQtVersion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DesktopQtVersion();
|
DesktopQtVersion();
|
||||||
@@ -57,7 +56,7 @@ public:
|
|||||||
QString platformDisplayName() const;
|
QString platformDisplayName() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // Internal
|
||||||
}
|
} // QtSupport
|
||||||
|
|
||||||
#endif // DESKTOPQTVERSION_H
|
#endif // DESKTOPQTVERSION_H
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
DesktopQtVersionFactory::DesktopQtVersionFactory(QObject *parent)
|
DesktopQtVersionFactory::DesktopQtVersionFactory(QObject *parent)
|
||||||
: QtSupport::QtVersionFactory(parent)
|
: QtVersionFactory(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -48,10 +48,10 @@ DesktopQtVersionFactory::~DesktopQtVersionFactory()
|
|||||||
|
|
||||||
bool DesktopQtVersionFactory::canRestore(const QString &type)
|
bool DesktopQtVersionFactory::canRestore(const QString &type)
|
||||||
{
|
{
|
||||||
return type == QLatin1String(QtSupport::Constants::DESKTOPQT);
|
return type == QLatin1String(Constants::DESKTOPQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *DesktopQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
BaseQtVersion *DesktopQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
||||||
{
|
{
|
||||||
if (!canRestore(type))
|
if (!canRestore(type))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -66,7 +66,7 @@ int DesktopQtVersionFactory::priority() const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *DesktopQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
BaseQtVersion *DesktopQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
||||||
{
|
{
|
||||||
Q_UNUSED(evaluator);
|
Q_UNUSED(evaluator);
|
||||||
// we are the fallback :) so we don't care what kind of qt it is
|
// we are the fallback :) so we don't care what kind of qt it is
|
||||||
@@ -30,26 +30,25 @@
|
|||||||
#ifndef DESKTOPQTVERSIONFACTORY_H
|
#ifndef DESKTOPQTVERSIONFACTORY_H
|
||||||
#define DESKTOPQTVERSIONFACTORY_H
|
#define DESKTOPQTVERSIONFACTORY_H
|
||||||
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
#include "qtversionfactory.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager{
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DesktopQtVersionFactory : public QtSupport::QtVersionFactory
|
class DesktopQtVersionFactory : public QtVersionFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit DesktopQtVersionFactory(QObject *parent = 0);
|
explicit DesktopQtVersionFactory(QObject *parent = 0);
|
||||||
~DesktopQtVersionFactory();
|
~DesktopQtVersionFactory();
|
||||||
|
|
||||||
virtual bool canRestore(const QString &type);
|
virtual bool canRestore(const QString &type);
|
||||||
virtual QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
virtual BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
||||||
|
|
||||||
virtual int priority() const;
|
virtual int priority() const;
|
||||||
virtual QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // Qt4ProjectManager
|
} // QtSupport
|
||||||
|
|
||||||
|
|
||||||
#endif // DESKTOPQTVERSIONFACTORY_H
|
#endif // DESKTOPQTVERSIONFACTORY_H
|
||||||
@@ -30,7 +30,13 @@ HEADERS += \
|
|||||||
exampleslistmodel.h \
|
exampleslistmodel.h \
|
||||||
screenshotcropper.h \
|
screenshotcropper.h \
|
||||||
qtconfigwidget.h \
|
qtconfigwidget.h \
|
||||||
qtfeatureprovider.h
|
qtfeatureprovider.h \
|
||||||
|
desktopqtversionfactory.h \
|
||||||
|
simulatorqtversionfactory.h \
|
||||||
|
desktopqtversion.h \
|
||||||
|
simulatorqtversion.h \
|
||||||
|
winceqtversionfactory.h \
|
||||||
|
winceqtversion.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
qtsupportplugin.cpp \
|
qtsupportplugin.cpp \
|
||||||
@@ -53,7 +59,13 @@ SOURCES += \
|
|||||||
qtparser.cpp \
|
qtparser.cpp \
|
||||||
exampleslistmodel.cpp \
|
exampleslistmodel.cpp \
|
||||||
screenshotcropper.cpp \
|
screenshotcropper.cpp \
|
||||||
qtconfigwidget.cpp
|
qtconfigwidget.cpp \
|
||||||
|
desktopqtversionfactory.cpp \
|
||||||
|
simulatorqtversionfactory.cpp \
|
||||||
|
desktopqtversion.cpp \
|
||||||
|
simulatorqtversion.cpp \
|
||||||
|
winceqtversionfactory.cpp \
|
||||||
|
winceqtversion.cpp
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
QT += quick
|
QT += quick
|
||||||
|
|||||||
@@ -112,6 +112,18 @@ QtcPlugin {
|
|||||||
"images/qt_qrc.png",
|
"images/qt_qrc.png",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "QtVersion"
|
||||||
|
files: [
|
||||||
|
"desktopqtversion.cpp", "desktopqtversion.h",
|
||||||
|
"desktopqtversionfactory.cpp", "desktopqtversionfactory.h",
|
||||||
|
"simulatorqtversion.cpp", "simulatorqtversion.h",
|
||||||
|
"simulatorqtversionfactory.cpp", "simulatorqtversionfactory.h",
|
||||||
|
"winceqtversion.cpp", "winceqtversion.h",
|
||||||
|
"winceqtversionfactory.cpp", "winceqtversionfactory.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "Getting Started Welcome Page"
|
name: "Getting Started Welcome Page"
|
||||||
condition: QtcFunctions.versionIsAtLeast(Qt.core.version, "5.1")
|
condition: QtcFunctions.versionIsAtLeast(Qt.core.version, "5.1")
|
||||||
|
|||||||
@@ -30,11 +30,14 @@
|
|||||||
#include "qtsupportplugin.h"
|
#include "qtsupportplugin.h"
|
||||||
|
|
||||||
#include "customexecutablerunconfiguration.h"
|
#include "customexecutablerunconfiguration.h"
|
||||||
#include "qtoptionspage.h"
|
#include "desktopqtversionfactory.h"
|
||||||
#include "qtkitinformation.h"
|
|
||||||
#include "qtversionmanager.h"
|
|
||||||
#include "qtfeatureprovider.h"
|
#include "qtfeatureprovider.h"
|
||||||
|
#include "qtkitinformation.h"
|
||||||
|
#include "qtoptionspage.h"
|
||||||
|
#include "qtversionmanager.h"
|
||||||
|
#include "simulatorqtversionfactory.h"
|
||||||
#include "uicodemodelsupport.h"
|
#include "uicodemodelsupport.h"
|
||||||
|
#include "winceqtversionfactory.h"
|
||||||
|
|
||||||
#include "profilereader.h"
|
#include "profilereader.h"
|
||||||
|
|
||||||
@@ -70,6 +73,9 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
addAutoReleasedObject(new QtVersionManager);
|
addAutoReleasedObject(new QtVersionManager);
|
||||||
|
addAutoReleasedObject(new DesktopQtVersionFactory);
|
||||||
|
addAutoReleasedObject(new SimulatorQtVersionFactory);
|
||||||
|
addAutoReleasedObject(new WinCeQtVersionFactory);
|
||||||
addAutoReleasedObject(new UiCodeModelManager);
|
addAutoReleasedObject(new UiCodeModelManager);
|
||||||
|
|
||||||
QtFeatureProvider *featureMgr = new QtFeatureProvider;
|
QtFeatureProvider *featureMgr = new QtFeatureProvider;
|
||||||
|
|||||||
@@ -28,23 +28,23 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "simulatorqtversion.h"
|
#include "simulatorqtversion.h"
|
||||||
|
#include "qtsupportconstants.h"
|
||||||
|
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
|
||||||
#include <coreplugin/featureprovider.h>
|
#include <coreplugin/featureprovider.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
SimulatorQtVersion::SimulatorQtVersion()
|
SimulatorQtVersion::SimulatorQtVersion()
|
||||||
: QtSupport::BaseQtVersion()
|
: BaseQtVersion()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimulatorQtVersion::SimulatorQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
|
SimulatorQtVersion::SimulatorQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
|
||||||
: QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource)
|
: BaseQtVersion(path, isAutodetected, autodetectionSource)
|
||||||
{
|
{
|
||||||
setDisplayName(defaultDisplayName(qtVersionString(), path, false));
|
setDisplayName(defaultDisplayName(qtVersionString(), path, false));
|
||||||
}
|
}
|
||||||
@@ -61,15 +61,15 @@ SimulatorQtVersion *SimulatorQtVersion::clone() const
|
|||||||
|
|
||||||
QString SimulatorQtVersion::type() const
|
QString SimulatorQtVersion::type() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::SIMULATORQT);
|
return QLatin1String(Constants::SIMULATORQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList SimulatorQtVersion::warningReason() const
|
QStringList SimulatorQtVersion::warningReason() const
|
||||||
{
|
{
|
||||||
QStringList ret = BaseQtVersion::warningReason();
|
QStringList ret = BaseQtVersion::warningReason();
|
||||||
if (qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
|
if (qtVersion() >= QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
|
||||||
ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
|
ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
|
||||||
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
if (qtVersion() >= QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
||||||
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -87,9 +87,8 @@ QString SimulatorQtVersion::description() const
|
|||||||
|
|
||||||
Core::FeatureSet SimulatorQtVersion::availableFeatures() const
|
Core::FeatureSet SimulatorQtVersion::availableFeatures() const
|
||||||
{
|
{
|
||||||
Core::FeatureSet features = QtSupport::BaseQtVersion::availableFeatures();
|
Core::FeatureSet features = BaseQtVersion::availableFeatures();
|
||||||
features |= Core::FeatureSet(QtSupport::Constants::FEATURE_MOBILE);
|
features |= Core::FeatureSet(Constants::FEATURE_MOBILE);
|
||||||
|
|
||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,13 +30,12 @@
|
|||||||
#ifndef SIMULATORQTVERSION_H
|
#ifndef SIMULATORQTVERSION_H
|
||||||
#define SIMULATORQTVERSION_H
|
#define SIMULATORQTVERSION_H
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include "baseqtversion.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager{
|
|
||||||
|
|
||||||
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class SimulatorQtVersion : public QtSupport::BaseQtVersion
|
class SimulatorQtVersion : public BaseQtVersion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SimulatorQtVersion();
|
SimulatorQtVersion();
|
||||||
@@ -56,7 +55,7 @@ public:
|
|||||||
bool supportsPlatform(const QString &platformName) const;
|
bool supportsPlatform(const QString &platformName) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // Internal
|
||||||
}
|
} // QtSupport
|
||||||
|
|
||||||
#endif // SIMULATORQTVERSION_H
|
#endif // SIMULATORQTVERSION_H
|
||||||
@@ -29,14 +29,13 @@
|
|||||||
|
|
||||||
#include "simulatorqtversionfactory.h"
|
#include "simulatorqtversionfactory.h"
|
||||||
#include "simulatorqtversion.h"
|
#include "simulatorqtversion.h"
|
||||||
|
#include "qtsupportconstants.h"
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include "profilereader.h"
|
||||||
#include <qtsupport/profilereader.h>
|
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
SimulatorQtVersionFactory::SimulatorQtVersionFactory(QObject *parent)
|
SimulatorQtVersionFactory::SimulatorQtVersionFactory(QObject *parent)
|
||||||
: QtVersionFactory(parent)
|
: QtVersionFactory(parent)
|
||||||
@@ -51,14 +50,14 @@ SimulatorQtVersionFactory::~SimulatorQtVersionFactory()
|
|||||||
|
|
||||||
bool SimulatorQtVersionFactory::canRestore(const QString &type)
|
bool SimulatorQtVersionFactory::canRestore(const QString &type)
|
||||||
{
|
{
|
||||||
return type == QLatin1String(QtSupport::Constants::SIMULATORQT);
|
return type == QLatin1String(Constants::SIMULATORQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *SimulatorQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
BaseQtVersion *SimulatorQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
||||||
{
|
{
|
||||||
if (!canRestore(type))
|
if (!canRestore(type))
|
||||||
return 0;
|
return 0;
|
||||||
QtSupport::BaseQtVersion *v = new SimulatorQtVersion;
|
BaseQtVersion *v = new SimulatorQtVersion;
|
||||||
v->fromMap(data);
|
v->fromMap(data);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
@@ -69,7 +68,7 @@ int SimulatorQtVersionFactory::priority() const
|
|||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *SimulatorQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
BaseQtVersion *SimulatorQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
||||||
{
|
{
|
||||||
QFileInfo fi = qmakePath.toFileInfo();
|
QFileInfo fi = qmakePath.toFileInfo();
|
||||||
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
|
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
|
||||||
@@ -30,26 +30,25 @@
|
|||||||
#ifndef SIMULATORQTVERSIONFACTORY_H
|
#ifndef SIMULATORQTVERSIONFACTORY_H
|
||||||
#define SIMULATORQTVERSIONFACTORY_H
|
#define SIMULATORQTVERSIONFACTORY_H
|
||||||
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
#include "qtversionfactory.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class SimulatorQtVersionFactory : public QtSupport::QtVersionFactory
|
class SimulatorQtVersionFactory : public QtVersionFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SimulatorQtVersionFactory(QObject *parent = 0);
|
explicit SimulatorQtVersionFactory(QObject *parent = 0);
|
||||||
~SimulatorQtVersionFactory();
|
~SimulatorQtVersionFactory();
|
||||||
|
|
||||||
virtual bool canRestore(const QString &type);
|
virtual bool canRestore(const QString &type);
|
||||||
virtual QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
virtual BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
||||||
|
|
||||||
virtual int priority() const;
|
virtual int priority() const;
|
||||||
virtual QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // Qt4ProjectManager
|
} // QtSupport
|
||||||
|
|
||||||
|
|
||||||
#endif // SIMULATORQTVERSIONFACTORY_H
|
#endif // SIMULATORQTVERSIONFACTORY_H
|
||||||
@@ -28,23 +28,24 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "winceqtversion.h"
|
#include "winceqtversion.h"
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include "qtsupportconstants.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
WinCeQtVersion::WinCeQtVersion()
|
WinCeQtVersion::WinCeQtVersion()
|
||||||
: QtSupport::BaseQtVersion(),
|
: BaseQtVersion(),
|
||||||
m_archType(ProjectExplorer::Abi::ArmArchitecture)
|
m_archType(ProjectExplorer::Abi::ArmArchitecture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
WinCeQtVersion::WinCeQtVersion(const Utils::FileName &path, const QString &archType,
|
WinCeQtVersion::WinCeQtVersion(const Utils::FileName &path, const QString &archType,
|
||||||
bool isAutodetected, const QString &autodetectionSource)
|
bool isAutodetected, const QString &autodetectionSource)
|
||||||
: QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource),
|
: BaseQtVersion(path, isAutodetected, autodetectionSource),
|
||||||
m_archType(ProjectExplorer::Abi::ArmArchitecture)
|
m_archType(ProjectExplorer::Abi::ArmArchitecture)
|
||||||
{
|
{
|
||||||
if (0 == archType.compare(QLatin1String("x86"), Qt::CaseInsensitive))
|
if (0 == archType.compare(QLatin1String("x86"), Qt::CaseInsensitive))
|
||||||
m_archType = ProjectExplorer::Abi::X86Architecture;
|
m_archType = ProjectExplorer::Abi::X86Architecture;
|
||||||
@@ -64,7 +65,7 @@ WinCeQtVersion *WinCeQtVersion::clone() const
|
|||||||
|
|
||||||
QString WinCeQtVersion::type() const
|
QString WinCeQtVersion::type() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::WINCEQT);
|
return QLatin1String(Constants::WINCEQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Abi> WinCeQtVersion::detectQtAbis() const
|
QList<ProjectExplorer::Abi> WinCeQtVersion::detectQtAbis() const
|
||||||
@@ -80,7 +81,7 @@ QList<ProjectExplorer::Abi> WinCeQtVersion::detectQtAbis() const
|
|||||||
QString WinCeQtVersion::description() const
|
QString WinCeQtVersion::description() const
|
||||||
{
|
{
|
||||||
return QCoreApplication::translate("QtVersion",
|
return QCoreApplication::translate("QtVersion",
|
||||||
"Qt for WinCE", "Qt Version is meant for WinCE");
|
"Qt for WinCE", "Qt Version is meant for WinCE");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinCeQtVersion::fromMap(const QVariantMap &map)
|
void WinCeQtVersion::fromMap(const QVariantMap &map)
|
||||||
@@ -104,10 +105,10 @@ void WinCeQtVersion::fromMap(const QVariantMap &map)
|
|||||||
|
|
||||||
QString WinCeQtVersion::platformName() const
|
QString WinCeQtVersion::platformName() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::WINDOWS_CE_PLATFORM);
|
return QLatin1String(Constants::WINDOWS_CE_PLATFORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString WinCeQtVersion::platformDisplayName() const
|
QString WinCeQtVersion::platformDisplayName() const
|
||||||
{
|
{
|
||||||
return QLatin1String(QtSupport::Constants::WINDOWS_CE_PLATFORM_TR);
|
return QLatin1String(Constants::WINDOWS_CE_PLATFORM_TR);
|
||||||
}
|
}
|
||||||
@@ -30,17 +30,17 @@
|
|||||||
#ifndef WINCEQTVERSION_H
|
#ifndef WINCEQTVERSION_H
|
||||||
#define WINCEQTVERSION_H
|
#define WINCEQTVERSION_H
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include "baseqtversion.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class WinCeQtVersion : public QtSupport::BaseQtVersion
|
class WinCeQtVersion : public BaseQtVersion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinCeQtVersion();
|
WinCeQtVersion();
|
||||||
WinCeQtVersion(const Utils::FileName &path, const QString &archType,
|
WinCeQtVersion(const Utils::FileName &path, const QString &archType,
|
||||||
bool isAutodetected = false, const QString &autodetectionSource = QString());
|
bool isAutodetected = false, const QString &autodetectionSource = QString());
|
||||||
~WinCeQtVersion();
|
~WinCeQtVersion();
|
||||||
WinCeQtVersion *clone() const;
|
WinCeQtVersion *clone() const;
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ private:
|
|||||||
ProjectExplorer::Abi::Architecture m_archType;
|
ProjectExplorer::Abi::Architecture m_archType;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // Internal
|
||||||
} // namespace Qt4ProjectManager
|
} // QtSupport
|
||||||
|
|
||||||
#endif // WINCEQTVERSION_H
|
#endif // WINCEQTVERSION_H
|
||||||
@@ -29,12 +29,13 @@
|
|||||||
|
|
||||||
#include "winceqtversionfactory.h"
|
#include "winceqtversionfactory.h"
|
||||||
#include "winceqtversion.h"
|
#include "winceqtversion.h"
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include "qtsupportconstants.h"
|
||||||
#include <qtsupport/profilereader.h>
|
#include "profilereader.h"
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
WinCeQtVersionFactory::WinCeQtVersionFactory(QObject *parent)
|
WinCeQtVersionFactory::WinCeQtVersionFactory(QObject *parent)
|
||||||
: QtVersionFactory(parent)
|
: QtVersionFactory(parent)
|
||||||
@@ -49,10 +50,10 @@ WinCeQtVersionFactory::~WinCeQtVersionFactory()
|
|||||||
|
|
||||||
bool WinCeQtVersionFactory::canRestore(const QString &type)
|
bool WinCeQtVersionFactory::canRestore(const QString &type)
|
||||||
{
|
{
|
||||||
return type == QLatin1String(QtSupport::Constants::WINCEQT);
|
return type == QLatin1String(Constants::WINCEQT);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *WinCeQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
BaseQtVersion *WinCeQtVersionFactory::restore(const QString &type, const QVariantMap &data)
|
||||||
{
|
{
|
||||||
if (!canRestore(type))
|
if (!canRestore(type))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -66,7 +67,7 @@ int WinCeQtVersionFactory::priority() const
|
|||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *WinCeQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
BaseQtVersion *WinCeQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
||||||
{
|
{
|
||||||
QFileInfo fi = qmakePath.toFileInfo();
|
QFileInfo fi = qmakePath.toFileInfo();
|
||||||
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
|
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
|
||||||
@@ -30,28 +30,28 @@
|
|||||||
#ifndef WINCEQTVERSIONFACTORY_H
|
#ifndef WINCEQTVERSIONFACTORY_H
|
||||||
#define WINCEQTVERSIONFACTORY_H
|
#define WINCEQTVERSIONFACTORY_H
|
||||||
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
#include "qtversionfactory.h"
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace QtSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class WinCeQtVersionFactory : public QtSupport::QtVersionFactory
|
class WinCeQtVersionFactory : public QtVersionFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit WinCeQtVersionFactory(QObject *parent = 0);
|
explicit WinCeQtVersionFactory(QObject *parent = 0);
|
||||||
~WinCeQtVersionFactory();
|
~WinCeQtVersionFactory();
|
||||||
|
|
||||||
virtual bool canRestore(const QString &type);
|
virtual bool canRestore(const QString &type);
|
||||||
virtual QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
virtual BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
||||||
|
|
||||||
virtual int priority() const;
|
virtual int priority() const;
|
||||||
|
|
||||||
virtual QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
||||||
bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // Qt4ProjectManager
|
} // QtSupport
|
||||||
|
|
||||||
#endif // WINCEQTVERSIONFACTORY_H
|
#endif // WINCEQTVERSIONFACTORY_H
|
||||||
Reference in New Issue
Block a user