diff options
author | dt <qtc-committer@nokia.com> | 2011-05-20 21:40:53 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@nokia.com> | 2011-05-24 18:35:11 +0200 |
commit | 754be1bcfcd22e41f591ae78642605f639b075b1 (patch) | |
tree | a0f0d1f36165bacede673a13ed26904dc04f3970 /src/plugins | |
parent | dcd34febabccdcb96fc7963172cba270e20aa483 (diff) | |
download | qt-creator-754be1bcfcd22e41f591ae78642605f639b075b1.tar.gz |
Move a lot of qmake independent classes to a new plugin qtsupport
Also adjust qmldumptool to remove the dependency on qt4project/qmlproject, by
passing in the qtversion instead of figuring it out in qmldumptool.
Change-Id: Ie6ac582d36bfef290313c0716b33b62fcf42630c
Reviewed-on: http://codereview.qt.nokia.com/70
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins')
130 files changed, 1064 insertions, 723 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index dd0ffa47b1..da594aecbf 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -96,7 +96,7 @@ #include <projectexplorer/target.h> #include <projectexplorer/abi.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <qtsupport/qtsupportconstants.h> #include <texteditor/basetexteditor.h> #include <texteditor/fontsettings.h> @@ -2326,8 +2326,8 @@ void DebuggerPluginPrivate::showQtDumperLibraryWarning(const QString &details) dialog.exec(); if (dialog.clickedButton() == qtPref) { ICore::instance()->showOptionsDialog( - _(Qt4ProjectManager::Constants::QT_SETTINGS_CATEGORY), - _(Qt4ProjectManager::Constants::QTVERSION_SETTINGS_PAGE_ID)); + _(QtSupport::Constants::QT_SETTINGS_CATEGORY), + _(QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID)); } else if (dialog.clickedButton() == helperOff) { action(UseDebuggingHelpers)->setValue(qVariantFromValue(false), false); } diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index aaee326ce1..02f6b3e425 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -18,6 +18,7 @@ SUBDIRS = plugin_coreplugin \ plugin_git \ plugin_cvs \ plugin_cpptools \ + plugin_qtsupport \ plugin_qt4projectmanager \ plugin_locator \ plugin_debugger \ @@ -138,9 +139,13 @@ plugin_projectexplorer.depends += plugin_find plugin_projectexplorer.depends += plugin_coreplugin plugin_projectexplorer.depends += plugin_texteditor +plugin_qtsupport.subdir = qtsupport +plugin_qtsupport.depends = plugin_projectexplorer + plugin_qt4projectmanager.subdir = qt4projectmanager plugin_qt4projectmanager.depends = plugin_texteditor plugin_qt4projectmanager.depends += plugin_projectexplorer +plugin_qt4projectmanager.depends += plugin_qtsupport plugin_qt4projectmanager.depends += plugin_cpptools plugin_qt4projectmanager.depends += plugin_debugger plugin_qt4projectmanager.depends += plugin_qmljseditor @@ -217,7 +222,7 @@ plugin_qmlprojectmanager.depends = plugin_texteditor plugin_qmlprojectmanager.depends += plugin_projectexplorer plugin_qmlprojectmanager.depends += plugin_qmljseditor plugin_qmlprojectmanager.depends += plugin_debugger -plugin_qmlprojectmanager.depends += plugin_qt4projectmanager +plugin_qmlprojectmanager.depends += plugin_qtsupport plugin_qmldesigner.subdir = qmldesigner plugin_qmldesigner.depends = plugin_coreplugin diff --git a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in index 4aa9b48658..63e145ab0a 100644 --- a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in +++ b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in @@ -18,6 +18,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"QmlJSEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Debugger\" version=\"$$QTCREATOR_VERSION\" /> - <dependency name=\"Qt4ProjectManager\" version=\"$$QTCREATOR_VERSION\" /> + <dependency name=\"QtSupport\" version=\"$$QTCREATOR_VERSION\" /> </dependencyList> </plugin> diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 617a0e8983..f8b184368f 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -41,8 +41,9 @@ #include <coreplugin/icore.h> #include <coreplugin/messagemanager.h> #include <extensionsystem/pluginmanager.h> -#include <qt4projectmanager/qmldumptool.h> -#include <qt4projectmanager/baseqtversion.h> +#include <qtsupport/qmldumptool.h> +#include <qtsupport/baseqtversion.h> +#include <qtsupport/qtversionmanager.h> #include <qmljs/qmljsmodelmanagerinterface.h> #include <utils/fileutils.h> @@ -142,7 +143,10 @@ void QmlProject::refresh(RefreshOptions options) QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); pinfo.sourceFiles = files(); pinfo.importPaths = importPaths(); - Qt4ProjectManager::QmlDumpTool::pathAndEnvironment(this, false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment); + QtSupport::BaseQtVersion *version = 0; + if (QmlProjectRunConfiguration *rc = qobject_cast<QmlProjectRunConfiguration *>(activeTarget()->activeRunConfiguration())) + version = rc->qtVersion(); + QtSupport::QmlDumpTool::pathAndEnvironment(this, version, false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment); m_modelManager->updateProjectInfo(pinfo); } @@ -192,7 +196,7 @@ QStringList QmlProject::importPaths() const const QmlProjectRunConfiguration *runConfig = qobject_cast<QmlProjectRunConfiguration*>(activeTarget()->activeRunConfiguration()); if (runConfig) { - const Qt4ProjectManager::BaseQtVersion *qtVersion = runConfig->qtVersion(); + const QtSupport::BaseQtVersion *qtVersion = runConfig->qtVersion(); if (qtVersion && qtVersion->isValid()) { const QString qtVersionImportPath = qtVersion->versionInfo().value("QT_INSTALL_IMPORTS"); if (!qtVersionImportPath.isEmpty()) diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp index b7adec4218..b82c7c90fc 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp @@ -36,7 +36,7 @@ #include <coreplugin/coreconstants.h> #include <projectexplorer/customwizard/customwizard.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <qtsupport/qtsupportconstants.h> #include <QtGui/QIcon> @@ -67,7 +67,7 @@ QmlProjectApplicationWizard::~QmlProjectApplicationWizard() Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters() { Core::BaseFileWizardParameters parameters(ProjectWizard); - parameters.setIcon(QIcon(QLatin1String(Qt4ProjectManager::Constants::QML_WIZARD_ICON))); + parameters.setIcon(QIcon(QLatin1String(QtSupport::Constants::QML_WIZARD_ICON))); parameters.setDisplayName(tr("Qt Quick UI")); parameters.setId(QLatin1String("QB.QML Application")); @@ -76,9 +76,9 @@ Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters() "You can review Qt Quick UI projects in the QML Viewer and you need not build them. " "You do not need to have the development environment installed " "on your computer to create and run this type of projects.")); - parameters.setCategory(QLatin1String(Qt4ProjectManager::Constants::QML_WIZARD_CATEGORY)); - parameters.setDisplayCategory(QCoreApplication::translate(Qt4ProjectManager::Constants::QML_WIZARD_TR_SCOPE, - Qt4ProjectManager::Constants::QML_WIZARD_TR_CATEGORY)); + parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY)); + parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE, + QtSupport::Constants::QML_WIZARD_TR_CATEGORY)); return parameters; } diff --git a/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri b/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri index 9cdedcd2c3..24a66d37a2 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri +++ b/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri @@ -2,4 +2,4 @@ include(../../plugins/projectexplorer/projectexplorer.pri) include(../../plugins/texteditor/texteditor.pri) include(../../plugins/qmljseditor/qmljseditor.pri) include(../../plugins/debugger/debugger.pri) -include(../../plugins/qt4projectmanager/qt4projectmanager.pri) +include(../../plugins/qtsupport/qtsupport.pri) diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index b621cea496..7bd9f526e1 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -41,9 +41,9 @@ #include <coreplugin/icore.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> -#include <qt4projectmanager/qtversionmanager.h> -#include <qt4projectmanager/qtoutputformatter.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <qtsupport/qtversionmanager.h> +#include <qtsupport/qtoutputformatter.h> +#include <qtsupport/qtsupportconstants.h> #ifdef Q_OS_WIN #include <utils/winutils.h> @@ -52,7 +52,7 @@ using Core::EditorManager; using Core::ICore; using Core::IEditor; -using Qt4ProjectManager::QtVersionManager; +using QtSupport::QtVersionManager; using namespace QmlProjectManager::Internal; @@ -120,7 +120,7 @@ QmlProjectTarget *QmlProjectRunConfiguration::qmlTarget() const QString QmlProjectRunConfiguration::viewerPath() const { - Qt4ProjectManager::BaseQtVersion *version = qtVersion(); + QtSupport::BaseQtVersion *version = qtVersion(); if (!version) { return QString(); } else { @@ -130,7 +130,7 @@ QString QmlProjectRunConfiguration::viewerPath() const QString QmlProjectRunConfiguration::observerPath() const { - Qt4ProjectManager::BaseQtVersion *version = qtVersion(); + QtSupport::BaseQtVersion *version = qtVersion(); if (!version) { return QString(); } else { @@ -195,13 +195,13 @@ QString QmlProjectRunConfiguration::canonicalCapsPath(const QString &fileName) } -Qt4ProjectManager::BaseQtVersion *QmlProjectRunConfiguration::qtVersion() const +QtSupport::BaseQtVersion *QmlProjectRunConfiguration::qtVersion() const { if (m_qtVersionId == -1) return 0; - QtVersionManager *versionManager = QtVersionManager::instance(); - Qt4ProjectManager::BaseQtVersion *version = versionManager->version(m_qtVersionId); + QtSupport::QtVersionManager *versionManager = QtSupport::QtVersionManager::instance(); + QtSupport::BaseQtVersion *version = versionManager->version(m_qtVersionId); QTC_ASSERT(version, return 0); return version; @@ -216,7 +216,7 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget() Utils::OutputFormatter *QmlProjectRunConfiguration::createOutputFormatter() const { - return new Qt4ProjectManager::QtOutputFormatter(qmlTarget()->qmlProject()); + return new QtSupport::QtOutputFormatter(qmlTarget()->qmlProject()); } QmlProjectRunConfiguration::MainScriptSource QmlProjectRunConfiguration::mainScriptSource() const @@ -383,7 +383,7 @@ void QmlProjectRunConfiguration::updateQtVersions() || !isValidVersion(qtVersions->version(m_qtVersionId))) { int newVersionId = -1; // take first one you find - foreach (Qt4ProjectManager::BaseQtVersion *version, qtVersions->validVersions()) { + foreach (QtSupport::BaseQtVersion *version, qtVersions->validVersions()) { if (isValidVersion(version)) { newVersionId = version->uniqueId(); break; @@ -395,11 +395,11 @@ void QmlProjectRunConfiguration::updateQtVersions() updateEnabled(); } -bool QmlProjectRunConfiguration::isValidVersion(Qt4ProjectManager::BaseQtVersion *version) +bool QmlProjectRunConfiguration::isValidVersion(QtSupport::BaseQtVersion *version) { if (version - && (version->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID) - || version->supportsTargetId(Qt4ProjectManager::Constants::QT_SIMULATOR_TARGET_ID)) + && (version->type() == QtSupport::Constants::DESKTOPQT + || version->type() == QtSupport::Constants::SIMULATORQT) && !version->qmlviewerCommand().isEmpty()) { return true; } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h index 66058bda53..53462d57b7 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h @@ -50,7 +50,7 @@ namespace Utils { class EnvironmentItem; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; } @@ -82,7 +82,7 @@ public: QString viewerArguments() const; QString workingDirectory() const; int qtVersionId() const; - Qt4ProjectManager::BaseQtVersion *qtVersion() const; + QtSupport::BaseQtVersion *qtVersion() const; enum MainScriptSource { FileInEditor, @@ -119,7 +119,7 @@ protected: private: void ctor(); - static bool isValidVersion(Qt4ProjectManager::BaseQtVersion *version); + static bool isValidVersion(QtSupport::BaseQtVersion *version); void setQtVersionId(int id); static QString canonicalCapsPath(const QString &filePath); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp index 10c897ca22..08821eccde 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp @@ -43,8 +43,8 @@ #include <utils/detailswidget.h> #include <utils/environment.h> #include <utils/qtcassert.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> -#include <qt4projectmanager/qtversionmanager.h> +#include <qtsupport/qtsupportconstants.h> +#include <qtsupport/qtversionmanager.h> #include <QtGui/QLineEdit> #include <QtGui/QComboBox> @@ -55,7 +55,7 @@ using Core::ICore; using Utils::DebuggerLanguageChooser; -using Qt4ProjectManager::QtVersionManager; +using QtSupport::QtVersionManager; namespace QmlProjectManager { namespace Internal { @@ -280,8 +280,8 @@ void QmlProjectRunConfigurationWidget::qmlDebugServerPortChanged(uint port) void QmlProjectRunConfigurationWidget::manageQtVersions() { ICore *core = ICore::instance(); - core->showOptionsDialog(Qt4ProjectManager::Constants::QT_SETTINGS_CATEGORY, - Qt4ProjectManager::Constants::QTVERSION_SETTINGS_PAGE_ID); + core->showOptionsDialog(QtSupport::Constants::QT_SETTINGS_CATEGORY, + QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID); } void QmlProjectRunConfigurationWidget::updateQtVersionComboBox() @@ -289,7 +289,7 @@ void QmlProjectRunConfigurationWidget::updateQtVersionComboBox() m_qtVersionComboBox->clear(); QtVersionManager *qtVersions = QtVersionManager::instance(); - foreach (Qt4ProjectManager::BaseQtVersion *version, qtVersions->validVersions()) { + foreach (QtSupport::BaseQtVersion *version, qtVersions->validVersions()) { if (m_runConfiguration->isValidVersion(version)) { m_qtVersionComboBox->addItem(version->displayName(), version->uniqueId()); } diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp index 058b215d7d..1a00a9f0dd 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp @@ -39,7 +39,7 @@ #include <projectexplorer/applicationlauncher.h> #include <projectexplorer/target.h> #include <projectexplorer/project.h> -#include <qt4projectmanager/qtversionmanager.h> +#include <qtsupport/qtversionmanager.h> #include <utils/environment.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> @@ -50,9 +50,9 @@ #include <debugger/debuggerengine.h> #include <debugger/debuggerstartparameters.h> #include <qmljsinspector/qmljsinspectorconstants.h> -#include <qt4projectmanager/qtversionmanager.h> -#include <qt4projectmanager/qmlobservertool.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <qtsupport/qtversionmanager.h> +#include <qtsupport/qmlobservertool.h> +#include <qtsupport/qtsupportconstants.h> #include <QtGui/QApplication> #include <QtGui/QLabel> @@ -163,7 +163,7 @@ bool QmlProjectRunControlFactory::canRun(RunConfiguration *runConfiguration, if (!(config->qtVersion() && config->qtVersion()->needsQmlDebuggingLibrary()) || !config->observerPath().isEmpty()) return true; - if (config->qtVersion() && Qt4ProjectManager::QmlObserverTool::canBuild(config->qtVersion())) + if (config->qtVersion() && QtSupport::QmlObserverTool::canBuild(config->qtVersion())) return true; } @@ -236,8 +236,8 @@ void QmlProjectRunControlFactory::showQmlObserverToolWarning() dialog.exec(); if (dialog.clickedButton() == qtPref) { Core::ICore::instance()->showOptionsDialog( - Qt4ProjectManager::Constants::QT_SETTINGS_CATEGORY, - Qt4ProjectManager::Constants::QTVERSION_SETTINGS_PAGE_ID); + QtSupport::Constants::QT_SETTINGS_CATEGORY, + QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID); } } diff --git a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in b/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in index c23450aecc..2d55c385e6 100644 --- a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in +++ b/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in @@ -16,6 +16,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General <dependencyList> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> + <dependency name=\"QtSupport\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Debugger\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Designer\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/> diff --git a/src/plugins/qt4projectmanager/buildconfigurationinfo.h b/src/plugins/qt4projectmanager/buildconfigurationinfo.h index 57b81c5ffe..b9795497c9 100644 --- a/src/plugins/qt4projectmanager/buildconfigurationinfo.h +++ b/src/plugins/qt4projectmanager/buildconfigurationinfo.h @@ -33,15 +33,16 @@ #ifndef BUILDCONFIGURATIONINFO_H #define BUILDCONFIGURATIONINFO_H -#include "qtversionmanager.h" +#include "qt4projectmanager_global.h" +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager { struct QT4PROJECTMANAGER_EXPORT BuildConfigurationInfo { explicit BuildConfigurationInfo() - : version(0), buildConfig(BaseQtVersion::QmakeBuildConfig(0)), importing(false), temporaryQtVersion(false) + : version(0), buildConfig(QtSupport::BaseQtVersion::QmakeBuildConfig(0)), importing(false), temporaryQtVersion(false) {} - explicit BuildConfigurationInfo(BaseQtVersion *v, BaseQtVersion::QmakeBuildConfigs bc, + explicit BuildConfigurationInfo(QtSupport::BaseQtVersion *v, QtSupport::BaseQtVersion::QmakeBuildConfigs bc, const QString &aa, const QString &d, bool importing_ = false, bool temporaryQtVersion_ = false) : version(v), buildConfig(bc), additionalArguments(aa), directory(d), importing(importing_), temporaryQtVersion(temporaryQtVersion_) { } @@ -51,8 +52,8 @@ struct QT4PROJECTMANAGER_EXPORT BuildConfigurationInfo { return version != 0; } - BaseQtVersion *version; - BaseQtVersion::QmakeBuildConfigs buildConfig; + QtSupport::BaseQtVersion *version; + QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig; QString additionalArguments; QString directory; bool importing; diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qt4projectmanager/externaleditors.cpp index 7721dbe36f..66eb2f1944 100644 --- a/src/plugins/qt4projectmanager/externaleditors.cpp +++ b/src/plugins/qt4projectmanager/externaleditors.cpp @@ -33,12 +33,12 @@ #include "externaleditors.h" #include "qt4project.h" #include "qt4projectmanagerconstants.h" -#include "qtversionmanager.h" #include "qt4buildconfiguration.h" #include <utils/synchronousprocess.h> #include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> +#include <qtsupport/qtversionmanager.h> #include <designer/designerconstants.h> #include <QtCore/QProcess> @@ -146,7 +146,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName, !project->activeTarget()->activeBuildConfiguration()) return false; Qt4BuildConfiguration *qt4bc = project->activeTarget()->activeBuildConfiguration(); - BaseQtVersion *qtVersion = qt4bc->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion(); if (!qtVersion) return false; @@ -198,7 +198,7 @@ LinguistExternalEditor::LinguistExternalEditor(QObject *parent) : bool LinguistExternalEditor::startEditor(const QString &fileName, QString *errorMessage) { EditorLaunchData data; - return getEditorLaunchData(fileName, &BaseQtVersion::linguistCommand, + return getEditorLaunchData(fileName, &QtSupport::BaseQtVersion::linguistCommand, QLatin1String(linguistBinaryC), QStringList(), true, &data, errorMessage) && startEditorProcess(data, errorMessage); @@ -216,7 +216,7 @@ MacDesignerExternalEditor::MacDesignerExternalEditor(QObject *parent) : bool MacDesignerExternalEditor::startEditor(const QString &fileName, QString *errorMessage) { EditorLaunchData data; - return getEditorLaunchData(fileName, &BaseQtVersion::designerCommand, + return getEditorLaunchData(fileName, &QtSupport::BaseQtVersion::designerCommand, QLatin1String(designerBinaryC), QStringList(), true, &data, errorMessage) && startEditorProcess(data, errorMessage); @@ -252,7 +252,7 @@ bool DesignerExternalEditor::startEditor(const QString &fileName, QString *error { EditorLaunchData data; // Find the editor binary - if (!getEditorLaunchData(fileName, &BaseQtVersion::designerCommand, + if (!getEditorLaunchData(fileName, &QtSupport::BaseQtVersion::designerCommand, QLatin1String(designerBinaryC), QStringList(), false, &data, errorMessage)) { return false; diff --git a/src/plugins/qt4projectmanager/externaleditors.h b/src/plugins/qt4projectmanager/externaleditors.h index 9a4703c8d5..233f7b52c5 100644 --- a/src/plugins/qt4projectmanager/externaleditors.h +++ b/src/plugins/qt4projectmanager/externaleditors.h @@ -44,9 +44,12 @@ class QTcpSocket; class QSignalMapper; QT_END_NAMESPACE +namespace QtSupport { +class BaseQtVersion; +} + namespace Qt4ProjectManager { -class BaseQtVersion; namespace Internal { @@ -66,7 +69,7 @@ public: protected: // Method pointer for a QtVersion method return a string (command) - typedef QString (BaseQtVersion::*QtVersionCommandAccessor)() const; + typedef QString (QtSupport::BaseQtVersion::*QtVersionCommandAccessor)() const; // Data required to launch the editor struct EditorLaunchData { diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index bba86b7e28..edbe033aa2 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -39,8 +39,7 @@ #include "qt4projectmanagerconstants.h" #include "qt4projectmanager.h" #include "qt4target.h" -#include "qtversionmanager.h" -#include "debugginghelperbuildtask.h" +#include "qt4basetargetfactory.h" #include "ui_showbuildlog.h" #include <projectexplorer/buildsteplist.h> @@ -49,6 +48,8 @@ #include <coreplugin/icore.h> #include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/messagemanager.h> +#include <qtsupport/qtversionmanager.h> +#include <qtsupport/debugginghelperbuildtask.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> @@ -210,7 +211,7 @@ QStringList QMakeStep::moreArguments() bool QMakeStep::init() { Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration(); - const BaseQtVersion *qtVersion = qt4bc->qtVersion(); + const QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion(); if (!qtVersion) return false; @@ -242,7 +243,7 @@ bool QMakeStep::init() } if (QFileInfo(makefile).exists()) { - QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(makefile); + QString qmakePath = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(makefile); if (qtVersion->qmakeCommand() == qmakePath) { m_needToRunQMake = !qt4bc->compareToImportFrom(makefile); } @@ -268,7 +269,13 @@ bool QMakeStep::init() node = qt4bc->subNodeBuild(); QString proFile = node->path(); - m_tasks = qt4BuildConfiguration()->qtVersion()->reportIssues(proFile, workingDirectory, true); + QtSupport::BaseQtVersion *version = qt4BuildConfiguration()->qtVersion(); + m_tasks = version->reportIssues(proFile, workingDirectory); + + foreach (Qt4BaseTargetFactory *factory, Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(version->supportedTargetIds().toList())) + m_tasks.append(factory->reportIssues(proFile)); + qSort(m_tasks); + m_scriptTemplate = node->projectType() == ScriptTemplate; return AbstractProcessStep::init(); @@ -352,7 +359,7 @@ void QMakeStep::setUserArguments(const QString &arguments) bool QMakeStep::isQmlDebuggingLibrarySupported(QString *reason) const { - BaseQtVersion *version = qt4BuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *version = qt4BuildConfiguration()->qtVersion(); if (!version) { if (reason) *reason = tr("No Qt version."); @@ -378,7 +385,7 @@ bool QMakeStep::isQmlDebuggingLibrarySupported(QString *reason) const return false; } - if (version->qtVersion() < QtVersionNumber(4, 7, 1)) { + if (version->qtVersion() < QtSupport::QtVersionNumber(4, 7, 1)) { if (reason) *reason = tr("Requires Qt 4.7.1 or newer."); return false; @@ -479,7 +486,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step) this, SLOT(qtVersionChanged())); connect(step->qt4BuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(qmakeBuildConfigChanged())); - connect(QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(QString)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(QString)), this, SLOT(qtVersionsDumpUpdated(QString))); } @@ -514,7 +521,7 @@ void QMakeStepConfigWidget::qtVersionChanged() void QMakeStepConfigWidget::qtVersionsDumpUpdated(const QString &qmakeCommand) { - BaseQtVersion *version = m_step->qt4BuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *version = m_step->qt4BuildConfiguration()->qtVersion(); if (version && version->qmakeCommand() == qmakeCommand) qtVersionChanged(); } @@ -522,9 +529,9 @@ void QMakeStepConfigWidget::qtVersionsDumpUpdated(const QString &qmakeCommand) void QMakeStepConfigWidget::qmakeBuildConfigChanged() { Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); - bool debug = bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild; + bool debug = bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild; int index = debug ? 0 : 1; - if (bc->qmakeBuildConfiguration() & BaseQtVersion::BuildAll) + if (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::BuildAll) index = 2; m_ignoreChange = true; m_ui.buildConfigurationComboBox->setCurrentIndex(index); @@ -569,16 +576,16 @@ void QMakeStepConfigWidget::buildConfigurationSelected() if (m_ignoreChange) return; Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); - BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration(); + QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration(); switch (m_ui.buildConfigurationComboBox->currentIndex()) { case 0: - buildConfiguration = BaseQtVersion::DebugBuild; + buildConfiguration = QtSupport::BaseQtVersion::DebugBuild; break; case 1: buildConfiguration = 0; break; case 2: - buildConfiguration = BaseQtVersion::BuildAll; + buildConfiguration = QtSupport::BaseQtVersion::BuildAll; break; } @@ -606,16 +613,16 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked) void QMakeStepConfigWidget::buildQmlDebuggingHelper() { - BaseQtVersion *version = m_step->qt4BuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *version = m_step->qt4BuildConfiguration()->qtVersion(); if (!version) return; - DebuggingHelperBuildTask *buildTask = new DebuggingHelperBuildTask(version, - DebuggingHelperBuildTask::QmlDebugging); + QtSupport::DebuggingHelperBuildTask *buildTask = + new QtSupport::DebuggingHelperBuildTask(version, QtSupport::DebuggingHelperBuildTask::QmlDebugging); // pop up Application Output on error buildTask->showOutputOnError(true); - QFuture<void> task = QtConcurrent::run(&DebuggingHelperBuildTask::run, buildTask); + QFuture<void> task = QtConcurrent::run(&QtSupport::DebuggingHelperBuildTask::run, buildTask); const QString taskName = tr("Building helpers"); Core::ICore::instance()->progressManager()->addTask(task, taskName, QLatin1String("Qt4ProjectManager::BuildHelpers")); @@ -624,7 +631,7 @@ void QMakeStepConfigWidget::buildQmlDebuggingHelper() void QMakeStepConfigWidget::updateSummaryLabel() { Qt4BuildConfiguration *qt4bc = m_step->qt4BuildConfiguration(); - BaseQtVersion *qtVersion = qt4bc->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion(); if (!qtVersion) { m_summaryText = tr("<b>qmake:</b> No Qt version set. Cannot run qmake."); emit updateSummary(); @@ -644,7 +651,7 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption() { m_ui.qmlDebuggingLibraryCheckBox->setEnabled(m_step->isQmlDebuggingLibrarySupported()); - BaseQtVersion *qtVersion = m_step->qt4BuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = m_step->qt4BuildConfiguration()->qtVersion(); if (!qtVersion || !qtVersion->needsQmlDebuggingLibrary()) m_ui.debuggingLibraryLabel->setText(tr("Enable QML debugging:")); else @@ -664,7 +671,7 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption() void QMakeStepConfigWidget::updateEffectiveQMakeCall() { Qt4BuildConfiguration *qt4bc = m_step->qt4BuildConfiguration(); - BaseQtVersion *qtVersion = qt4bc->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion(); QString program = tr("<No qtversion>"); if (qtVersion) program = QFileInfo(qtVersion->qmakeCommand()).fileName(); diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp index 505201e53a..14bbc07dde 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp @@ -32,7 +32,9 @@ #include "desktopqtversion.h" #include "qt4projectmanagerconstants.h" -#include "profileevaluator.h" + +#include <qtsupport/qtsupportconstants.h> +#include <proparser/profileevaluator.h> #include <QtCore/QCoreApplication> #include <QtCore/QDir> @@ -67,7 +69,7 @@ DesktopQtVersion *DesktopQtVersion::clone() const QString DesktopQtVersion::type() const { - return Constants::DESKTOPQT; + return QtSupport::Constants::DESKTOPQT; } bool DesktopQtVersion::isValid() const diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h index ad086ebd46..961d83c5f9 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h +++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h @@ -33,13 +33,13 @@ #ifndef DESKTOPQTVERSION_H #define DESKTOPQTVERSION_H -#include "baseqtversion.h" +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager { namespace Internal { -class DesktopQtVersion : public BaseQtVersion +class DesktopQtVersion : public QtSupport::BaseQtVersion { public: DesktopQtVersion(); diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.cpp index e8d5ab10c4..4126348142 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.cpp @@ -32,9 +32,10 @@ #include "desktopqtversionfactory.h" #include "qt4projectmanagerconstants.h" #include "desktopqtversion.h" -#include "qtversionmanager.h" #include <projectexplorer/debugginghelper.h> +#include <qtsupport/qtversionmanager.h> +#include <qtsupport/qtsupportconstants.h> #include <QtCore/QFileInfo> @@ -42,7 +43,7 @@ using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; DesktopQtVersionFactory::DesktopQtVersionFactory(QObject *parent) - : QtVersionFactory(parent) + : QtSupport::QtVersionFactory(parent) { } @@ -54,10 +55,10 @@ DesktopQtVersionFactory::~DesktopQtVersionFactory() bool DesktopQtVersionFactory::canRestore(const QString &type) { - return type == QLatin1String(Constants::DESKTOPQT); + return type == QLatin1String(QtSupport::Constants::DESKTOPQT); } -BaseQtVersion *DesktopQtVersionFactory::restore(const QVariantMap &data) +QtSupport::BaseQtVersion *DesktopQtVersionFactory::restore(const QVariantMap &data) { DesktopQtVersion *v = new DesktopQtVersion; v->fromMap(data); @@ -70,7 +71,7 @@ int DesktopQtVersionFactory::priority() const return 0; } -BaseQtVersion *DesktopQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) +QtSupport::BaseQtVersion *DesktopQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) { Q_UNUSED(evaluator); // we are the fallback :) so we don't care what kind of qt it is diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.h b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.h index 6a5bb746ae..8bf1e6c873 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.h +++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversionfactory.h @@ -33,22 +33,22 @@ #ifndef DESKTOPQTVERSIONFACTORY_H #define DESKTOPQTVERSIONFACTORY_H -#include "qtversionfactory.h" +#include <qtsupport/qtversionfactory.h> namespace Qt4ProjectManager{ namespace Internal { -class DesktopQtVersionFactory : public QtVersionFactory +class DesktopQtVersionFactory : public QtSupport::QtVersionFactory { public: explicit DesktopQtVersionFactory(QObject *parent = 0); ~DesktopQtVersionFactory(); virtual bool canRestore(const QString &type); - virtual BaseQtVersion *restore(const QVariantMap &data); + virtual QtSupport::BaseQtVersion *restore(const QVariantMap &data); virtual int priority() const; - virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + virtual QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); }; } // Internal diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp index f39540a61f..6348328b5e 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp @@ -54,7 +54,7 @@ using ProjectExplorer::idFromMap; Qt4DesktopTargetFactory::Qt4DesktopTargetFactory(QObject *parent) : Qt4BaseTargetFactory(parent) { - connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), this, SIGNAL(supportedTargetIdsChanged())); } @@ -71,7 +71,7 @@ QStringList Qt4DesktopTargetFactory::supportedTargetIds(ProjectExplorer::Project { if (parent && !qobject_cast<Qt4Project *>(parent)) return QStringList(); - if (!QtVersionManager::instance()->supportsTargetId(Constants::DESKTOP_TARGET_ID)) + if (!QtSupport::QtVersionManager::instance()->supportsTargetId(Constants::DESKTOP_TARGET_ID)) return QStringList(); return QStringList() << QLatin1String(Constants::DESKTOP_TARGET_ID); } @@ -123,7 +123,7 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::restore(ProjectExplorer::Proj return 0; } -Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const QString &id, const QString &proFilePath, const QtVersionNumber &number, bool importEnabled, QList<BuildConfigurationInfo> importInfos) +Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &number, bool importEnabled, QList<BuildConfigurationInfo> importInfos) { QList<BuildConfigurationInfo> infos = this->availableBuildConfigurations(id, proFilePath, number); @@ -142,16 +142,16 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Projec if (!canCreate(parent, id)) return 0; - QList<BaseQtVersion *> knownVersions = QtVersionManager::instance()->versionsForTargetId(id); + QList<QtSupport::BaseQtVersion *> knownVersions = QtSupport::QtVersionManager::instance()->versionsForTargetId(id); if (knownVersions.isEmpty()) return 0; - BaseQtVersion *qtVersion = knownVersions.first(); - BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); + QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); QList<BuildConfigurationInfo> infos; infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString())); - infos.append(BuildConfigurationInfo(qtVersion, config ^ BaseQtVersion::DebugBuild, QString(), QString())); + infos.append(BuildConfigurationInfo(qtVersion, config ^ QtSupport::BaseQtVersion::DebugBuild, QString(), QString())); return create(parent, id, infos); } diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h index c4806fe4ba..416cb0d719 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h @@ -54,7 +54,7 @@ public: virtual bool supportsTargetId(const QString &id) const; - Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion, bool importEnabled, QList<BuildConfigurationInfo> importInfos); + Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &minimumQtVersion, bool importEnabled, QList<BuildConfigurationInfo> importInfos); QString buildNameForId(const QString &id) const; bool isMobileTarget(const QString &id); bool supportsShadowBuilds(const QString &id); diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp index 1ca31df3f0..6508f9ec50 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp @@ -33,16 +33,13 @@ #include "qt4runconfiguration.h" #include "makestep.h" -#include "profilereader.h" #include "qt4nodes.h" #include "qt4project.h" #include "qt4target.h" #include "qt4buildconfiguration.h" #include "qt4projectmanagerconstants.h" -#include "qtoutputformatter.h" #include "qt4desktoptarget.h" #include "qmakestep.h" -#include "baseqtversion.h" #include <coreplugin/coreconstants.h> #include <coreplugin/icore.h> @@ -59,6 +56,9 @@ #include <utils/pathchooser.h> #include <utils/detailswidget.h> #include <utils/debuggerlanguagechooser.h> +#include <qtsupport/qtoutputformatter.h> +#include <qtsupport/baseqtversion.h> +#include <qtsupport/profilereader.h> #include <QtGui/QFormLayout> #include <QtGui/QInputDialog> @@ -655,7 +655,7 @@ QString Qt4RunConfiguration::proFilePath() const QString Qt4RunConfiguration::dumperLibrary() const { - BaseQtVersion *version = qt4Target()->activeBuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *version = qt4Target()->activeBuildConfiguration()->qtVersion(); if (version) return version->gdbDebuggingHelperLibrary(); return QString(); @@ -663,7 +663,7 @@ QString Qt4RunConfiguration::dumperLibrary() const QStringList Qt4RunConfiguration::dumperLibraryLocations() const { - BaseQtVersion *version = qt4Target()->activeBuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *version = qt4Target()->activeBuildConfiguration()->qtVersion(); if (version) return version->debuggingHelperLibraryLocations(); return QStringList(); @@ -694,7 +694,7 @@ Qt4RunConfiguration::BaseEnvironmentBase Qt4RunConfiguration::baseEnvironmentBas Utils::OutputFormatter *Qt4RunConfiguration::createOutputFormatter() const { - return new QtOutputFormatter(qt4Target()->qt4Project()); + return new QtSupport::QtOutputFormatter(qt4Target()->qt4Project()); } /// diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp index 266c09e287..5db9d28327 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp @@ -55,7 +55,7 @@ using ProjectExplorer::idFromMap; Qt4SimulatorTargetFactory::Qt4SimulatorTargetFactory(QObject *parent) : Qt4BaseTargetFactory(parent) { - connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), this, SIGNAL(supportedTargetIdsChanged())); } @@ -72,7 +72,7 @@ QStringList Qt4SimulatorTargetFactory::supportedTargetIds(ProjectExplorer::Proje { if (parent && !qobject_cast<Qt4Project *>(parent)) return QStringList(); - if (!QtVersionManager::instance()->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) + if (!QtSupport::QtVersionManager::instance()->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) return QStringList(); return QStringList() << QLatin1String(Constants::QT_SIMULATOR_TARGET_ID); } @@ -140,15 +140,15 @@ ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Proj if (!canCreate(parent, id)) return 0; - QList<BaseQtVersion *> knownVersions = QtVersionManager::instance()->versionsForTargetId(id); + QList<QtSupport::BaseQtVersion *> knownVersions = QtSupport::QtVersionManager::instance()->versionsForTargetId(id); if (knownVersions.isEmpty()) return 0; - BaseQtVersion *qtVersion = knownVersions.first(); - BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); + QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); QList<BuildConfigurationInfo> infos; infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString())); - infos.append(BuildConfigurationInfo(qtVersion, config ^ BaseQtVersion::DebugBuild, QString(), QString())); + infos.append(BuildConfigurationInfo(qtVersion, config ^ QtSupport::BaseQtVersion::DebugBuild, QString(), QString())); return create(parent, id, infos); } diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp index ecefb8fef7..85d3e74415 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp @@ -32,7 +32,9 @@ #include "simulatorqtversion.h" #include "qt4projectmanagerconstants.h" -#include "profileevaluator.h" + +#include <qtsupport/qtsupportconstants.h> +#include <proparser/profileevaluator.h> #include <QtCore/QCoreApplication> #include <QtCore/QDir> @@ -42,14 +44,14 @@ using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; SimulatorQtVersion::SimulatorQtVersion() - : BaseQtVersion(), + : QtSupport::BaseQtVersion(), m_qtAbisUpToDate(false) { } SimulatorQtVersion::SimulatorQtVersion(const QString &path, bool isAutodetected, const QString &autodetectionSource) - : BaseQtVersion(path, isAutodetected, autodetectionSource), + : QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource), m_qtAbisUpToDate(false) { @@ -67,7 +69,7 @@ SimulatorQtVersion *SimulatorQtVersion::clone() const QString SimulatorQtVersion::type() const { - return Constants::SIMULATORQT; + return QtSupport::Constants::SIMULATORQT; } bool SimulatorQtVersion::isValid() const diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h index 5965142d07..cc7637dd3d 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h +++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h @@ -33,13 +33,13 @@ #ifndef SIMULATORQTVERSION_H #define SIMULATORQTVERSION_H -#include "baseqtversion.h" +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager{ namespace Internal { -class SimulatorQtVersion : public BaseQtVersion +class SimulatorQtVersion : public QtSupport::BaseQtVersion { public: SimulatorQtVersion(); diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.cpp index 9d59066fbc..65f31a28c4 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.cpp @@ -34,6 +34,9 @@ #include "qt4projectmanagerconstants.h" #include "simulatorqtversion.h" +#include <qtsupport/qtsupportconstants.h> +#include <qtsupport/profilereader.h> + #include <QtCore/QFileInfo> using namespace Qt4ProjectManager; @@ -52,12 +55,12 @@ SimulatorQtVersionFactory::~SimulatorQtVersionFactory() bool SimulatorQtVersionFactory::canRestore(const QString &type) { - return type == QLatin1String(Constants::SIMULATORQT); + return type == QLatin1String(QtSupport::Constants::SIMULATORQT); } -BaseQtVersion *SimulatorQtVersionFactory::restore(const QVariantMap &data) +QtSupport::BaseQtVersion *SimulatorQtVersionFactory::restore(const QVariantMap &data) { - BaseQtVersion *v = new SimulatorQtVersion; + QtSupport::BaseQtVersion *v = new SimulatorQtVersion; v->fromMap(data); return v; } @@ -68,12 +71,11 @@ int SimulatorQtVersionFactory::priority() const return 50; } -BaseQtVersion *SimulatorQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) +QtSupport::BaseQtVersion *SimulatorQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) { QFileInfo fi(qmakePath); if (!fi.exists() || !fi.isExecutable() || !fi.isFile()) return 0; - QStringList configValues = evaluator->values("CONFIG"); if (!configValues.contains(QLatin1String("simulator"))) return 0; diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.h b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.h index d6685d33b3..e1f9685d23 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.h +++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversionfactory.h @@ -33,22 +33,22 @@ #ifndef SIMULATORQTVERSIONFACTORY_H #define SIMULATORQTVERSIONFACTORY_H -#include "qtversionfactory.h" +#include <qtsupport/qtversionfactory.h> namespace Qt4ProjectManager { namespace Internal { -class SimulatorQtVersionFactory : public QtVersionFactory +class SimulatorQtVersionFactory : public QtSupport::QtVersionFactory { public: explicit SimulatorQtVersionFactory(QObject *parent = 0); ~SimulatorQtVersionFactory(); virtual bool canRestore(const QString &type); - virtual BaseQtVersion *restore(const QVariantMap &data); + virtual QtSupport::BaseQtVersion *restore(const QVariantMap &data); virtual int priority() const; - virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + virtual QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); }; } // Internal diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp index eda2695ca9..e262b63043 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp @@ -40,7 +40,7 @@ #include <projectexplorer/session.h> #include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4target.h> -#include <qt4projectmanager/baseqtversion.h> +#include <qtsupport/baseqtversion.h> #include <utils/qtcassert.h> #include <utils/fileutils.h> @@ -258,7 +258,7 @@ bool MaemoDeployableListModel::addDesktopFile() return false; } - const BaseQtVersion * const version = qtVersion(); + const QtSupport::BaseQtVersion * const version = qtVersion(); QTC_ASSERT(version, return false); QString remoteDir = QLatin1String("/usr/share/applications"); if (MaemoGlobal::version(version->qmakeCommand()) == MaemoDeviceConfig::Maemo5) @@ -325,7 +325,7 @@ bool MaemoDeployableListModel::addLinesToProFile(const QStringList &lines) return saver.finalize(Core::ICore::instance()->mainWindow()); } -const BaseQtVersion *MaemoDeployableListModel::qtVersion() const +const QtSupport::BaseQtVersion *MaemoDeployableListModel::qtVersion() const { const ProjectExplorer::Project *const activeProject = ProjectExplorer::ProjectExplorerPlugin::instance()->session()->startupProject(); @@ -341,7 +341,7 @@ const BaseQtVersion *MaemoDeployableListModel::qtVersion() const QString MaemoDeployableListModel::proFileScope() const { - const BaseQtVersion *const qv = qtVersion(); + const QtSupport::BaseQtVersion *const qv = qtVersion(); QTC_ASSERT(qv, return QString()); return QLatin1String(MaemoGlobal::version(qv->qmakeCommand()) == MaemoDeviceConfig::Maemo5 ? "maemo5" : "unix:!symbian:!maemo5"); @@ -354,7 +354,7 @@ QString MaemoDeployableListModel::installPrefix() const QString MaemoDeployableListModel::remoteIconDir() const { - const BaseQtVersion *const qv = qtVersion(); + const QtSupport::BaseQtVersion *const qv = qtVersion(); QTC_ASSERT(qv, return QString()); return QString::fromLocal8Bit("/usr/share/icons/hicolor/%1x%1/apps") .arg(MaemoGlobal::applicationIconSize(MaemoGlobal::version(qv->qmakeCommand()))); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h index 11eb35883e..e858e110b6 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h @@ -43,8 +43,11 @@ #include <QtCore/QScopedPointer> #include <QtCore/QString> -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; +} + +namespace Qt4ProjectManager { namespace Internal { class MaemoDeployableListModel : public QAbstractTableModel @@ -64,7 +67,7 @@ public: MaemoDeployable deployableAt(int row) const; bool isModified() const { return m_modified; } void setUnModified() { m_modified = false; } - const BaseQtVersion *qtVersion() const; + const QtSupport::BaseQtVersion *qtVersion() const; QString localExecutableFilePath() const; QString remoteExecutableFilePath() const; QString projectName() const { return m_projectName; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp index 581b06d26f..15ebbbfafe 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp @@ -33,7 +33,7 @@ #include "maemoprofilesupdatedialog.h" -#include <profileevaluator.h> +#include <proparser/profileevaluator.h> #include <projectexplorer/buildstep.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qt4buildconfiguration.h> diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployconfigurationwidget.cpp index 803e556789..ed80e2206d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployconfigurationwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployconfigurationwidget.cpp @@ -37,7 +37,6 @@ #include "maemodeployables.h" #include "qt4maemodeployconfiguration.h" -#include <qt4projectmanager/qtversionmanager.h> #include <utils/qtcassert.h> #include <QtGui/QFileDialog> diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp index 7bab3d3ab4..b304e946e6 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp @@ -39,7 +39,7 @@ #include <coreplugin/filemanager.h> #include <utils/ssh/sshconnection.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> -#include <qt4projectmanager/qtversionmanager.h> +#include <qtsupport/qtversionmanager.h> #include <qt4projectmanager/qt4target.h> #include <utils/environment.h> @@ -92,7 +92,7 @@ bool MaemoGlobal::isValidMeegoQtVersion(const QString &qmakePath) return isValidMaemoQtVersion(qmakePath, MaemoDeviceConfig::Meego); } -bool MaemoGlobal::isLinuxQt(const BaseQtVersion *qtVersion) +bool MaemoGlobal::isLinuxQt(const QtSupport::BaseQtVersion *qtVersion) { if (!qtVersion) return false; @@ -223,7 +223,7 @@ QString MaemoGlobal::deviceConfigurationName(const MaemoDeviceConfig::ConstPtr & } MaemoPortList MaemoGlobal::freePorts(const MaemoDeviceConfig::ConstPtr &devConf, - const BaseQtVersion *qtVersion) + const QtSupport::BaseQtVersion *qtVersion) { if (!devConf || !qtVersion) return MaemoPortList(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h index 260a5851a7..b22c8d8efc 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h @@ -56,8 +56,10 @@ class QString; QT_END_NAMESPACE namespace Utils { class SshConnection; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; +} +namespace Qt4ProjectManager { namespace Internal { class WatchableFile : public Core::IFile @@ -100,7 +102,7 @@ public: static bool isValidHarmattanQtVersion(const QString &qmakePath); static bool isValidMeegoQtVersion(const QString &qmakePath); - static bool isLinuxQt(const BaseQtVersion *qtVersion); + static bool isLinuxQt(const QtSupport::BaseQtVersion *qtVersion); static bool hasLinuxQt(const ProjectExplorer::Target *target); static QString homeDirOnDevice(const QString &uname); @@ -116,7 +118,7 @@ public: const QSharedPointer<const MaemoDeviceConfig> &deviceConfig); static QString deviceConfigurationName(const QSharedPointer<const MaemoDeviceConfig> &devConf); static MaemoPortList freePorts(const QSharedPointer<const MaemoDeviceConfig> &devConf, - const BaseQtVersion *qtVersion); + const QtSupport::BaseQtVersion *qtVersion); static QString maddeRoot(const QString &qmakePath); static QString targetRoot(const QString &qmakePath); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoinstalltosysrootstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoinstalltosysrootstep.cpp index c0ad0dcfcb..c4b31f67dd 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoinstalltosysrootstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoinstalltosysrootstep.cpp @@ -37,10 +37,10 @@ #include "maemopackagecreationstep.h" #include "maemotoolchain.h" #include "qt4maemodeployconfiguration.h" -#include "baseqtversion.h" #include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4target.h> +#include <qtsupport/baseqtversion.h> #include <QtCore/QLatin1Char> #include <QtCore/QProcess> @@ -181,7 +181,7 @@ void AbstractMaemoInstallPackageToSysrootStep::run(QFutureInterface<bool> &fi) SLOT(handleInstallerStderr())); emit addOutput(tr("Installing package to sysroot ..."), MessageOutput); - const BaseQtVersion * const qtVersion = bc->qtVersion(); + const QtSupport::BaseQtVersion * const qtVersion = bc->qtVersion(); const QString packageFilePath = pStep->packageFilePath(); const int packageFileSize = QFileInfo(packageFilePath).size() / (1024*1024); const QStringList args = madArguments() << packageFilePath; @@ -370,7 +370,7 @@ bool MaemoMakeInstallToSysrootStep::init() ErrorMessageOutput); return false; } - const BaseQtVersion * const qtVersion = bc->qtVersion(); + const QtSupport::BaseQtVersion * const qtVersion = bc->qtVersion(); if (!qtVersion) { addOutput("Can't deploy: Unusable build configuration.", ErrorMessageOutput); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp index 313262dab1..2a96cfe39e 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp @@ -46,7 +46,6 @@ #include "qt4maemodeployconfiguration.h" #include "maemoqtversionfactory.h" #include "qt4maemotargetfactory.h" -#include "qt4projectmanager/qtversionmanager.h" #include "qt4projectmanager/qt4projectmanagerconstants.h" #include <extensionsystem/pluginmanager.h> diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp index 3785f51ca0..b6be190e59 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp @@ -255,7 +255,7 @@ bool AbstractMaemoPackageCreationStep::callPackagingCommand(QProcess *proc, const QStringList &arguments) { preparePackagingProcess(proc, qt4BuildConfiguration(), buildDirectory()); - const BaseQtVersion * const qtVersion = qt4BuildConfiguration()->qtVersion(); + const QtSupport::BaseQtVersion * const qtVersion = qt4BuildConfiguration()->qtVersion(); if (!qtVersion) { raiseError(tr("Packaging failed."), tr("Packaging error: No qt version.")); return false; @@ -291,7 +291,7 @@ void AbstractMaemoPackageCreationStep::preparePackagingProcess(QProcess *proc, const Qt4BuildConfiguration *bc, const QString &workingDir) { Utils::Environment env = bc->environment(); - if (bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild) { + if (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild) { env.appendOrSet(QLatin1String("DEB_BUILD_OPTIONS"), QLatin1String("nostrip"), QLatin1String(" ")); } @@ -470,7 +470,7 @@ QString MaemoDebianPackageCreationStep::packagingCommand(const Qt4BuildConfigura const QString &commandName) { QString perl; - BaseQtVersion *v = bc->qtVersion(); + QtSupport::BaseQtVersion *v = bc->qtVersion(); const QString maddeRoot = MaemoGlobal::maddeRoot(v->qmakeCommand()); #ifdef Q_OS_WIN perl = maddeRoot + QLatin1String("/bin/perl.exe "); @@ -502,7 +502,7 @@ bool MaemoDebianPackageCreationStep::adaptRulesFile( const Qt4BuildConfiguration * const bc = qt4BuildConfiguration(); // Always check for dependencies in release builds. - if (!(bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)) + if (!(bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild)) ensureShlibdeps(content); Utils::FileSaver saver(rulesFilePath); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp index 42757776b5..3a0070bd1e 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp @@ -37,13 +37,13 @@ #include "maemopublishingfileselectiondialog.h" #include "qt4maemodeployconfiguration.h" #include "qt4maemotarget.h" -#include "baseqtversion.h" #include <coreplugin/ifile.h> #include <projectexplorer/project.h> #include <projectexplorer/target.h> #include <qt4projectmanager/qmakestep.h> #include <qt4projectmanager/qt4buildconfiguration.h> +#include <qtsupport/baseqtversion.h> #include <utils/fileutils.h> #include <QtCore/QCoreApplication> @@ -364,7 +364,7 @@ void MaemoPublisherFremantleFree::runDpkgBuildPackage() } } - BaseQtVersion *lqt = m_buildConfig->qtVersion(); + QtSupport::BaseQtVersion *lqt = m_buildConfig->qtVersion(); if (!lqt) finishWithFailure(QString(), tr("No qt version set")); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp index ce144a460d..2af56dae1b 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp @@ -39,7 +39,7 @@ #include <projectexplorer/target.h> #include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> -#include <qt4projectmanager/baseqtversion.h> +#include <qtsupport/baseqtversion.h> #include <utils/qtcassert.h> using namespace ProjectExplorer; @@ -81,7 +81,7 @@ void MaemoPublishingBuildSettingsPageFremantleFree::collectBuildConfigurations(c if (!qt4Bc) continue; - BaseQtVersion *lqt = qt4Bc->qtVersion(); + QtSupport::BaseQtVersion *lqt = qt4Bc->qtVersion(); if (!lqt) continue; if (MaemoGlobal::version(lqt->qmakeCommand()) == MaemoDeviceConfig::Maemo5) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp index fc86d22c73..9ff41fcea4 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingwizardfactories.cpp @@ -33,12 +33,12 @@ #include "maemoglobal.h" #include "maemopublishingwizardfremantlefree.h" -#include "baseqtversion.h" #include <projectexplorer/target.h> #include <qt4projectmanager/qmakestep.h> #include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> +#include <qtsupport/baseqtversion.h> using namespace ProjectExplorer; @@ -78,7 +78,7 @@ bool MaemoPublishingWizardFactoryFremantleFree::canCreateWizard(const Project *p if (!qt4Bc) continue; - BaseQtVersion *qt = qt4Bc->qtVersion(); + QtSupport::BaseQtVersion *qt = qt4Bc->qtVersion(); if (!qt) continue; if (MaemoGlobal::version(qt->qmakeCommand()) == MaemoDeviceConfig::Maemo5) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp index bdbf41a8be..b3882ded56 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp @@ -37,7 +37,6 @@ #include "maemoqemuruntimeparser.h" #include "maemosettingspages.h" #include "maemorunconfiguration.h" -#include "qtversionmanager.h" #include "qt4project.h" #include "qt4projectmanagerconstants.h" #include "qt4maemotarget.h" @@ -53,6 +52,7 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> +#include <qtsupport/qtversionmanager.h> #include <utils/filesystemwatcher.h> #include <QtCore/QDebug> @@ -106,7 +106,7 @@ MaemoQemuManager::MaemoQemuManager(QObject *parent) m_qemuAction->setVisible(false); // listen to qt version changes to update the start button - connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(qtVersionsChanged(QList<int>))); // listen to project add, remove and startup changes to udate start button @@ -178,7 +178,7 @@ bool MaemoQemuManager::qemuIsRunning() const void MaemoQemuManager::qtVersionsChanged(const QList<int> &uniqueIds) { - QtVersionManager *manager = QtVersionManager::instance(); + QtSupport::QtVersionManager *manager = QtSupport::QtVersionManager::instance(); foreach (int uniqueId, uniqueIds) { if (manager->isValidId(uniqueId)) { MaemoQtVersion *version = dynamic_cast<MaemoQtVersion *>(manager->version(uniqueId)); @@ -370,7 +370,7 @@ void MaemoQemuManager::startRuntime() Project *p = ProjectExplorerPlugin::instance()->session()->startupProject(); if (!p) return; - BaseQtVersion *version; + QtSupport::BaseQtVersion *version; if (!targetUsesMatchingRuntimeConfig(p->activeTarget(), &version)) { qWarning("Strange: Qemu button was enabled, but target does not match."); return; @@ -530,7 +530,7 @@ void MaemoQemuManager::toggleStarterButton(Target *target) if (target) { if (AbstractQt4MaemoTarget *qt4Target = qobject_cast<AbstractQt4MaemoTarget*>(target)) { if (Qt4BuildConfiguration *bc = qt4Target->activeBuildConfiguration()) { - if (BaseQtVersion *version = bc->qtVersion()) + if (QtSupport::BaseQtVersion *version = bc->qtVersion()) uniqueId = version->uniqueId(); } } @@ -567,7 +567,7 @@ bool MaemoQemuManager::sessionHasMaemoTarget() const } bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target, - BaseQtVersion **qtVersion) + QtSupport::BaseQtVersion **qtVersion) { if (!target) return false; @@ -582,7 +582,7 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target, = qobject_cast<Qt4BuildConfiguration *>(target->activeBuildConfiguration()); if (!bc) return false; - BaseQtVersion *version = bc->qtVersion(); + QtSupport::BaseQtVersion *version = bc->qtVersion(); if (!version || !m_runtimes.value(version->uniqueId(), MaemoQemuRuntime()).isValid()) return false; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h index b4e9214549..075d40b1b1 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h @@ -56,8 +56,10 @@ namespace ProjectExplorer { class Target; } +namespace QtSupport { +class BaseQtVersion; +} namespace Qt4ProjectManager { - class BaseQtVersion; namespace Internal { class MaemoRunConfiguration; @@ -117,7 +119,7 @@ private: void updateStarterIcon(bool running); void toggleStarterButton(ProjectExplorer::Target *target); bool targetUsesMatchingRuntimeConfig(ProjectExplorer::Target *target, - BaseQtVersion **qtVersion = 0); + QtSupport::BaseQtVersion **qtVersion = 0); void notify(const QList<int> uniqueIds); void toggleDeviceConnections(MaemoRunConfiguration *mrc, bool connect); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.cpp index c66f3d38bc..8a94ea2535 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.cpp @@ -33,9 +33,8 @@ #include "maemoglobal.h" #include "maemoqemusettings.h" -#include "baseqtversion.h" -#include <qt4projectmanager/qtversionmanager.h> +#include <qtsupport/baseqtversion.h> #include <utils/qtcassert.h> #include <QtCore/QDir> @@ -89,7 +88,7 @@ MaemoQemuRuntimeParser::MaemoQemuRuntimeParser(const QString &madInfoOutput, { } -MaemoQemuRuntime MaemoQemuRuntimeParser::parseRuntime(const BaseQtVersion *qtVersion) +MaemoQemuRuntime MaemoQemuRuntimeParser::parseRuntime(const QtSupport::BaseQtVersion *qtVersion) { MaemoQemuRuntime runtime; const QString maddeRootPath = MaemoGlobal::maddeRoot(qtVersion->qmakeCommand()); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.h b/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.h index 780ebc4818..fa1a328ac3 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemuruntimeparser.h @@ -37,14 +37,17 @@ #include <QtCore/QString> #include <QtXml/QXmlStreamReader> -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; +} + +namespace Qt4ProjectManager { namespace Internal { class MaemoQemuRuntimeParser { public: - static MaemoQemuRuntime parseRuntime(const BaseQtVersion *qtVersion); + static MaemoQemuRuntime parseRuntime(const QtSupport::BaseQtVersion *qtVersion); protected: MaemoQemuRuntimeParser(const QString &madInfoOutput, diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.cpp index 7abda3e9d1..f0bb16469c 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.cpp @@ -34,6 +34,8 @@ #include "qt4projectmanagerconstants.h" #include "qt-maemo/maemoglobal.h" +#include <qtsupport/qtsupportconstants.h> + #include <QtCore/QCoreApplication> #include <QtCore/QFile> #include <QtCore/QDir> @@ -42,13 +44,13 @@ using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; MaemoQtVersion::MaemoQtVersion() - : BaseQtVersion() + : QtSupport::BaseQtVersion() { } MaemoQtVersion::MaemoQtVersion(const QString &path, bool isAutodetected, const QString &autodetectionSource) - : BaseQtVersion(path, isAutodetected, autodetectionSource), + : QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource), m_osVersion(MaemoGlobal::version(path)), m_isvalidVersion(MaemoGlobal::isValidMaemoQtVersion(path, m_osVersion)) { @@ -62,7 +64,7 @@ MaemoQtVersion::~MaemoQtVersion() void MaemoQtVersion::fromMap(const QVariantMap &map) { - BaseQtVersion::fromMap(map); + QtSupport::BaseQtVersion::fromMap(map); QString path = qmakeCommand(); m_osVersion = MaemoGlobal::version(path); m_isvalidVersion = MaemoGlobal::isValidMaemoQtVersion(path, m_osVersion); @@ -70,7 +72,7 @@ void MaemoQtVersion::fromMap(const QVariantMap &map) QString MaemoQtVersion::type() const { - return Constants::MAEMOQT; + return QtSupport::Constants::MAEMOQT; } MaemoQtVersion *MaemoQtVersion::clone() const diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.h b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.h index c1b4d3d18a..a4e8541d47 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversion.h @@ -32,13 +32,13 @@ #ifndef MAEMOQTVERSION_H #define MAEMOQTVERSION_H -#include "baseqtversion.h" #include "maemodeviceconfigurations.h" +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager { namespace Internal { -class MaemoQtVersion : public BaseQtVersion +class MaemoQtVersion : public QtSupport::BaseQtVersion { public: MaemoQtVersion(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.cpp index a7c3c7c6a8..f8817b2d2a 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.cpp @@ -35,13 +35,15 @@ #include "qt4projectmanagerconstants.h" #include "maemoqtversion.h" +#include <qtsupport/qtsupportconstants.h> + #include <QtCore/QFileInfo> using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; MaemoQtVersionFactory::MaemoQtVersionFactory(QObject *parent) - : QtVersionFactory(parent) + : QtSupport::QtVersionFactory(parent) { } @@ -53,10 +55,10 @@ MaemoQtVersionFactory::~MaemoQtVersionFactory() bool MaemoQtVersionFactory::canRestore(const QString &type) { - return type == QLatin1String(Constants::MAEMOQT); + return type == QLatin1String(QtSupport::Constants::MAEMOQT); } -BaseQtVersion *MaemoQtVersionFactory::restore(const QVariantMap &data) +QtSupport::BaseQtVersion *MaemoQtVersionFactory::restore(const QVariantMap &data) { MaemoQtVersion *v = new MaemoQtVersion; v->fromMap(data); @@ -68,7 +70,7 @@ int MaemoQtVersionFactory::priority() const return 50; } -BaseQtVersion *MaemoQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) +QtSupport::BaseQtVersion *MaemoQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) { Q_UNUSED(evaluator); // we are the fallback :) so we don't care what kinf of qt it is diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.h b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.h index c49ff60fb7..914c922a80 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqtversionfactory.h @@ -33,22 +33,22 @@ #ifndef MAEMOQTVERSIONFACTORY_H #define MAEMOQTVERSIONFACTORY_H -#include "qtversionfactory.h" +#include <qtsupport/qtversionfactory.h> namespace Qt4ProjectManager { namespace Internal { -class MaemoQtVersionFactory : public QtVersionFactory +class MaemoQtVersionFactory : public QtSupport::QtVersionFactory { public: explicit MaemoQtVersionFactory(QObject *parent = 0); ~MaemoQtVersionFactory(); virtual bool canRestore(const QString &type); - virtual BaseQtVersion *restore(const QVariantMap &data); + virtual QtSupport::BaseQtVersion *restore(const QVariantMap &data); virtual int priority() const; - virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + virtual QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); }; } // Internal diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index 0e210d2ba4..8b4c7267ed 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -35,11 +35,11 @@ #include "maemoglobal.h" #include "maemousedportsgatherer.h" #include "qt4maemotarget.h" -#include "baseqtversion.h" #include <utils/ssh/sshconnection.h> #include <utils/ssh/sshremoteprocess.h> #include <qt4projectmanager/qt4buildconfiguration.h> +#include <qtsupport/baseqtversion.h> #include <utils/qtcassert.h> #include <QtCore/QTimer> @@ -75,7 +75,7 @@ void MaemoRemoteMounter::setConnection(const SshConnection::Ptr &connection, void MaemoRemoteMounter::setBuildConfiguration(const Qt4BuildConfiguration *bc) { ASSERT_STATE(Inactive); - const BaseQtVersion * const qtVersion = bc->qtVersion(); + const QtSupport::BaseQtVersion * const qtVersion = bc->qtVersion(); const AbstractQt4MaemoTarget * const maemoTarget = qobject_cast<AbstractQt4MaemoTarget *>(bc->target()); m_remoteMountsAllowed = maemoTarget && maemoTarget->allowsRemoteMounts(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp index fa15dfd5ee..f54b4d0792 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp @@ -41,7 +41,6 @@ #include "maemotoolchain.h" #include "qt4maemodeployconfiguration.h" #include "qt4maemotarget.h" -#include "qtoutputformatter.h" #include "maemoqtversion.h" #include <coreplugin/icore.h> @@ -50,6 +49,7 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> +#include <qtsupport/qtoutputformatter.h> #include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4target.h> @@ -141,7 +141,7 @@ QWidget *MaemoRunConfiguration::createConfigurationWidget() Utils::OutputFormatter *MaemoRunConfiguration::createOutputFormatter() const { - return new QtOutputFormatter(qt4Target()->qt4Project()); + return new QtSupport::QtOutputFormatter(qt4Target()->qt4Project()); } void MaemoRunConfiguration::handleParseState(bool success) @@ -237,7 +237,7 @@ AbstractLinuxDeviceDeployStep *MaemoRunConfiguration::deployStep() const const QString MaemoRunConfiguration::targetRoot() const { QTC_ASSERT(activeQt4BuildConfiguration(), return QString()); - BaseQtVersion *v = activeQt4BuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *v = activeQt4BuildConfiguration()->qtVersion(); if (!v) return QString(); return MaemoGlobal::targetRoot(v->qmakeCommand()); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp index 6095405ca4..114fcabf06 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp @@ -36,12 +36,12 @@ #include "maemomanager.h" #include "maemoqtversion.h" #include "qt4projectmanagerconstants.h" -#include "qtversionmanager.h" #include <projectexplorer/gccparser.h> #include <projectexplorer/headerpath.h> #include <projectexplorer/toolchainmanager.h> #include <utils/environment.h> +#include <qtsupport/qtversionmanager.h> #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -99,7 +99,7 @@ bool MaemoToolChain::canClone() const void MaemoToolChain::addToEnvironment(Utils::Environment &env) const { - BaseQtVersion *v = QtVersionManager::instance()->version(m_qtVersionId); + QtSupport::BaseQtVersion *v = QtSupport::QtVersionManager::instance()->version(m_qtVersionId); if (!v) return; const QString maddeRoot = MaemoGlobal::maddeRoot(v->qmakeCommand()); @@ -129,7 +129,7 @@ void MaemoToolChain::addToEnvironment(Utils::Environment &env) const QString MaemoToolChain::sysroot() const { - BaseQtVersion *v = QtVersionManager::instance()->version(m_qtVersionId); + QtSupport::BaseQtVersion *v = QtSupport::QtVersionManager::instance()->version(m_qtVersionId); if (!v) return QString(); @@ -188,7 +188,7 @@ void MaemoToolChain::setQtVersionId(int id) return; } - MaemoQtVersion *version = dynamic_cast<MaemoQtVersion *>(QtVersionManager::instance()->version(id)); + MaemoQtVersion *version = dynamic_cast<MaemoQtVersion *>(QtSupport::QtVersionManager::instance()->version(id)); Q_ASSERT(version); ProjectExplorer::Abi::OSFlavor flavour = ProjectExplorer::Abi::HarmattanLinuxFlavor; if (version->osVersion() == MaemoDeviceConfig::Maemo5) @@ -229,7 +229,7 @@ MaemoToolChainConfigWidget::MaemoToolChainConfigWidget(MaemoToolChain *tc) : { QVBoxLayout *layout = new QVBoxLayout(this); QLabel *label = new QLabel; - BaseQtVersion *v = QtVersionManager::instance()->version(tc->qtVersionId()); + QtSupport::BaseQtVersion *v = QtSupport::QtVersionManager::instance()->version(tc->qtVersionId()); Q_ASSERT(v); label->setText(tr("<html><head/><body><table>" "<tr><td>Path to MADDE:</td><td>%1</td></tr>" @@ -276,12 +276,12 @@ QString MaemoToolChainFactory::id() const QList<ProjectExplorer::ToolChain *> MaemoToolChainFactory::autoDetect() { - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); connect(vm, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(handleQtVersionChanges(QList<int>))); QList<int> versionList; - foreach (BaseQtVersion *v, vm->versions()) + foreach (QtSupport::BaseQtVersion *v, vm->versions()) versionList.append(v->uniqueId()); return createToolChainList(versionList); @@ -298,11 +298,11 @@ void MaemoToolChainFactory::handleQtVersionChanges(const QList<int> &changes) QList<ProjectExplorer::ToolChain *> MaemoToolChainFactory::createToolChainList(const QList<int> &changes) { ProjectExplorer::ToolChainManager *tcm = ProjectExplorer::ToolChainManager::instance(); - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); QList<ProjectExplorer::ToolChain *> result; foreach (int i, changes) { - BaseQtVersion *v = vm->version(i); + QtSupport::BaseQtVersion *v = vm->version(i); if (!v || !v->isValid()) { // remove tool chain: QList<ProjectExplorer::ToolChain *> toRemove; diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp index 20de82fc70..b7de6ef659 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp @@ -50,7 +50,7 @@ #include <qt4projectmanager/qt4project.h> #include <utils/fileutils.h> #include <utils/filesystemwatcher.h> -#include <qt4projectmanager/baseqtversion.h> +#include <qtsupport/baseqtversion.h> #include <QtGui/QApplication> @@ -709,7 +709,7 @@ AbstractQt4MaemoTarget::ActionStatus AbstractDebBasedQt4MaemoTarget::createSpeci << QLatin1String("-s") << QLatin1String("-n") << QLatin1String("-p") << (defaultPackageFileName() + QLatin1Char('_') + AbstractMaemoPackageCreationStep::DefaultVersionNumber); - BaseQtVersion *lqt = activeBuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *lqt = activeBuildConfiguration()->qtVersion(); if (!lqt) { raiseError(tr("Unable to create Debian templates: No qt version set")); return ActionFailed; @@ -913,7 +913,7 @@ QString AbstractRpmBasedQt4MaemoTarget::shortDescription() const QString AbstractRpmBasedQt4MaemoTarget::packageFileName() const { - BaseQtVersion *lqt = activeBuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *lqt = activeBuildConfiguration()->qtVersion(); if (!lqt) return QString(); return packageName() + QLatin1Char('-') + projectVersion() + QLatin1Char('-') diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp index f0f118d137..ebbb55f079 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp @@ -55,7 +55,7 @@ using ProjectExplorer::idFromMap; Qt4MaemoTargetFactory::Qt4MaemoTargetFactory(QObject *parent) : Qt4BaseTargetFactory(parent) { - connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), this, SIGNAL(supportedTargetIdsChanged())); } @@ -73,11 +73,11 @@ QStringList Qt4MaemoTargetFactory::supportedTargetIds(ProjectExplorer::Project * QStringList targetIds; if (parent && !qobject_cast<Qt4Project *>(parent)) return targetIds; - if (!QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID)).isEmpty()) + if (!QtSupport::QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID)).isEmpty()) targetIds << QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID); - if (!QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID)).isEmpty()) + if (!QtSupport::QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID)).isEmpty()) targetIds << QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID); - if (!QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID)).isEmpty()) + if (!QtSupport::QtVersionManager::instance()->versionsForTargetId(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID)).isEmpty()) targetIds << QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID); return targetIds; } @@ -176,16 +176,16 @@ ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project if (!canCreate(parent, id)) return 0; - QList<BaseQtVersion *> knownVersions = QtVersionManager::instance()->versionsForTargetId(id); + QList<QtSupport::BaseQtVersion *> knownVersions = QtSupport::QtVersionManager::instance()->versionsForTargetId(id); if (knownVersions.isEmpty()) return 0; - BaseQtVersion *qtVersion = knownVersions.first(); - BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); + QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); QList<BuildConfigurationInfo> infos; infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString())); - infos.append(BuildConfigurationInfo(qtVersion, config ^ BaseQtVersion::DebugBuild, QString(), QString())); + infos.append(BuildConfigurationInfo(qtVersion, config ^ QtSupport::BaseQtVersion::DebugBuild, QString(), QString())); return create(parent, id, infos); } diff --git a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp index e223265953..4da2635526 100644 --- a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp @@ -41,7 +41,6 @@ #include "qt4buildconfiguration.h" #include "qt4symbiantarget.h" #include "qt4target.h" -#include "qtoutputformatter.h" #include "symbiandevicemanager.h" #include <coreplugin/icore.h> diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp index 12b85e1693..f180829186 100644 --- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp @@ -32,12 +32,12 @@ #include "gccetoolchain.h" #include "qt4projectmanagerconstants.h" -#include "qtversionmanager.h" #include <utils/environment.h> #include <utils/synchronousprocess.h> #include <projectexplorer/headerpath.h> #include <projectexplorer/toolchainmanager.h> +#include <qtsupport/qtversionmanager.h> #include <QtCore/QDir> @@ -173,7 +173,7 @@ QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect() // Compatibility to pre-2.2: while (true) { - const QString path = QtVersionManager::instance()->popPendingGcceUpdate(); + const QString path = QtSupport::QtVersionManager::instance()->popPendingGcceUpdate(); if (path.isNull()) break; diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp index 474cd64cf9..2b22ecbcb4 100644 --- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp @@ -58,7 +58,7 @@ using namespace Qt4ProjectManager::Internal; Qt4SymbianTargetFactory::Qt4SymbianTargetFactory(QObject *parent) : Qt4BaseTargetFactory(parent) { - connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)), this, SIGNAL(supportedTargetIdsChanged())); } @@ -79,9 +79,9 @@ QStringList Qt4SymbianTargetFactory::supportedTargetIds(ProjectExplorer::Project QStringList ids; // The QtVersionManager will just check whether theres - if (QtVersionManager::instance()->supportsTargetId(Constants::S60_DEVICE_TARGET_ID)) + if (QtSupport::QtVersionManager::instance()->supportsTargetId(Constants::S60_DEVICE_TARGET_ID)) ids << QLatin1String(Constants::S60_DEVICE_TARGET_ID); - if (QtVersionManager::instance()->supportsTargetId(Constants::S60_EMULATOR_TARGET_ID)) + if (QtSupport::QtVersionManager::instance()->supportsTargetId(Constants::S60_EMULATOR_TARGET_ID)) ids << QLatin1String(Constants::S60_EMULATOR_TARGET_ID); return ids; @@ -162,7 +162,7 @@ QList<ProjectExplorer::Task> Qt4SymbianTargetFactory::reportIssues(const QString return results; } -QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion) +QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &minimumQtVersion) { QList<BuildConfigurationInfo> infos = Qt4BaseTargetFactory::availableBuildConfigurations(id, proFilePath, minimumQtVersion); if (id != Constants::S60_EMULATOR_TARGET_ID) @@ -170,7 +170,7 @@ QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurati // For emulator filter out all non debug builds QList<BuildConfigurationInfo> tmp; foreach (const BuildConfigurationInfo &info, infos) - if (info.buildConfig & BaseQtVersion::DebugBuild) + if (info.buildConfig & QtSupport::BaseQtVersion::DebugBuild) tmp << info; return tmp; } @@ -192,22 +192,22 @@ ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Projec if (!canCreate(parent, id)) return 0; - QList<BaseQtVersion *> knownVersions = QtVersionManager::instance()->versionsForTargetId(id); + QList<QtSupport::BaseQtVersion *> knownVersions = QtSupport::QtVersionManager::instance()->versionsForTargetId(id); if (knownVersions.isEmpty()) return 0; - BaseQtVersion *qtVersion = knownVersions.first(); - BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); + QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); QList<BuildConfigurationInfo> infos; if (id != Constants::S60_EMULATOR_TARGET_ID) { infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString())); - infos.append(BuildConfigurationInfo(qtVersion, config ^ BaseQtVersion::DebugBuild, QString(), QString())); + infos.append(BuildConfigurationInfo(qtVersion, config ^ QtSupport::BaseQtVersion::DebugBuild, QString(), QString())); } else { - if (config & BaseQtVersion::DebugBuild) + if (config & QtSupport::BaseQtVersion::DebugBuild) infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString())); else - infos.append(BuildConfigurationInfo(qtVersion, config ^ BaseQtVersion::DebugBuild, QString(), QString())); + infos.append(BuildConfigurationInfo(qtVersion, config ^ QtSupport::BaseQtVersion::DebugBuild, QString(), QString())); } return create(parent, id, infos); diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h index c56965b589..74145f5e9a 100644 --- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h +++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h @@ -59,7 +59,7 @@ public: QString shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix); QList<ProjectExplorer::Task> reportIssues(const QString &proFile); - QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion); + QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &minimumQtVersion); bool isMobileTarget(const QString &id); bool supportsShadowBuilds(const QString &id); }; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp index d3f7997a91..aa27522766 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp @@ -267,7 +267,7 @@ ProjectExplorer::ToolChain *S60DeployConfiguration::toolChain() const bool S60DeployConfiguration::isDebug() const { const Qt4BuildConfiguration *qt4bc = qt4Target()->activeBuildConfiguration(); - return (qt4bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild); + return (qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild); } QString S60DeployConfiguration::symbianTarget() const @@ -275,7 +275,7 @@ QString S60DeployConfiguration::symbianTarget() const return isDebug() ? QLatin1String("udeb") : QLatin1String("urel"); } -const BaseQtVersion *S60DeployConfiguration::qtVersion() const +const QtSupport::BaseQtVersion *S60DeployConfiguration::qtVersion() const { if (const Qt4BuildConfiguration *qt4bc = qt4Target()->activeBuildConfiguration()) return qt4bc->qtVersion(); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h index 93c6496f47..130fb395f9 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h @@ -41,8 +41,11 @@ class RunConfiguration; class ToolChain; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; +} + +namespace Qt4ProjectManager { namespace Internal { class Qt4SymbianTarget; @@ -71,7 +74,7 @@ public: ProjectExplorer::DeployConfigurationWidget *configurationWidget() const; - const BaseQtVersion *qtVersion() const; + const QtSupport::BaseQtVersion *qtVersion() const; Qt4SymbianTarget *qt4Target() const; ProjectExplorer::ToolChain *toolChain() const; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index 4c710c1a59..e1c342dcee 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -38,10 +38,8 @@ #include "s60manager.h" #include "s60runconfigbluetoothstarter.h" #include "qt4projectmanagerconstants.h" -#include "qtoutputformatter.h" #include "qt4symbiantarget.h" #include "codaruncontrol.h" -#include "baseqtversion.h" #include "symbianqtversion.h" #include <utils/qtcassert.h> @@ -51,6 +49,8 @@ #include <debugger/debuggerengine.h> #include <debugger/debuggerstartparameters.h> +#include <qtsupport/qtoutputformatter.h> +#include <qtsupport/baseqtversion.h> #include <QtGui/QMessageBox> #include <QtGui/QMainWindow> @@ -175,7 +175,7 @@ QWidget *S60DeviceRunConfiguration::createConfigurationWidget() Utils::OutputFormatter *S60DeviceRunConfiguration::createOutputFormatter() const { - return new QtOutputFormatter(qt4Target()->qt4Project()); + return new QtSupport::QtOutputFormatter(qt4Target()->qt4Project()); } QVariantMap S60DeviceRunConfiguration::toMap() const @@ -236,7 +236,7 @@ SymbianQtVersion *S60DeviceRunConfiguration::qtVersion() const bool S60DeviceRunConfiguration::isDebug() const { const Qt4BuildConfiguration *qt4bc = qt4Target()->activeBuildConfiguration(); - return (qt4bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild); + return (qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild); } QString S60DeviceRunConfiguration::symbianTarget() const diff --git a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp index ad0c4a190f..f856e6feea 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp @@ -37,13 +37,13 @@ #include "s60manager.h" #include "qt4symbiantarget.h" #include "qt4projectmanagerconstants.h" -#include "qtoutputformatter.h" -#include "baseqtversion.h" #include <projectexplorer/projectexplorerconstants.h> #include <utils/qtcassert.h> #include <utils/detailswidget.h> +#include <qtsupport/qtoutputformatter.h> +#include <qtsupport/baseqtversion.h> #include <QtGui/QLabel> #include <QtGui/QVBoxLayout> @@ -158,7 +158,7 @@ QWidget *S60EmulatorRunConfiguration::createConfigurationWidget() Utils::OutputFormatter *S60EmulatorRunConfiguration::createOutputFormatter() const { - return new QtOutputFormatter(qt4Target()->qt4Project()); + return new QtSupport::QtOutputFormatter(qt4Target()->qt4Project()); } QVariantMap S60EmulatorRunConfiguration::toMap() const @@ -188,10 +188,10 @@ bool S60EmulatorRunConfiguration::fromMap(const QVariantMap &map) QString S60EmulatorRunConfiguration::executable() const { Qt4BuildConfiguration *qt4bc = qt4Target()->activeBuildConfiguration(); - BaseQtVersion *qtVersion = qt4bc->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion(); QString baseDir = qtVersion->systemRoot(); QString qmakeBuildConfig = "urel"; - if (qt4bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild) + if (qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild) qmakeBuildConfig = "udeb"; baseDir += "/epoc32/release/winscw/" + qmakeBuildConfig; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp index c16ff32f86..3b5f639259 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp @@ -39,16 +39,15 @@ #include "qmakestep.h" #include "makestep.h" #include "qt4project.h" -#include "qtversionmanager.h" - -#include "profilereader.h" -#include "prowriter.h" #include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildstep.h> +#include <qtsupport/qtversionmanager.h> +#include <qtsupport/profilereader.h> #include <utils/qtcassert.h> #include <utils/fileutils.h> +#include <proparser/prowriter.h> #include <QtCore/QProcess> @@ -400,7 +399,7 @@ void S60PublisherOvi::runCreateSis(int result) const ProjectExplorer::ProcessParameters * const makepp = makeStep->processParameters(); QString makeTarget = QLatin1String(" unsigned_installer_sis"); - if (m_qt4bc->qtVersion()->qtVersion() == QtVersionNumber(4,6,3) ) + if (m_qt4bc->qtVersion()->qtVersion() == QtSupport::QtVersionNumber(4,6,3) ) makeTarget = QLatin1String(" installer_sis"); runStep(result, tr("Making Sis File"), @@ -416,7 +415,7 @@ void S60PublisherOvi::endBuild(int result) emit progressReport(QString(m_createSisProc->readAllStandardError() + '\n'), m_errorColor); QString fileNamePostFix = QLatin1String("_installer_unsigned.sis"); - if (m_qt4bc->qtVersion()->qtVersion() == QtVersionNumber(4,6,3) ) + if (m_qt4bc->qtVersion()->qtVersion() == QtSupport::QtVersionNumber(4,6,3) ) fileNamePostFix = QLatin1String("_installer.sis"); QString resultFile = m_qt4bc->buildDirectory() + QLatin1Char('/') + m_qt4project->displayName() + fileNamePostFix; @@ -436,7 +435,7 @@ void S60PublisherOvi::endBuild(int result) QString S60PublisherOvi::createdSisFileContainingFolder() { QString fileNamePostFix = QLatin1String("_installer_unsigned.sis"); - if (m_qt4bc->qtVersion()->qtVersion() == QtVersionNumber(4,6,3) ) + if (m_qt4bc->qtVersion()->qtVersion() == QtSupport::QtVersionNumber(4,6,3) ) fileNamePostFix = QLatin1String("_installer.sis"); QString resultFile = m_qt4bc->buildDirectory() + '/' + m_qt4project->displayName() + fileNamePostFix; @@ -448,7 +447,7 @@ QString S60PublisherOvi::createdSisFileContainingFolder() QString S60PublisherOvi::createdSisFilePath() { QString fileNamePostFix = QLatin1String("_installer_unsigned.sis"); - if (m_qt4bc->qtVersion()->qtVersion() == QtVersionNumber(4,6,3) ) + if (m_qt4bc->qtVersion()->qtVersion() == QtSupport::QtVersionNumber(4,6,3) ) fileNamePostFix = QLatin1String("_installer.sis"); QString resultFile = m_qt4bc->buildDirectory() + '/' + m_qt4project->displayName() + fileNamePostFix; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h index 49d14c5ffb..8369473119 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h @@ -39,6 +39,10 @@ QT_BEGIN_NAMESPACE class QProcess; QT_END_NAMESPACE +namespace QtSupport { +class ProFileReader; +} + namespace ProjectExplorer { class Project; } @@ -48,7 +52,6 @@ class Qt4BuildConfiguration; class Qt4Project; namespace Internal { class Qt4SymbianTarget; -class ProFileReader; namespace Constants { const char * const REJECTED_VENDOR_NAMES_VENDOR = "Vendor"; @@ -163,7 +166,7 @@ private: Qt4BuildConfiguration * m_qt4bc; const Qt4SymbianTarget * m_activeTargetOfProject; Qt4Project * m_qt4project; - ProFileReader *m_reader; + QtSupport::ProFileReader *m_reader; QStringList m_rejectedVendorNames; QStringList m_capabilitiesForCertifiedSigned; QStringList m_capabilitesForManufacturerApproved; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp index 6c77c3c283..86ed6fdb67 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp @@ -63,7 +63,7 @@ S60PublishingBuildSettingsPageOvi::S60PublishingBuildSettingsPageOvi(S60Publishe = qobject_cast<Qt4BuildConfiguration *>(bc); if (!qt4bc || !qt4bc->qtVersion()) continue; - if (qt4bc->qtVersion()->qtVersion() > QtVersionNumber(4, 6, 2)) + if (qt4bc->qtVersion()->qtVersion() > QtSupport::QtVersionNumber(4, 6, 2)) list << qt4bc; } break; @@ -74,7 +74,7 @@ S60PublishingBuildSettingsPageOvi::S60PublishingBuildSettingsPageOvi(S60Publishe // todo more intelligent selection? prefer newer versions? foreach (Qt4BuildConfiguration *qt4bc, list) - if (!m_bc && !(qt4bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)) + if (!m_bc && !(qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild)) m_bc = qt4bc; if (!m_bc && !list.isEmpty()) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp index 0e4d78a60c..e97b888492 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp @@ -38,7 +38,6 @@ #include "qt4buildconfiguration.h" #include "qt4symbiantarget.h" #include "qt4target.h" -#include "qtoutputformatter.h" #include <utils/qtcassert.h> @@ -93,7 +92,7 @@ S60RunControlBase::S60RunControlBase(RunConfiguration *runConfiguration, const Q m_commandLineArguments.prepend(' '); m_commandLineArguments.prepend(qmlArgs); } - if (const BaseQtVersion *qtv = activeBuildConf->qtVersion()) { + if (const QtSupport::BaseQtVersion *qtv = activeBuildConf->qtVersion()) { m_qtDir = qtv->versionInfo().value("QT_INSTALL_DATA"); m_qtBinPath = qtv->versionInfo().value(QLatin1String("QT_INSTALL_BINS")); } diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp index 96b883ce00..0f3fd9759c 100644 --- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp @@ -34,16 +34,18 @@ #include "symbianqtversion.h" #include "qt-s60/sbsv2parser.h" #include "qt-s60/abldparser.h" -#include "profileevaluator.h" #include <projectexplorer/gnumakeparser.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/toolchain.h> #include <projectexplorer/toolchainmanager.h> +#include <qtsupport/qtsupportconstants.h> #include <utils/pathchooser.h> +#include <proparser/profileevaluator.h> #include <QtCore/QCoreApplication> #include <QtCore/QDir> +#include <QtCore/QSettings> #include <QtGui/QLabel> #include <QtGui/QFormLayout> @@ -84,7 +86,7 @@ bool SymbianQtVersion::equals(BaseQtVersion *other) QString SymbianQtVersion::type() const { - return QLatin1String(Constants::SYMBIANQT); + return QLatin1String(QtSupport::Constants::SYMBIANQT); } bool SymbianQtVersion::isValid() const @@ -134,6 +136,12 @@ bool SymbianQtVersion::toolChainAvailable(const QString &id) const return false; } +void SymbianQtVersion::restoreLegacySettings(QSettings *s) +{ + setSystemRoot(QDir::fromNativeSeparators(s->value("S60SDKDirectory").toString())); + setSbsV2Directory(QDir::fromNativeSeparators(s->value(QLatin1String("SBSv2Directory")).toString())); +} + void SymbianQtVersion::fromMap(const QVariantMap &map) { BaseQtVersion::fromMap(map); @@ -344,7 +352,7 @@ QString SymbianQtVersion::systemRoot() const return m_systemRoot; } -QtConfigWidget *SymbianQtVersion::createConfigurationWidget() const +QtSupport::QtConfigWidget *SymbianQtVersion::createConfigurationWidget() const { return new SymbianQtConfigWidget(const_cast<SymbianQtVersion *>(this)); } diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h index 67001234df..6da4ed421a 100644 --- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h +++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h @@ -33,12 +33,12 @@ #ifndef SYMBIANQTVERSION_H #define SYMBIANQTVERSION_H -#include "baseqtversion.h" +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager { namespace Internal { -class SymbianQtVersion : public BaseQtVersion +class SymbianQtVersion : public QtSupport::BaseQtVersion { public: SymbianQtVersion(); @@ -55,6 +55,7 @@ public: virtual bool toolChainAvailable(const QString &id) const; + virtual void restoreLegacySettings(QSettings *s); virtual void fromMap(const QVariantMap &map); virtual QVariantMap toMap() const; @@ -80,7 +81,7 @@ public: QString sbsV2Directory() const; void setSbsV2Directory(const QString &directory); - virtual QtConfigWidget *createConfigurationWidget() const; + virtual QtSupport::QtConfigWidget *createConfigurationWidget() const; protected: QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir); @@ -92,7 +93,7 @@ private: mutable bool m_isBuildUsingSbsV2; }; -class SymbianQtConfigWidget : public QtConfigWidget +class SymbianQtConfigWidget : public QtSupport::QtConfigWidget { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp index 8777d8d69e..81913a07a2 100644 --- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp @@ -35,6 +35,9 @@ #include "qt4projectmanagerconstants.h" #include "symbianqtversion.h" +#include <qtsupport/profilereader.h> +#include <qtsupport/qtsupportconstants.h> + #include <QtCore/QFileInfo> using namespace Qt4ProjectManager; @@ -53,10 +56,10 @@ SymbianQtVersionFactory::~SymbianQtVersionFactory() bool SymbianQtVersionFactory::canRestore(const QString &type) { - return type == QLatin1String(Constants::SYMBIANQT); + return type == QLatin1String(QtSupport::Constants::SYMBIANQT); } -BaseQtVersion *SymbianQtVersionFactory::restore(const QVariantMap &data) +QtSupport::BaseQtVersion *SymbianQtVersionFactory::restore(const QVariantMap &data) { SymbianQtVersion *v = new SymbianQtVersion; v->fromMap(data); @@ -68,7 +71,7 @@ int SymbianQtVersionFactory::priority() const return 50; } -BaseQtVersion *SymbianQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) +QtSupport::BaseQtVersion *SymbianQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) { QFileInfo fi(qmakePath); if (!fi.exists() || !fi.isExecutable() || !fi.isFile()) diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h index 49959e0b27..21fe875470 100644 --- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h +++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h @@ -33,22 +33,22 @@ #ifndef SYMBIANQTVERSIONFACTORY_H #define SYMBIANQTVERSIONFACTORY_H -#include "qtversionfactory.h" +#include <qtsupport/qtversionfactory.h> namespace Qt4ProjectManager { namespace Internal { -class SymbianQtVersionFactory : public QtVersionFactory +class SymbianQtVersionFactory : public QtSupport::QtVersionFactory { public: explicit SymbianQtVersionFactory(QObject *parent = 0); ~SymbianQtVersionFactory(); virtual bool canRestore(const QString &type); - virtual BaseQtVersion *restore(const QVariantMap &data); + virtual QtSupport::BaseQtVersion *restore(const QVariantMap &data); virtual int priority() const; - virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + virtual QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); }; } // Internal diff --git a/src/plugins/qt4projectmanager/qt-s60/trkruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/trkruncontrol.cpp index bf28a3d39d..8e3d3c4296 100644 --- a/src/plugins/qt4projectmanager/qt-s60/trkruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/trkruncontrol.cpp @@ -39,7 +39,6 @@ #include "qt4buildconfiguration.h" #include "qt4symbiantarget.h" #include "qt4target.h" -#include "qtoutputformatter.h" #include <symbianutils/bluetoothlistener_gui.h> #include <symbianutils/launcher.h> diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp index 99183d16b4..367d6f52c0 100644 --- a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp @@ -33,7 +33,6 @@ #include "winscwtoolchain.h" #include "qt4projectmanager/qt4projectmanagerconstants.h" -#include "qtversionmanager.h" #include "ui_winscwtoolchainconfigwidget.h" #include "winscwparser.h" @@ -41,6 +40,7 @@ #include <projectexplorer/abi.h> #include <projectexplorer/headerpath.h> #include <utils/environment.h> +#include <qtsupport/qtversionmanager.h> #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -387,7 +387,7 @@ QList<ProjectExplorer::ToolChain *> WinscwToolChainFactory::autoDetect() // Compatibility to pre-2.2: while (true) { - const QString path = QtVersionManager::instance()->popPendingMwcUpdate(); + const QString path = QtSupport::QtVersionManager::instance()->popPendingMwcUpdate(); if (path.isNull()) break; diff --git a/src/plugins/qt4projectmanager/qt4basetargetfactory.h b/src/plugins/qt4projectmanager/qt4basetargetfactory.h index c697187100..b8f813959d 100644 --- a/src/plugins/qt4projectmanager/qt4basetargetfactory.h +++ b/src/plugins/qt4projectmanager/qt4basetargetfactory.h @@ -40,9 +40,12 @@ #include <QtCore/QList> +namespace QtSupport { +class QtVersionNumber; +} + namespace Qt4ProjectManager { class Qt4TargetSetupWidget; -class QtVersionNumber; struct BuildConfigurationInfo; class QT4PROJECTMANAGER_EXPORT Qt4BaseTargetFactory : public ProjectExplorer::ITargetFactory @@ -54,7 +57,7 @@ public: virtual Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id, const QString &proFilePath, - const QtVersionNumber &minimumQtVersion, + const QtSupport::QtVersionNumber &minimumQtVersion, bool importEnabled, QList<BuildConfigurationInfo> importInfos); @@ -66,7 +69,7 @@ public: /// used by the default implementation of createTargetSetupWidget /// not needed otherwise /// by default creates one debug + one release buildconfiguration per qtversion - virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion); + virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &minimumQtVersion); virtual QList<ProjectExplorer::Task> reportIssues(const QString &proFile); /// only used in the TargetSetupPage @@ -81,6 +84,8 @@ public: static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const QString &id); + static QList<Qt4BaseTargetFactory *> qt4BaseTargetFactoriesForIds(const QStringList &ids); + protected: static QString msgBuildConfigurationName(const BuildConfigurationInfo &info); }; diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp index 5ecba6efbb..cddecb48e4 100644 --- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp @@ -38,8 +38,6 @@ #include "qt4nodes.h" #include "qmakestep.h" #include "makestep.h" -#include "qtversionfactory.h" -#include "baseqtversion.h" #include "qt4basetargetfactory.h" #include <utils/qtcassert.h> @@ -48,6 +46,8 @@ #include <projectexplorer/buildsteplist.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/toolchainmanager.h> +#include <qtsupport/qtversionfactory.h> +#include <qtsupport/baseqtversion.h> #include <QtCore/QDebug> @@ -118,7 +118,7 @@ QVariantMap Qt4BuildConfiguration::toMap() const return map; } -static inline QString msgBuildConfigNotApplicable(const QString &d, const BaseQtVersion *qtVersion, +static inline QString msgBuildConfigNotApplicable(const QString &d, const QtSupport::BaseQtVersion *qtVersion, const Target *target) { return QString::fromLatin1("Warning: Buildconfiguration '%1' : Qt '%2' from %3 not supported by target '%4'"). @@ -133,15 +133,15 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map) m_shadowBuild = map.value(QLatin1String(USE_SHADOW_BUILD_KEY), true).toBool(); m_qtVersionId = map.value(QLatin1String(QT_VERSION_ID_KEY)).toInt(); ProjectExplorer::ToolChain *tc = toolChain(); - m_qmakeBuildConfiguration = BaseQtVersion::QmakeBuildConfigs(map.value(QLatin1String(BUILD_CONFIGURATION_KEY)).toInt()); + m_qmakeBuildConfiguration = QtSupport::BaseQtVersion::QmakeBuildConfigs(map.value(QLatin1String(BUILD_CONFIGURATION_KEY)).toInt()); m_buildDirectory = map.value(QLatin1String(BUILD_DIRECTORY_KEY), defaultShadowBuildDirectory()).toString(); // Pick a Qt version if the default version is used: // We assume that the default Qt version was used in earlier versions of Qt creator. // Pick a Qt version that supports this target (usually desktop) if (m_qtVersionId == 0) { - QList<BaseQtVersion *> versions = QtVersionManager::instance()->versionsForTargetId(target()->id()); - foreach (BaseQtVersion *v, versions) { + QList<QtSupport::BaseQtVersion *> versions = QtSupport::QtVersionManager::instance()->versionsForTargetId(target()->id()); + foreach (QtSupport::BaseQtVersion *v, versions) { if (v->isValid()) { m_qtVersionId = v->uniqueId(); break; @@ -151,7 +151,7 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map) m_qtVersionId = -1; } - BaseQtVersion *version = QtVersionManager::instance()->version(m_qtVersionId); + QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::instance()->version(m_qtVersionId); if (!version || !version->supportsTargetId(target()->id())) { m_qtVersionId = -1; version = 0; @@ -188,7 +188,7 @@ void Qt4BuildConfiguration::ctor() connect(this, SIGNAL(environmentChanged()), this, SLOT(emitProFileEvaluteNeeded())); - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); connect(vm, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(qtVersionsChanged(QList<int>))); } @@ -285,7 +285,7 @@ QString Qt4BuildConfiguration::shadowBuildDirectory() const void Qt4BuildConfiguration::setShadowBuildAndDirectory(bool shadowBuild, const QString &buildDirectory) { - BaseQtVersion *version = qtVersion(); + QtSupport::BaseQtVersion *version = qtVersion(); QString directoryToSet = buildDirectory; bool toSet = (shadowBuild && version && version->isValid() && version->supportsShadowBuilds()); if (m_shadowBuild == toSet && m_buildDirectory == directoryToSet) @@ -305,10 +305,10 @@ QString Qt4BuildConfiguration::makeCommand() const return tc ? tc->makeCommand() : "make"; } -static inline QString symbianMakeTarget(BaseQtVersion::QmakeBuildConfigs buildConfig, +static inline QString symbianMakeTarget(QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig, const QString &type) { - QString rc = (buildConfig & BaseQtVersion::DebugBuild) ? + QString rc = (buildConfig & QtSupport::BaseQtVersion::DebugBuild) ? QLatin1String("debug-") : QLatin1String("release-"); rc += type; return rc; @@ -319,7 +319,7 @@ QString Qt4BuildConfiguration::defaultMakeTarget() const ToolChain *tc = toolChain(); if (!tc || target()->id() != Constants::S60_DEVICE_TARGET_ID) return QString(); - const BaseQtVersion::QmakeBuildConfigs buildConfig = qmakeBuildConfiguration(); + const QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig = qmakeBuildConfiguration(); return symbianMakeTarget(buildConfig, tc->defaultMakeTarget()); } @@ -329,13 +329,13 @@ QString Qt4BuildConfiguration::makefile() const return qt4Target()->qt4Project()->rootProjectNode()->makefile(); } -BaseQtVersion *Qt4BuildConfiguration::qtVersion() const +QtSupport::BaseQtVersion *Qt4BuildConfiguration::qtVersion() const { - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); return vm->version(m_qtVersionId); } -void Qt4BuildConfiguration::setQtVersion(BaseQtVersion *version) +void Qt4BuildConfiguration::setQtVersion(QtSupport::BaseQtVersion *version) { if (version == 0) { m_qtVersionId = -1; @@ -373,12 +373,12 @@ void Qt4BuildConfiguration::setToolChain(ProjectExplorer::ToolChain *tc) emitBuildDirectoryChanged(); } -BaseQtVersion::QmakeBuildConfigs Qt4BuildConfiguration::qmakeBuildConfiguration() const +QtSupport::BaseQtVersion::QmakeBuildConfigs Qt4BuildConfiguration::qmakeBuildConfiguration() const { return m_qmakeBuildConfiguration; } -void Qt4BuildConfiguration::setQMakeBuildConfiguration(BaseQtVersion::QmakeBuildConfigs config) +void Qt4BuildConfiguration::setQMakeBuildConfiguration(QtSupport::BaseQtVersion::QmakeBuildConfigs config) { if (m_qmakeBuildConfiguration == config) return; @@ -413,20 +413,20 @@ void Qt4BuildConfiguration::emitS60CreatesSmartInstallerChanged() QStringList Qt4BuildConfiguration::configCommandLineArguments() const { QStringList result; - BaseQtVersion::QmakeBuildConfigs defaultBuildConfiguration = qtVersion() ? qtVersion()->defaultBuildConfig() : (BaseQtVersion::DebugBuild | BaseQtVersion::BuildAll); - BaseQtVersion::QmakeBuildConfigs userBuildConfiguration = m_qmakeBuildConfiguration; - if ((defaultBuildConfiguration & BaseQtVersion::BuildAll) && !(userBuildConfiguration & BaseQtVersion::BuildAll)) + QtSupport::BaseQtVersion::QmakeBuildConfigs defaultBuildConfiguration = qtVersion() ? qtVersion()->defaultBuildConfig() : (QtSupport::BaseQtVersion::DebugBuild | QtSupport::BaseQtVersion::BuildAll); + QtSupport::BaseQtVersion::QmakeBuildConfigs userBuildConfiguration = m_qmakeBuildConfiguration; + if ((defaultBuildConfiguration & QtSupport::BaseQtVersion::BuildAll) && !(userBuildConfiguration & QtSupport::BaseQtVersion::BuildAll)) result << "CONFIG-=debug_and_release"; - if (!(defaultBuildConfiguration & BaseQtVersion::BuildAll) && (userBuildConfiguration & BaseQtVersion::BuildAll)) + if (!(defaultBuildConfiguration & QtSupport::BaseQtVersion::BuildAll) && (userBuildConfiguration & QtSupport::BaseQtVersion::BuildAll)) result << "CONFIG+=debug_and_release"; - if ((defaultBuildConfiguration & BaseQtVersion::DebugBuild) - && !(userBuildConfiguration & BaseQtVersion::DebugBuild) - && !(userBuildConfiguration & BaseQtVersion::BuildAll)) + if ((defaultBuildConfiguration & QtSupport::BaseQtVersion::DebugBuild) + && !(userBuildConfiguration & QtSupport::BaseQtVersion::DebugBuild) + && !(userBuildConfiguration & QtSupport::BaseQtVersion::BuildAll)) result << "CONFIG+=release"; - if (!(defaultBuildConfiguration & BaseQtVersion::DebugBuild) - && (userBuildConfiguration & BaseQtVersion::DebugBuild) - && !(userBuildConfiguration & BaseQtVersion::BuildAll)) + if (!(defaultBuildConfiguration & QtSupport::BaseQtVersion::DebugBuild) + && (userBuildConfiguration & QtSupport::BaseQtVersion::DebugBuild) + && !(userBuildConfiguration & QtSupport::BaseQtVersion::BuildAll)) result << "CONFIG+=debug"; return result; } @@ -465,14 +465,14 @@ bool Qt4BuildConfiguration::compareToImportFrom(const QString &makefile) { QMakeStep *qs = qmakeStep(); if (QFileInfo(makefile).exists() && qs) { - QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(makefile); - BaseQtVersion *version = qtVersion(); + QString qmakePath = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(makefile); + QtSupport::BaseQtVersion *version = qtVersion(); if (!version) return false; if (version->qmakeCommand() == qmakePath) { // same qtversion - QPair<BaseQtVersion::QmakeBuildConfigs, QString> result = - QtVersionManager::scanMakeFile(makefile, version->defaultBuildConfig()); + QPair<QtSupport::BaseQtVersion::QmakeBuildConfigs, QString> result = + QtSupport::QtVersionManager::scanMakeFile(makefile, version->defaultBuildConfig()); if (qmakeBuildConfiguration() == result.first) { // The qmake Build Configuration are the same, // now compare arguments lists @@ -543,7 +543,7 @@ void Qt4BuildConfiguration::removeQMLInspectorFromArguments(QString *args) } QString Qt4BuildConfiguration::extractSpecFromArguments(QString *args, - const QString &directory, const BaseQtVersion *version, + const QString &directory, const QtSupport::BaseQtVersion *version, QStringList *outArgs) { QString parsedSpec; @@ -652,7 +652,7 @@ Qt4BuildConfigurationFactory::Qt4BuildConfigurationFactory(QObject *parent) : { update(); - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); connect(vm, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(update())); } @@ -664,8 +664,8 @@ Qt4BuildConfigurationFactory::~Qt4BuildConfigurationFactory() void Qt4BuildConfigurationFactory::update() { m_versions.clear(); - QtVersionManager *vm = QtVersionManager::instance(); - foreach (BaseQtVersion *version, vm->validVersions()) { + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); + foreach (QtSupport::BaseQtVersion *version, vm->validVersions()) { QString key = QString::fromLatin1(QT4_BC_ID_PREFIX) + QString::fromLatin1("Qt%1").arg(version->uniqueId()); VersionInfo info(tr("Using Qt Version \"%1\"").arg(version->displayName()), version->uniqueId()); @@ -680,7 +680,7 @@ QStringList Qt4BuildConfigurationFactory::availableCreationIds(ProjectExplorer:: return QStringList(); QStringList results; - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); for (QMap<QString, VersionInfo>::const_iterator i = m_versions.constBegin(); i != m_versions.constEnd(); ++i) { if (vm->version(i.value().versionId)->supportsTargetId(parent->id()) @@ -704,7 +704,7 @@ bool Qt4BuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, co if (!m_versions.contains(id)) return false; const VersionInfo &info = m_versions.value(id); - BaseQtVersion *version = QtVersionManager::instance()->version(info.versionId); + QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::instance()->version(info.versionId); if (!version || !version->supportsTargetId(parent->id())) return false; @@ -717,7 +717,7 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target return 0; const VersionInfo &info = m_versions.value(id); - BaseQtVersion *version = QtVersionManager::instance()->version(info.versionId); + QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::instance()->version(info.versionId); Q_ASSERT(version); Qt4BaseTarget *qt4Target = static_cast<Qt4BaseTarget *>(parent); @@ -736,14 +736,14 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target //: Debug build configuration. We recommend not translating it. BuildConfiguration *bc = qt4Target->addQt4BuildConfiguration(tr("%1 Debug").arg(buildConfigurationName), version, - (version->defaultBuildConfig() | BaseQtVersion::DebugBuild), + (version->defaultBuildConfig() | QtSupport::BaseQtVersion::DebugBuild), QString(), QString()); if (qt4Target->id() != Constants::S60_EMULATOR_TARGET_ID) { //: Release build configuration. We recommend not translating it. bc = qt4Target->addQt4BuildConfiguration(tr("%1 Release").arg(buildConfigurationName), version, - (version->defaultBuildConfig() & ~BaseQtVersion::DebugBuild), + (version->defaultBuildConfig() & ~QtSupport::BaseQtVersion::DebugBuild), QString(), QString()); } return bc; @@ -757,7 +757,7 @@ bool Qt4BuildConfigurationFactory::canClone(ProjectExplorer::Target *parent, Pro if (!qt4bc) return false; - BaseQtVersion *version = qt4bc->qtVersion(); + QtSupport::BaseQtVersion *version = qt4bc->qtVersion(); if (!version || !version->supportsTargetId(parent->id())) return false; @@ -804,18 +804,18 @@ void Qt4BuildConfiguration::importFromBuildDirectory() else mkfile.append(makefile()); - QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(mkfile); + QString qmakePath = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(mkfile); if (!qmakePath.isEmpty()) { - QtVersionManager *vm = QtVersionManager::instance(); - BaseQtVersion *version = vm->qtVersionForQMakeBinary(qmakePath); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); + QtSupport::BaseQtVersion *version = vm->qtVersionForQMakeBinary(qmakePath); if (!version) { - version = QtVersionFactory::createQtVersionFromQMakePath(qmakePath); + version = QtSupport::QtVersionFactory::createQtVersionFromQMakePath(qmakePath); vm->addVersion(version); } - QPair<BaseQtVersion::QmakeBuildConfigs, QString> result = - QtVersionManager::scanMakeFile(mkfile, version->defaultBuildConfig()); - BaseQtVersion::QmakeBuildConfigs qmakeBuildConfig = result.first; + QPair<QtSupport::BaseQtVersion::QmakeBuildConfigs, QString> result = + QtSupport::QtVersionManager::scanMakeFile(mkfile, version->defaultBuildConfig()); + QtSupport::BaseQtVersion::QmakeBuildConfigs qmakeBuildConfig = result.first; QString aa = result.second; QString parsedSpec = Qt4BuildConfiguration::extractSpecFromArguments(&aa, directory, version); @@ -840,8 +840,8 @@ void Qt4BuildConfiguration::importFromBuildDirectory() // If we are switching to BuildAll we want "release" in there and no "debug" // or "debug" in there and no "release" // If we are switching to not BuildAll we want neither "release" nor "debug" in there - bool debug = qmakeBuildConfig & BaseQtVersion::DebugBuild; - bool haveTag = !(qmakeBuildConfig & BaseQtVersion::BuildAll); + bool debug = qmakeBuildConfig & QtSupport::BaseQtVersion::DebugBuild; + bool haveTag = !(qmakeBuildConfig & QtSupport::BaseQtVersion::BuildAll); QString makeCmdArguments = makeStep()->userArguments(); Utils::QtcProcess::ArgIterator ait(&makeCmdArguments); while (ait.next()) { @@ -866,7 +866,7 @@ void Qt4BuildConfiguration::importFromBuildDirectory() BuildConfiguration::BuildType Qt4BuildConfiguration::buildType() const { - if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild) + if (qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild) return Debug; else return Release; diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.h b/src/plugins/qt4projectmanager/qt4buildconfiguration.h index 18355a88d0..f092771907 100644 --- a/src/plugins/qt4projectmanager/qt4buildconfiguration.h +++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.h @@ -33,10 +33,10 @@ #ifndef QT4BUILDCONFIGURATION_H #define QT4BUILDCONFIGURATION_H -#include "qtversionmanager.h" #include "qt4projectmanager_global.h" #include <projectexplorer/buildconfiguration.h> +#include <qtsupport/qtversionmanager.h> namespace ProjectExplorer { class ToolChain; @@ -75,13 +75,13 @@ public: Qt4ProjectManager::Internal::Qt4ProFileNode *subNodeBuild() const; // returns the qtVersion - BaseQtVersion *qtVersion() const; - void setQtVersion(BaseQtVersion *); + QtSupport::BaseQtVersion *qtVersion() const; + void setQtVersion(QtSupport::BaseQtVersion *); void setToolChain(ProjectExplorer::ToolChain *tc); - BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration() const; - void setQMakeBuildConfiguration(BaseQtVersion::QmakeBuildConfigs config); + QtSupport::BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration() const; + void setQMakeBuildConfiguration(QtSupport::BaseQtVersion::QmakeBuildConfigs config); /// \internal for qmakestep // used by qmake step to notify that the qmake args have changed @@ -112,7 +112,7 @@ public: bool compareToImportFrom(const QString &makefile); static void removeQMLInspectorFromArguments(QString *args); static QString extractSpecFromArguments(QString *arguments, - const QString &directory, const BaseQtVersion *version, + const QString &directory, const QtSupport::BaseQtVersion *version, QStringList *outArgs = 0); QVariantMap toMap() const; @@ -165,7 +165,7 @@ private: QString m_buildDirectory; QString m_lastEmmitedBuildDirectory; int m_qtVersionId; - BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration; + QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration; Qt4ProjectManager::Internal::Qt4ProFileNode *m_subNodeBuild; }; diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index a695e3cfe7..076d59e669 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -30,8 +30,6 @@ ** **************************************************************************/ -#include "profilereader.h" -#include "prowriter.h" #include "qt4nodes.h" #include "qt4project.h" #include "qt4projectmanager.h" @@ -54,10 +52,12 @@ #include <extensionsystem/pluginmanager.h> #include <projectexplorer/projectexplorer.h> #include <projectexplorer/buildmanager.h> +#include <qtsupport/profilereader.h> #include <utils/qtcassert.h> #include <utils/stringutils.h> #include <utils/fileutils.h> +#include <proparser/prowriter.h> #include <algorithm> #include <QtCore/QDebug> @@ -266,7 +266,7 @@ Qt4PriFileNode::Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNo void Qt4PriFileNode::scheduleUpdate() { - ProFileCacheManager::instance()->discardFile(m_projectFilePath); + QtSupport::ProFileCacheManager::instance()->discardFile(m_projectFilePath); m_qt4ProFileNode->scheduleUpdate(); } @@ -488,7 +488,7 @@ struct InternalNode }; -QStringList Qt4PriFileNode::baseVPaths(ProFileReader *reader, const QString &projectDir) +QStringList Qt4PriFileNode::baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir) { QStringList result; if (!reader) @@ -500,7 +500,7 @@ QStringList Qt4PriFileNode::baseVPaths(ProFileReader *reader, const QString &pro return result; } -QStringList Qt4PriFileNode::fullVPaths(const QStringList &baseVPaths, ProFileReader *reader, FileType type, const QString &qmakeVariable, const QString &projectDir) +QStringList Qt4PriFileNode::fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, FileType type, const QString &qmakeVariable, const QString &projectDir) { QStringList vPaths; if (!reader) @@ -534,7 +534,7 @@ static QSet<QString> recursiveEnumerate(const QString &folder) return result; } -void Qt4PriFileNode::update(ProFile *includeFileExact, ProFileReader *readerExact, ProFile *includeFileCumlative, ProFileReader *readerCumulative) +void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumulative) { // add project file node if (m_fileNodes.isEmpty()) @@ -1022,7 +1022,7 @@ bool Qt4PriFileNode::saveModifiedEditors() if (cancelled) return false; // force instant reload of ourselves - ProFileCacheManager::instance()->discardFile(m_projectFilePath); + QtSupport::ProFileCacheManager::instance()->discardFile(m_projectFilePath); m_project->qt4ProjectManager()->notifyChanged(m_projectFilePath); } return true; @@ -1106,7 +1106,7 @@ void Qt4PriFileNode::changeFiles(const FileType fileType, lines = contents.split(QLatin1Char('\n')); } - ProMessageHandler handler; + QtSupport::ProMessageHandler handler; ProFileParser parser(0, &handler); includeFile = parser.parsedProBlock(m_projectFilePath, contents); } @@ -1205,7 +1205,7 @@ QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type) } -QStringList Qt4PriFileNode::dynamicVarNames(ProFileReader *readerExact, ProFileReader *readerCumulative) +QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative) { QStringList result; // Figure out DEPLOYMENT and INSTALLS @@ -1929,7 +1929,7 @@ QStringList Qt4ProFileNode::updateUiFiles() return toUpdate; } -QString Qt4ProFileNode::uiDirPath(ProFileReader *reader) const +QString Qt4ProFileNode::uiDirPath(QtSupport::ProFileReader *reader) const { QString path = reader->value("UI_DIR"); if (QFileInfo(path).isRelative()) @@ -1937,7 +1937,7 @@ QString Qt4ProFileNode::uiDirPath(ProFileReader *reader) const return path; } -QString Qt4ProFileNode::mocDirPath(ProFileReader *reader) const +QString Qt4ProFileNode::mocDirPath(QtSupport::ProFileReader *reader) const { QString path = reader->value("MOC_DIR"); if (QFileInfo(path).isRelative()) @@ -1945,7 +1945,7 @@ QString Qt4ProFileNode::mocDirPath(ProFileReader *reader) const return path; } -QStringList Qt4ProFileNode::includePaths(ProFileReader *reader) const +QStringList Qt4ProFileNode::includePaths(QtSupport::ProFileReader *reader) const { QStringList paths; foreach (const QString &cxxflags, m_readerExact->values("QMAKE_CXXFLAGS")) { @@ -1962,7 +1962,7 @@ QStringList Qt4ProFileNode::includePaths(ProFileReader *reader) const return paths; } -QStringList Qt4ProFileNode::libDirectories(ProFileReader *reader) const +QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) const { QStringList result; foreach (const QString &str, reader->values(QLatin1String("LIBS"))) { @@ -1973,7 +1973,7 @@ QStringList Qt4ProFileNode::libDirectories(ProFileReader *reader) const return result; } -QStringList Qt4ProFileNode::subDirsPaths(ProFileReader *reader) const +QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader) const { QStringList subProjectPaths; @@ -2020,7 +2020,7 @@ QStringList Qt4ProFileNode::subDirsPaths(ProFileReader *reader) const return subProjectPaths; } -TargetInformation Qt4ProFileNode::targetInformation(ProFileReader *reader) const +TargetInformation Qt4ProFileNode::targetInformation(QtSupport::ProFileReader *reader) const { TargetInformation result; if (!reader) @@ -2068,7 +2068,7 @@ TargetInformation Qt4ProFileNode::targetInformation(ProFileReader *reader) const // Hmm can we find out whether it's debug or release in a saner way? // Theoretically it's in CONFIG QString qmakeBuildConfig = "release"; - if (m_project->activeTarget()->activeBuildConfiguration()->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild) + if (m_project->activeTarget()->activeBuildConfiguration()->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild) qmakeBuildConfig = "debug"; wd += QLatin1Char('/') + qmakeBuildConfig; } @@ -2088,7 +2088,7 @@ TargetInformation Qt4ProFileNode::targetInformation() const return m_qt4targetInformation; } -void Qt4ProFileNode::setupInstallsList(const ProFileReader *reader) +void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader) { m_installsList.clear(); if (!reader) @@ -2132,7 +2132,7 @@ void Qt4ProFileNode::setupInstallsList(const ProFileReader *reader) } } -void Qt4ProFileNode::setupProjectVersion(const ProFileReader *reader) +void Qt4ProFileNode::setupProjectVersion(const QtSupport::ProFileReader *reader) { m_projectVersion.major = m_projectVersion.minor = m_projectVersion.patch = -1; bool ok; diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 8a6c50036c..d49452a05e 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -56,6 +56,10 @@ namespace Core { class ICore; } +namespace QtSupport { +class ProFileReader; +} + namespace Qt4ProjectManager { // Import base classes into namespace @@ -79,7 +83,6 @@ class Qt4Project; namespace Internal { using ProjectExplorer::FileType; -class ProFileReader; class Qt4UiCodeModelSupport; // Type of projects @@ -142,7 +145,7 @@ class Qt4PriFileNode : public ProjectExplorer::ProjectNode public: Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNode, const QString &filePath); - void update(ProFile *includeFileExact, ProFileReader *readerExact, ProFile *includeFileCumlative, ProFileReader *readerCumalative); + void update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumalative); // ProjectNode interface @@ -172,7 +175,7 @@ public: protected: void clear(); static QStringList varNames(FileType type); - static QStringList dynamicVarNames(ProFileReader *readerExact, ProFileReader *readerCumulative); + static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative); static QSet<QString> filterFiles(ProjectExplorer::FileType fileType, const QSet<QString> &files); enum ChangeType { @@ -197,8 +200,8 @@ private: bool priFileWritable(const QString &path); bool saveModifiedEditors(); QStringList formResources(const QString &formFile) const; - QStringList baseVPaths(ProFileReader *reader, const QString &projectDir); - QStringList fullVPaths(const QStringList &baseVPaths, ProFileReader *reader, FileType type, const QString &qmakeVariable, const QString &projectDir); + QStringList baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir); + QStringList fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, FileType type, const QString &qmakeVariable, const QString &projectDir); void watchFolders(const QSet<QString> &folders); Qt4Project *m_project; @@ -343,14 +346,14 @@ private: void createUiCodeModelSupport(); QStringList updateUiFiles(); - QString uiDirPath(ProFileReader *reader) const; - QString mocDirPath(ProFileReader *reader) const; - QStringList includePaths(ProFileReader *reader) const; - QStringList libDirectories(ProFileReader *reader) const; - QStringList subDirsPaths(ProFileReader *reader) const; - TargetInformation targetInformation(ProFileReader *reader) const; - void setupInstallsList(const ProFileReader *reader); - void setupProjectVersion(const ProFileReader *reader); + QString uiDirPath(QtSupport::ProFileReader *reader) const; + QString mocDirPath(QtSupport::ProFileReader *reader) const; + QStringList includePaths(QtSupport::ProFileReader *reader) const; + QStringList libDirectories(QtSupport::ProFileReader *reader) const; + QStringList subDirsPaths(QtSupport::ProFileReader *reader) const; + TargetInformation targetInformation(QtSupport::ProFileReader *reader) const; + void setupInstallsList(const QtSupport::ProFileReader *reader); + void setupProjectVersion(const QtSupport::ProFileReader *reader); void invalidate(); @@ -368,8 +371,8 @@ private: // Async stuff QFutureWatcher<EvalResult> m_parseFutureWatcher; - ProFileReader *m_readerExact; - ProFileReader *m_readerCumulative; + QtSupport::ProFileReader *m_readerExact; + QtSupport::ProFileReader *m_readerCumulative; }; class Qt4NodesWatcher : public ProjectExplorer::NodesWatcher diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index b700b24f32..675d58bd11 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -32,7 +32,6 @@ #include "qt4project.h" -#include "profilereader.h" #include "qt4projectmanager.h" #include "makestep.h" #include "qmakestep.h" @@ -42,8 +41,6 @@ #include "projectloadwizard.h" #include "qt4buildconfiguration.h" #include "findqt4profiles.h" -#include "qmldumptool.h" -#include "baseqtversion.h" #include <coreplugin/icore.h> #include <coreplugin/icontext.h> @@ -60,6 +57,9 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/qtcassert.h> +#include <qtsupport/qmldumptool.h> +#include <qtsupport/baseqtversion.h> +#include <qtsupport/profilereader.h> #include <QtCore/QDebug> #include <QtCore/QDir> @@ -554,15 +554,16 @@ void Qt4Project::updateQmlJSCodeModel() } bool preferDebugDump = false; if (activeTarget() && activeTarget()->activeBuildConfiguration()) { - preferDebugDump = activeTarget()->activeBuildConfiguration()->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild; - BaseQtVersion *qtVersion = activeTarget()->activeBuildConfiguration()->qtVersion(); + preferDebugDump = activeTarget()->activeBuildConfiguration()->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild; + QtSupport::BaseQtVersion *qtVersion = activeTarget()->activeBuildConfiguration()->qtVersion(); if (qtVersion && qtVersion->isValid()) { const QString qtVersionImportPath = qtVersion->versionInfo().value("QT_INSTALL_IMPORTS"); if (!qtVersionImportPath.isEmpty()) projectInfo.importPaths += qtVersionImportPath; } } - QmlDumpTool::pathAndEnvironment(this, preferDebugDump, &projectInfo.qmlDumpPath, &projectInfo.qmlDumpEnvironment); + QtSupport::QmlDumpTool::pathAndEnvironment(this, activeTarget()->activeBuildConfiguration()->qtVersion(), + preferDebugDump, &projectInfo.qmlDumpPath, &projectInfo.qmlDumpEnvironment); projectInfo.importPaths.removeDuplicates(); modelManager->updateProjectInfo(projectInfo); @@ -864,7 +865,7 @@ void Qt4Project::proFileParseError(const QString &errorMessage) Core::ICore::instance()->messageManager()->printToOutputPanePopup(errorMessage); } -ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc) +QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc) { if (!m_proFileOption) { m_proFileOption = new ProFileOption; @@ -874,7 +875,7 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Q bc = activeTarget()->activeBuildConfiguration(); if (bc) { - BaseQtVersion *version = bc->qtVersion(); + QtSupport::BaseQtVersion *version = bc->qtVersion(); if (version && version->isValid()) { m_proFileOption->properties = version->versionInfo(); if (bc->toolChain()) @@ -894,26 +895,26 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Q m_proFileOption->setCommandLineArguments(args); } - ProFileCacheManager::instance()->incRefCount(); + QtSupport::ProFileCacheManager::instance()->incRefCount(); } ++m_proFileOptionRefCnt; - ProFileReader *reader = new ProFileReader(m_proFileOption); + QtSupport::ProFileReader *reader = new QtSupport::ProFileReader(m_proFileOption); reader->setOutputDir(qt4ProFileNode->buildDir()); return reader; } -void Qt4Project::destroyProFileReader(ProFileReader *reader) +void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader) { delete reader; if (!--m_proFileOptionRefCnt) { QString dir = QFileInfo(m_fileInfo->fileName()).absolutePath(); if (!dir.endsWith(QLatin1Char('/'))) dir += QLatin1Char('/'); - ProFileCacheManager::instance()->discardFiles(dir); - ProFileCacheManager::instance()->decRefCount(); + QtSupport::ProFileCacheManager::instance()->discardFiles(dir); + QtSupport::ProFileCacheManager::instance()->decRefCount(); delete m_proFileOption; m_proFileOption = 0; @@ -1041,7 +1042,7 @@ void Qt4Project::notifyChanged(const QString &name) QList<Qt4ProFileNode *> list; findProFile(name, rootProjectNode(), list); foreach(Qt4ProFileNode *node, list) { - ProFileCacheManager::instance()->discardFile(name); + QtSupport::ProFileCacheManager::instance()->discardFile(name); node->update(); } } diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index 1389aad7a9..b68489e9c6 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -51,10 +51,13 @@ QT_BEGIN_NAMESPACE struct ProFileOption; QT_END_NAMESPACE +namespace QtSupport { +class ProFileReader; +} + namespace Qt4ProjectManager { namespace Internal { - class ProFileReader; class DeployHelperRunStep; class FileItem; class Qt4ProFileNode; @@ -166,9 +169,9 @@ public: void notifyChanged(const QString &name); /// \internal - Internal::ProFileReader *createProFileReader(Internal::Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0); + QtSupport::ProFileReader *createProFileReader(Internal::Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0); /// \internal - void destroyProFileReader(Internal::ProFileReader *reader); + void destroyProFileReader(QtSupport::ProFileReader *reader); /// \internal void scheduleAsyncUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *node); diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp index d9613fd30f..3569c9793d 100644 --- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp +++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp @@ -39,8 +39,7 @@ #include "qt4projectmanagerconstants.h" #include "qt4projectmanager.h" #include "qt4buildconfiguration.h" -#include "qtversionfactory.h" -#include "baseqtversion.h" +#include "qt4basetargetfactory.h" #include "ui_qt4projectconfigwidget.h" #include <coreplugin/icore.h> @@ -48,6 +47,9 @@ #include <projectexplorer/toolchainmanager.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/buildconfiguration.h> +#include <qtsupport/qtversionfactory.h> +#include <qtsupport/baseqtversion.h> +#include <qtsupport/qtsupportconstants.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> #include <extensionsystem/pluginmanager.h> @@ -127,7 +129,7 @@ Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget() void Qt4ProjectConfigWidget::updateDetails() { - BaseQtVersion *version = m_buildConfiguration->qtVersion(); + QtSupport::BaseQtVersion *version = m_buildConfiguration->qtVersion(); QString versionString; if (version) @@ -160,7 +162,7 @@ void Qt4ProjectConfigWidget::environmentChanged() void Qt4ProjectConfigWidget::updateShadowBuildUi() { - BaseQtVersion *version = m_buildConfiguration->qtVersion(); + QtSupport::BaseQtVersion *version = m_buildConfiguration->qtVersion(); m_ui->shadowBuildCheckBox->setEnabled(version && version->supportsShadowBuilds()); bool isShadowbuilding = m_buildConfiguration->shadowBuild(); m_ui->shadowBuildDirEdit->setEnabled(isShadowbuilding && version && version->supportsShadowBuilds()); @@ -171,7 +173,7 @@ void Qt4ProjectConfigWidget::updateShadowBuildUi() void Qt4ProjectConfigWidget::manageQtVersions() { Core::ICore *core = Core::ICore::instance(); - core->showOptionsDialog(Constants::QT_SETTINGS_CATEGORY, Constants::QTVERSION_SETTINGS_PAGE_ID); + core->showOptionsDialog(QtSupport::Constants::QT_SETTINGS_CATEGORY, QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID); } void Qt4ProjectConfigWidget::manageToolChains() @@ -216,7 +218,7 @@ void Qt4ProjectConfigWidget::init(ProjectExplorer::BuildConfiguration *bc) this, SLOT(toolChainChanged())); qtVersionsChanged(); - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); connect(vm, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(qtVersionsChanged())); @@ -256,15 +258,15 @@ void Qt4ProjectConfigWidget::qtVersionChanged() void Qt4ProjectConfigWidget::qtVersionsChanged() { m_ignoreChange = true; - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); m_ui->qtVersionComboBox->clear(); - BaseQtVersion *qtVersion = m_buildConfiguration->qtVersion(); + QtSupport::BaseQtVersion *qtVersion = m_buildConfiguration->qtVersion(); - QList<BaseQtVersion *> validVersions = vm->versionsForTargetId(m_buildConfiguration->target()->id()); + QList<QtSupport::BaseQtVersion *> validVersions = vm->versionsForTargetId(m_buildConfiguration->target()->id()); if (!validVersions.isEmpty()) { for (int i = 0; i < validVersions.size(); ++i) { - const BaseQtVersion *version = validVersions.at(i); + const QtSupport::BaseQtVersion *version = validVersions.at(i); m_ui->qtVersionComboBox->addItem(version->displayName(), version->uniqueId()); @@ -339,7 +341,7 @@ void Qt4ProjectConfigWidget::updateImportLabel() bool incompatibleBuild = false; bool couldnotparse = false; - QtVersionManager *vm = QtVersionManager::instance(); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); // we only show if we actually have a qmake and makestep if (m_buildConfiguration->qmakeStep() && m_buildConfiguration->makeStep()) { QString makefile = m_buildConfiguration->buildDirectory(); @@ -348,24 +350,24 @@ void Qt4ProjectConfigWidget::updateImportLabel() else makefile.append(m_buildConfiguration->makefile()); - QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(makefile); - BaseQtVersion *version = m_buildConfiguration->qtVersion(); + QString qmakePath = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(makefile); + QtSupport::BaseQtVersion *version = m_buildConfiguration->qtVersion(); // check that there's a makefile if (!qmakePath.isEmpty()) { // Is it from the same build? - QtVersionManager::MakefileCompatible mc = - QtVersionManager::makefileIsFor(makefile, m_buildConfiguration->target()->project()->file()->fileName()); - if (mc == QtVersionManager::DifferentProject) { + QtSupport::QtVersionManager::MakefileCompatible mc = + QtSupport::QtVersionManager::makefileIsFor(makefile, m_buildConfiguration->target()->project()->file()->fileName()); + if (mc == QtSupport::QtVersionManager::DifferentProject) { incompatibleBuild = true; - } else if (mc == QtVersionManager::SameProject) { + } else if (mc == QtSupport::QtVersionManager::SameProject) { if (qmakePath != (version ? version->qmakeCommand() : QString())) { // and that the qmake path is different from the current version // import enable visible = true; - BaseQtVersion *newVersion = vm->qtVersionForQMakeBinary(qmakePath); + QtSupport::BaseQtVersion *newVersion = vm->qtVersionForQMakeBinary(qmakePath); bool mustDelete(false); if (!newVersion) { - newVersion = QtVersionFactory::createQtVersionFromQMakePath(qmakePath); + newVersion = QtSupport::QtVersionFactory::createQtVersionFromQMakePath(qmakePath); mustDelete = true; } targetMatches = newVersion->supportsTargetId(m_buildConfiguration->target()->id()); @@ -376,7 +378,7 @@ void Qt4ProjectConfigWidget::updateImportLabel() visible = !m_buildConfiguration->compareToImportFrom(makefile); targetMatches = true; } - } else if (mc == QtVersionManager::CouldNotParse) { + } else if (mc == QtSupport::QtVersionManager::CouldNotParse) { couldnotparse = true; } } @@ -386,10 +388,16 @@ void Qt4ProjectConfigWidget::updateImportLabel() if (m_buildConfiguration->shadowBuild()) buildDirectory = m_buildConfiguration->buildDirectory(); QList<ProjectExplorer::Task> issues; - if (m_buildConfiguration->qtVersion()) - issues = m_buildConfiguration->qtVersion()->reportIssues(m_buildConfiguration->target()->project()->file()->fileName(), - buildDirectory, - true); + QtSupport::BaseQtVersion *version = m_buildConfiguration->qtVersion(); + if (version) + issues = version->reportIssues(m_buildConfiguration->target()->project()->file()->fileName(), + buildDirectory); + + foreach (Qt4BaseTargetFactory *factory, + Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(version->supportedTargetIds().toList())) + issues.append(factory->reportIssues(m_buildConfiguration->target()->project()->file()->fileName())); + + qSort(issues); if (incompatibleBuild) { m_ui->problemLabel->setVisible(true); @@ -463,8 +471,8 @@ void Qt4ProjectConfigWidget::qtVersionSelected(const QString &) if (m_ui->qtVersionComboBox->itemData(m_ui->qtVersionComboBox->count() - 1).toInt() == -1) m_ui->qtVersionComboBox->removeItem(m_ui->qtVersionComboBox->count() - 1); - QtVersionManager *vm = QtVersionManager::instance(); - BaseQtVersion *newQtVersion = vm->version(newQtVersionId); + QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance(); + QtSupport::BaseQtVersion *newQtVersion = vm->version(newQtVersionId); m_ignoreChange = true; m_buildConfiguration->setQtVersion(newQtVersion); diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp index 9033891084..c218676150 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp @@ -37,7 +37,6 @@ #include "qt4nodes.h" #include "qt4project.h" #include "qt4target.h" -#include "profilereader.h" #include "profileeditor.h" #include "qmakestep.h" #include "qt4buildconfiguration.h" @@ -58,6 +57,7 @@ #include <projectexplorer/project.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/qtcassert.h> +#include <qtsupport/profilereader.h> #include <QtCore/QCoreApplication> #include <QtCore/QDir> @@ -192,7 +192,7 @@ void Qt4Manager::updateVariable(const QString &variable) return; } QString value; - BaseQtVersion *qtv = qt4pro->activeTarget()->activeBuildConfiguration()->qtVersion(); + QtSupport::BaseQtVersion *qtv = qt4pro->activeTarget()->activeBuildConfiguration()->qtVersion(); if (qtv) value = qtv->versionInfo().value(QLatin1String("QT_INSTALL_BINS")); Core::VariableManager::instance()->insert(QLatin1String(kInstallBins), value); diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.h b/src/plugins/qt4projectmanager/qt4projectmanager.h index 5b0066690f..256bf82a98 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.h +++ b/src/plugins/qt4projectmanager/qt4projectmanager.h @@ -48,6 +48,9 @@ namespace ProjectExplorer { class Project; class ProjectExplorerPlugin; class Node; +} + +namespace QtSupport { class QtVersionManager; } diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro index 86da78e4bb..dc8e751430 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.pro +++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro @@ -4,6 +4,7 @@ DEFINES += QT_CREATOR QT4PROJECTMANAGER_LIBRARY QT += network include(../../qtcreatorplugin.pri) include(qt4projectmanager_dependencies.pri) + HEADERS += \ qtparser.h \ qt4projectmanagerplugin.h \ @@ -13,7 +14,6 @@ HEADERS += \ profileeditor.h \ profilehighlighter.h \ profileeditorfactory.h \ - profilereader.h \ wizards/qtprojectparameters.h \ wizards/guiappwizard.h \ wizards/mobileapp.h \ @@ -52,8 +52,6 @@ HEADERS += \ qtmodulesinfo.h \ qt4projectconfigwidget.h \ projectloadwizard.h \ - qtversionmanager.h \ - qtoptionspage.h \ qtuicodemodelsupport.h \ externaleditors.h \ gettingstartedwelcomepagewidget.h \ @@ -61,24 +59,17 @@ HEADERS += \ qt4buildconfiguration.h \ qt4target.h \ qmakeparser.h \ - qtoutputformatter.h \ addlibrarywizard.h \ librarydetailscontroller.h \ findqt4profiles.h \ qt4projectmanager_global.h \ - qmldumptool.h \ - qmlobservertool.h \ - qmldebugginglibrary.h \ profilekeywords.h \ - debugginghelperbuildtask.h \ qt4targetsetupwidget.h \ - qt4basetargetfactory.h \ buildconfigurationinfo.h \ - qtversionfactory.h \ winceqtversionfactory.h \ - baseqtversion.h \ winceqtversion.h \ - profilecompletionassist.h + profilecompletionassist.h \ + qt4basetargetfactory.h SOURCES += qt4projectmanagerplugin.cpp \ qtparser.cpp \ @@ -88,7 +79,6 @@ SOURCES += qt4projectmanagerplugin.cpp \ profileeditor.cpp \ profilehighlighter.cpp \ profileeditorfactory.cpp \ - profilereader.cpp \ wizards/qtprojectparameters.cpp \ wizards/guiappwizard.cpp \ wizards/mobileapp.cpp \ @@ -126,8 +116,6 @@ SOURCES += qt4projectmanagerplugin.cpp \ qtmodulesinfo.cpp \ qt4projectconfigwidget.cpp \ projectloadwizard.cpp \ - qtversionmanager.cpp \ - qtoptionspage.cpp \ qtuicodemodelsupport.cpp \ externaleditors.cpp \ gettingstartedwelcomepagewidget.cpp \ @@ -135,27 +123,20 @@ SOURCES += qt4projectmanagerplugin.cpp \ qt4buildconfiguration.cpp \ qt4target.cpp \ qmakeparser.cpp \ - qtoutputformatter.cpp \ addlibrarywizard.cpp \ librarydetailscontroller.cpp \ findqt4profiles.cpp \ - qmldumptool.cpp \ - qmlobservertool.cpp \ - qmldebugginglibrary.cpp \ profilekeywords.cpp \ - debugginghelperbuildtask.cpp \ - qtversionfactory.cpp \ winceqtversionfactory.cpp \ - baseqtversion.cpp \ winceqtversion.cpp \ profilecompletionassist.cpp FORMS += makestep.ui \ qmakestep.ui \ qt4projectconfigwidget.ui \ - qtversionmanager.ui \ - showbuildlog.ui \ gettingstartedwelcomepagewidget.ui \ + showbuildlog.ui \ + librarydetailswidget.ui \ wizards/testwizardpage.ui \ wizards/targetsetuppage.ui \ wizards/qtquickappwizardsourcespage.ui \ @@ -163,15 +144,11 @@ FORMS += makestep.ui \ wizards/mobilelibrarywizardoptionpage.ui \ wizards/mobileappwizardgenericoptionspage.ui \ wizards/mobileappwizardsymbianoptionspage.ui \ - wizards/mobileappwizardmaemooptionspage.ui \ - librarydetailswidget.ui \ - qtversioninfo.ui \ - debugginghelper.ui + wizards/mobileappwizardmaemooptionspage.ui + RESOURCES += qt4projectmanager.qrc \ wizards/wizards.qrc -DEFINES += PROPARSER_THREAD_SAFE PROEVALUATOR_THREAD_SAFE -include(../../shared/proparser/proparser.pri) include(qt-s60/qt-s60.pri) include(qt-maemo/qt-maemo.pri) include(qt-desktop/qt-desktop.pri) diff --git a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri b/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri index 1a8b3dff3a..c8d67d0716 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri +++ b/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri @@ -1,4 +1,5 @@ include(../../plugins/projectexplorer/projectexplorer.pri) +include(../../plugins/qtsupport/qtsupport.pri) include(../../plugins/cpptools/cpptools.pri) include(../../plugins/debugger/debugger.pri) include(../../plugins/analyzerbase/analyzerbase.pri) diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index 3cd3971385..7d22f27851 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -66,24 +66,11 @@ const char * const ADDLIBRARY = "Qt4.AddLibrary"; const char * const JUMP_TO_FILE = "Qt4.JumpToFile"; const char * const SEPARATOR = "Qt4.Separator"; -//Qt4 settings pages -const char * const QT_SETTINGS_CATEGORY = "L.Qt4"; -const char * const QT_SETTINGS_CATEGORY_ICON = ":/core/images/category_qt.png"; -const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt4"); -const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions"; -const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions"); - // C++ wizard categories const char * const QT_APP_WIZARD_CATEGORY = "F.QtApplicationProjects"; const char * const QT_APP_WIZARD_TR_SCOPE = "Qt4ProjectManager"; const char * const QT_APP_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Widget Project"); -// QML wizard categories -const char * const QML_WIZARD_CATEGORY = "C.Projects"; // (before Qt) -const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager"; -const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "Qt Quick Project"); -const char * const QML_WIZARD_ICON = ":/qmlproject/images/qml_wizard.png"; - // Html5 wizard categories const char * const HTML5_WIZARD_CATEGORY = "I.Projects"; // (after Qt) const char * const HTML5_WIZARD_TR_SCOPE = QT_APP_WIZARD_TR_SCOPE; @@ -111,13 +98,6 @@ const char * const MAEMO_TOOLCHAIN_ID = "Qt4ProjectManager.ToolChain.Maemo"; const char * const RVCT_TOOLCHAIN_ID = "Qt4ProjectManager.ToolChain.RVCT"; const char * const WINSCW_TOOLCHAIN_ID = "Qt4ProjectManager.ToolChain.WINSCW"; -// QtVersions -const char * const SYMBIANQT = "Qt4ProjectManager.QtVersion.Symbian"; -const char * const MAEMOQT = "Qt4ProjectManager.QtVersion.Maemo"; -const char * const DESKTOPQT = "Qt4ProjectManager.QtVersion.Desktop"; -const char * const SIMULATORQT = "Qt4ProjectManager.QtVersion.Simulator"; -const char * const WINCEQT = "Qt4ProjectManager.QtVersion.WinCE"; - // ICONS const char * const ICON_QT_PROJECT = ":/qt4projectmanager/images/qt_project.png"; const char * const ICON_QTQUICK_APP = ":/wizards/images/qtquickapp.png"; diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp index c75d409c97..ecf90f46da 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp @@ -49,9 +49,6 @@ #include "qt4projectmanagerconstants.h" #include "qt4project.h" #include "profileeditor.h" -#include "profilereader.h" -#include "qtversionmanager.h" -#include "qtoptionspage.h" #include "externaleditors.h" #include "gettingstartedwelcomepage.h" #include "profilecompletionassist.h" @@ -113,9 +110,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * const Core::Context projectContext(Qt4ProjectManager::Constants::PROJECT_ID); Core::Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE); - ProFileParser::initialize(); - ProFileEvaluator::initialize(); - Core::ICore *core = Core::ICore::instance(); if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":qt4projectmanager/Qt4ProjectManager.mimetypes.xml"), errorMessage)) return false; @@ -123,15 +117,10 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * m_projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance(); Core::ActionManager *am = core->actionManager(); - new ProFileCacheManager(this); - - QtVersionManager *mgr = new QtVersionManager; - addAutoReleasedObject(mgr); - addAutoReleasedObject(new QtOptionsPage); m_welcomePage = new GettingStartedWelcomePage; addObject(m_welcomePage); - connect(mgr, SIGNAL(updateExamples(QString,QString,QString)), + connect(QtSupport::QtVersionManager::instance(), SIGNAL(updateExamples(QString,QString,QString)), m_welcomePage, SLOT(updateExamples(QString,QString,QString))); //create and register objects @@ -288,7 +277,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * void Qt4ProjectManagerPlugin::extensionsInitialized() { m_qt4ProjectManager->init(); - QtVersionManager::instance()->extensionsInitialized(); } void Qt4ProjectManagerPlugin::updateContextMenu(Project *project, diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index 60a70f11ce..27bd17f6ce 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -38,8 +38,6 @@ #include "qt4project.h" #include "qt4basetargetfactory.h" #include "qt4projectconfigwidget.h" -#include "qtversionfactory.h" -#include "baseqtversion.h" #include <coreplugin/icore.h> #include <extensionsystem/pluginmanager.h> @@ -49,6 +47,8 @@ #include <projectexplorer/toolchainmanager.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/task.h> +#include <qtsupport/qtversionfactory.h> +#include <qtsupport/baseqtversion.h> #include <utils/pathchooser.h> #include <utils/detailswidget.h> @@ -58,6 +58,8 @@ #include <QtGui/QComboBox> #include <QtGui/QMainWindow> +#include <algorithm> + using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; @@ -78,7 +80,7 @@ Qt4BaseTargetFactory::~Qt4BaseTargetFactory() Qt4TargetSetupWidget *Qt4BaseTargetFactory::createTargetSetupWidget(const QString &id, const QString &proFilePath, - const QtVersionNumber &number, + const QtSupport::QtVersionNumber &number, bool importEnabled, QList<BuildConfigurationInfo> importInfos) { @@ -103,20 +105,20 @@ ProjectExplorer::Target *Qt4BaseTargetFactory::create(ProjectExplorer::Project * return create(parent, id, w->buildConfigurationInfos()); } -QList<BuildConfigurationInfo> Qt4BaseTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion) +QList<BuildConfigurationInfo> Qt4BaseTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtSupport::QtVersionNumber &minimumQtVersion) { QList<BuildConfigurationInfo> infoList; - QList<BaseQtVersion *> knownVersions = QtVersionManager::instance()->versionsForTargetId(id, minimumQtVersion); + QList<QtSupport::BaseQtVersion *> knownVersions = QtSupport::QtVersionManager::instance()->versionsForTargetId(id, minimumQtVersion); - foreach (BaseQtVersion *version, knownVersions) { + foreach (QtSupport::BaseQtVersion *version, knownVersions) { if (!version->isValid() || !version->toolChainAvailable(id)) continue; - BaseQtVersion::QmakeBuildConfigs config = version->defaultBuildConfig(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = version->defaultBuildConfig(); BuildConfigurationInfo info = BuildConfigurationInfo(version, config, QString(), QString()); info.directory = shadowBuildDirectory(proFilePath, id, msgBuildConfigurationName(info)); infoList.append(info); - info.buildConfig = config ^ BaseQtVersion::DebugBuild; + info.buildConfig = config ^ QtSupport::BaseQtVersion::DebugBuild; info.directory = shadowBuildDirectory(proFilePath, id, msgBuildConfigurationName(info)); infoList.append(info); } @@ -174,11 +176,23 @@ Qt4BaseTargetFactory *Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(const QStr return 0; } +QList<Qt4BaseTargetFactory *> Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(const QStringList &ids) +{ + QList<Qt4BaseTargetFactory *> factories; + foreach (const QString &id, ids) + if (Qt4BaseTargetFactory *factory = qt4BaseTargetFactoryForId(id)) + factories << factory; + + qSort(factories); + factories.erase(std::unique(factories.begin(), factories.end()), factories.end()); + return factories; +} + // Return name of a build configuration. QString Qt4BaseTargetFactory::msgBuildConfigurationName(const BuildConfigurationInfo &info) { const QString qtVersionName = info.version->displayName(); - return (info.buildConfig & BaseQtVersion::DebugBuild) ? + return (info.buildConfig & QtSupport::BaseQtVersion::DebugBuild) ? //: Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. tr("%1 Debug").arg(qtVersionName) : //: Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. @@ -263,13 +277,13 @@ void Qt4BaseTarget::removeUnconfiguredCustomExectutableRunConfigurations() } } -Qt4BuildConfiguration *Qt4BaseTarget::addQt4BuildConfiguration(QString displayName, BaseQtVersion *qtversion, - BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration, +Qt4BuildConfiguration *Qt4BaseTarget::addQt4BuildConfiguration(QString displayName, QtSupport::BaseQtVersion *qtversion, + QtSupport::BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration, QString additionalArguments, QString directory) { Q_ASSERT(qtversion); - bool debug = qmakeBuildConfiguration & BaseQtVersion::DebugBuild; + bool debug = qmakeBuildConfiguration & QtSupport::BaseQtVersion::DebugBuild; // Add the buildconfiguration Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(this); @@ -294,7 +308,7 @@ Qt4BuildConfiguration *Qt4BaseTarget::addQt4BuildConfiguration(QString displayNa qmakeStep->setUserArguments(additionalArguments); // set some options for qmake and make - if (qmakeBuildConfiguration & BaseQtVersion::BuildAll) // debug_and_release => explicit targets + if (qmakeBuildConfiguration & QtSupport::BaseQtVersion::BuildAll) // debug_and_release => explicit targets makeStep->setUserArguments(debug ? "debug" : "release"); bc->setQMakeBuildConfiguration(qmakeBuildConfiguration); @@ -368,7 +382,7 @@ Qt4DefaultTargetSetupWidget::Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *f const QString &id, const QString &proFilePath, const QList<BuildConfigurationInfo> &infos, - const QtVersionNumber &minimumQtVersion, + const QtSupport::QtVersionNumber &minimumQtVersion, bool importEnabled, const QList<BuildConfigurationInfo> &importInfos, ShadowBuildOption shadowBuild) @@ -584,8 +598,8 @@ void Qt4DefaultTargetSetupWidget::targetCheckBoxToggled(bool b) QString Qt4DefaultTargetSetupWidget::displayNameFrom(const BuildConfigurationInfo &info) { QString buildType; - if ((info.buildConfig & BaseQtVersion::BuildAll) == 0) { - if (info.buildConfig & BaseQtVersion::DebugBuild) + if ((info.buildConfig & QtSupport::BaseQtVersion::BuildAll) == 0) { + if (info.buildConfig & QtSupport::BaseQtVersion::DebugBuild) //: Debug build buildType = tr("debug"); else @@ -774,14 +788,14 @@ void Qt4DefaultTargetSetupWidget::setBuildConfigurationInfos(const QList<BuildCo int oldQtVersionId = -1; if (m_versionComboBox->currentIndex() != -1) oldQtVersionId = m_versionComboBox->itemData(m_versionComboBox->currentIndex()).toInt(); - QList<BaseQtVersion *> list; + QList<QtSupport::BaseQtVersion *> list; foreach (const BuildConfigurationInfo &info, m_infos) { if (!list.contains(info.version)) list << info.version; } m_ignoreChange = true; m_versionComboBox->clear(); - foreach (BaseQtVersion *v, list) { + foreach (QtSupport::BaseQtVersion *v, list) { m_versionComboBox->addItem(v->displayName(), v->uniqueId()); if (v->uniqueId() == oldQtVersionId) m_versionComboBox->setCurrentIndex(m_versionComboBox->count() - 1); @@ -1005,9 +1019,9 @@ QPair<ProjectExplorer::Task::TaskType, QString> Qt4DefaultTargetSetupWidget::fin QString buildDir = info.directory; if (!m_shadowBuildEnabled->isChecked()) buildDir = QFileInfo(m_proFilePath).absolutePath(); - BaseQtVersion *version = info.version; + QtSupport::BaseQtVersion *version = info.version; - QList<ProjectExplorer::Task> issues = version->reportIssues(m_proFilePath, buildDir, false); + QList<ProjectExplorer::Task> issues = version->reportIssues(m_proFilePath, buildDir); QString text; ProjectExplorer::Task::TaskType highestType = ProjectExplorer::Task::Unknown; @@ -1080,23 +1094,23 @@ QList<BuildConfigurationInfo> BuildConfigurationInfo::importBuildConfigurations( BuildConfigurationInfo BuildConfigurationInfo::checkForBuild(const QString &directory, const QString &proFilePath) { QString makefile = directory + "/Makefile"; - QString qmakeBinary = QtVersionManager::findQMakeBinaryFromMakefile(makefile); + QString qmakeBinary = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(makefile); if (qmakeBinary.isEmpty()) return BuildConfigurationInfo(); - if (QtVersionManager::makefileIsFor(makefile, proFilePath) != QtVersionManager::SameProject) + if (QtSupport::QtVersionManager::makefileIsFor(makefile, proFilePath) != QtSupport::QtVersionManager::SameProject) return BuildConfigurationInfo(); bool temporaryQtVersion = false; - BaseQtVersion *version = QtVersionManager::instance()->qtVersionForQMakeBinary(qmakeBinary); + QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::instance()->qtVersionForQMakeBinary(qmakeBinary); if (!version) { - version = QtVersionFactory::createQtVersionFromQMakePath(qmakeBinary); + version = QtSupport::QtVersionFactory::createQtVersionFromQMakePath(qmakeBinary); temporaryQtVersion = true; if (!version) return BuildConfigurationInfo(); } - QPair<BaseQtVersion::QmakeBuildConfigs, QString> makefileBuildConfig = - QtVersionManager::scanMakeFile(makefile, version->defaultBuildConfig()); + QPair<QtSupport::BaseQtVersion::QmakeBuildConfigs, QString> makefileBuildConfig = + QtSupport::QtVersionManager::scanMakeFile(makefile, version->defaultBuildConfig()); QString additionalArguments = makefileBuildConfig.second; QString parsedSpec = Qt4BuildConfiguration::extractSpecFromArguments(&additionalArguments, directory, version); diff --git a/src/plugins/qt4projectmanager/qt4target.h b/src/plugins/qt4projectmanager/qt4target.h index f98aa3332f..90bb416194 100644 --- a/src/plugins/qt4projectmanager/qt4target.h +++ b/src/plugins/qt4projectmanager/qt4target.h @@ -35,8 +35,8 @@ #include "qt4buildconfiguration.h" #include "qt4targetsetupwidget.h" -#include "qtversionmanager.h" +#include <qtsupport/qtversionmanager.h> #include <projectexplorer/target.h> #include <projectexplorer/task.h> #include <projectexplorer/projectnodes.h> @@ -78,8 +78,8 @@ public: // This is the same for almost all Qt4Targets // so for now offer a convience function Qt4BuildConfiguration *addQt4BuildConfiguration(QString displayName, - BaseQtVersion *qtversion, - BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration, + QtSupport::BaseQtVersion *qtversion, + QtSupport::BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration, QString additionalArguments, QString directory); @@ -113,7 +113,7 @@ public: const QString &id, const QString &proFilePath, const QList<BuildConfigurationInfo> &info, - const QtVersionNumber &minimumQtVersion, + const QtSupport::QtVersionNumber &minimumQtVersion, bool importEnabled, const QList<BuildConfigurationInfo> &importInfos, ShadowBuildOption shadowBuild); @@ -155,7 +155,7 @@ private: QString m_id; Qt4BaseTargetFactory *m_factory; QString m_proFilePath; - QtVersionNumber m_minimumQtVersion; + QtSupport::QtVersionNumber m_minimumQtVersion; Utils::DetailsWidget *m_detailsWidget; QGridLayout *m_importLayout; QGridLayout *m_newBuildsLayout; diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp index 12265121d1..314130abba 100644 --- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp +++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp @@ -35,7 +35,7 @@ #include "qt4project.h" #include "qt4target.h" -#include "baseqtversion.h" +#include <qtsupport/baseqtversion.h> using namespace Qt4ProjectManager; using namespace Internal; diff --git a/src/plugins/qt4projectmanager/winceqtversion.cpp b/src/plugins/qt4projectmanager/winceqtversion.cpp index 136addb075..fc91ed52d0 100644 --- a/src/plugins/qt4projectmanager/winceqtversion.cpp +++ b/src/plugins/qt4projectmanager/winceqtversion.cpp @@ -32,19 +32,20 @@ #include "winceqtversion.h" #include "qt4projectmanagerconstants.h" +#include <qtsupport/qtsupportconstants.h> #include <QtCore/QCoreApplication> using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; WinCeQtVersion::WinCeQtVersion() - : BaseQtVersion() + : QtSupport::BaseQtVersion() { } WinCeQtVersion::WinCeQtVersion(const QString &path, bool isAutodetected, const QString &autodetectionSource) - : BaseQtVersion(path, isAutodetected, autodetectionSource) + : QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource) { } @@ -61,7 +62,7 @@ WinCeQtVersion *WinCeQtVersion::clone() const QString WinCeQtVersion::type() const { - return Constants::WINCEQT; + return QtSupport::Constants::WINCEQT; } QList<ProjectExplorer::Abi> WinCeQtVersion::qtAbis() const diff --git a/src/plugins/qt4projectmanager/winceqtversion.h b/src/plugins/qt4projectmanager/winceqtversion.h index ede35fae7f..8c87af0995 100644 --- a/src/plugins/qt4projectmanager/winceqtversion.h +++ b/src/plugins/qt4projectmanager/winceqtversion.h @@ -32,12 +32,13 @@ #ifndef WINCEQTVERSION_H #define WINCEQTVERSION_H -#include "baseqtversion.h" + +#include <qtsupport/baseqtversion.h> namespace Qt4ProjectManager { namespace Internal { -class WinCeQtVersion : public BaseQtVersion +class WinCeQtVersion : public QtSupport::BaseQtVersion { public: WinCeQtVersion(); diff --git a/src/plugins/qt4projectmanager/winceqtversionfactory.cpp b/src/plugins/qt4projectmanager/winceqtversionfactory.cpp index 7ddf03ed25..59b2acfdd2 100644 --- a/src/plugins/qt4projectmanager/winceqtversionfactory.cpp +++ b/src/plugins/qt4projectmanager/winceqtversionfactory.cpp @@ -32,7 +32,8 @@ #include "winceqtversionfactory.h" #include "winceqtversion.h" -#include "qt4projectmanagerconstants.h" +#include <qtsupport/qtsupportconstants.h> +#include <qtsupport/profilereader.h> #include <QtCore/QFileInfo> using namespace Qt4ProjectManager; @@ -51,10 +52,10 @@ WinCeQtVersionFactory::~WinCeQtVersionFactory() bool WinCeQtVersionFactory::canRestore(const QString &type) { - return type == QLatin1String(Constants::WINCEQT); + return type == QLatin1String(QtSupport::Constants::WINCEQT); } -BaseQtVersion *WinCeQtVersionFactory::restore(const QVariantMap &data) +QtSupport::BaseQtVersion *WinCeQtVersionFactory::restore(const QVariantMap &data) { WinCeQtVersion *v = new WinCeQtVersion; v->fromMap(data); @@ -66,9 +67,8 @@ int WinCeQtVersionFactory::priority() const return 50; } -BaseQtVersion *WinCeQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) +QtSupport::BaseQtVersion *WinCeQtVersionFactory::create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource) { - // we are the fallback :) so we don't care what kinf of qt it is QFileInfo fi(qmakePath); if (!fi.exists() || !fi.isExecutable() || !fi.isFile()) return 0; diff --git a/src/plugins/qt4projectmanager/winceqtversionfactory.h b/src/plugins/qt4projectmanager/winceqtversionfactory.h index fd4bbdfaa3..56761b65b6 100644 --- a/src/plugins/qt4projectmanager/winceqtversionfactory.h +++ b/src/plugins/qt4projectmanager/winceqtversionfactory.h @@ -32,23 +32,23 @@ #ifndef WINCEQTVERSIONFACTORY_H #define WINCEQTVERSIONFACTORY_H -#include "qtversionfactory.h" +#include <qtsupport/qtversionfactory.h> namespace Qt4ProjectManager { namespace Internal { -class WinCeQtVersionFactory : public QtVersionFactory +class WinCeQtVersionFactory : public QtSupport::QtVersionFactory { public: explicit WinCeQtVersionFactory(QObject *parent = 0); ~WinCeQtVersionFactory(); virtual bool canRestore(const QString &type); - virtual BaseQtVersion *restore(const QVariantMap &data); + virtual QtSupport::BaseQtVersion *restore(const QVariantMap &data); virtual int priority() const; - virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + virtual QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); }; } // Internal diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp index 82455803d4..6e9476d2f3 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp @@ -49,7 +49,7 @@ namespace Qt4ProjectManager { -AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent, const QtVersionNumber &minimumQtVersionNumber) +AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent, const QtSupport::QtVersionNumber &minimumQtVersionNumber) : ProjectExplorer::BaseProjectWizardDialog(parent) { m_targetsPage = new TargetSetupPage; diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h index 200702f30e..eac70224ff 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h @@ -34,7 +34,7 @@ #define ABSTRACTMOBILEAPPWIZARD_H #include <qt4projectmanager/qt4projectmanager_global.h> -#include <qt4projectmanager/qtversionmanager.h> +#include <qtsupport/qtversionmanager.h> #include <coreplugin/basefilewizard.h> #include <projectexplorer/baseprojectwizarddialog.h> @@ -55,7 +55,7 @@ class QT4PROJECTMANAGER_EXPORT AbstractMobileAppWizardDialog : public ProjectExp Q_OBJECT protected: - explicit AbstractMobileAppWizardDialog(QWidget *parent, const QtVersionNumber &minimumQtVersionNumber); + explicit AbstractMobileAppWizardDialog(QWidget *parent, const QtSupport::QtVersionNumber &minimumQtVersionNumber); public: TargetSetupPage *targetsPage() const; diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp index ab9fad689e..837f94c5f2 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp @@ -58,7 +58,7 @@ private: }; Html5AppWizardDialog::Html5AppWizardDialog(QWidget *parent) - : AbstractMobileAppWizardDialog(parent, QtVersionNumber()) + : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber()) , m_htmlOptionsPage(0) { setWindowTitle(tr("New HTML5 Application")); diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp index 7fc5dba4e8..0f2bd9f870 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp @@ -60,7 +60,7 @@ class MobileAppWizardDialog : public AbstractMobileAppWizardDialog Q_OBJECT public: explicit MobileAppWizardDialog(QWidget *parent = 0) - : AbstractMobileAppWizardDialog(parent, QtVersionNumber()) + : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber()) { setWindowTitle(DisplayName); setIntroDescription(Description); diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp index f271eb954f..b6a54fa12a 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp @@ -36,9 +36,10 @@ #include "qtquickappwizard.h" #include "qtquickappwizardpages.h" #include "targetsetuppage.h" - #include "qt4projectmanagerconstants.h" +#include <qtsupport/qtsupportconstants.h> + #include <QtCore/QCoreApplication> #include <QtGui/QIcon> @@ -58,7 +59,7 @@ private: }; QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent) - : AbstractMobileAppWizardDialog(parent, QtVersionNumber(4, 7, 0)) + : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(4, 7, 0)) , m_qmlSourcesPage(0) { setWindowTitle(tr("New Qt Quick Application")); @@ -93,7 +94,7 @@ QtQuickAppWizard::~QtQuickAppWizard() Core::BaseFileWizardParameters QtQuickAppWizard::parameters() { Core::BaseFileWizardParameters parameters(ProjectWizard); - parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QTQUICK_APP))); + parameters.setIcon(QIcon(QLatin1String(Qt4ProjectManager::Constants::ICON_QTQUICK_APP))); parameters.setDisplayName(tr("Qt Quick Application")); parameters.setId(QLatin1String("QA.QMLA Application")); parameters.setDescription(tr("Creates a Qt Quick application project that can contain " @@ -102,9 +103,9 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters() "mobile target platforms. For example, you can create signed " "Symbian Installation System (SIS) packages for this type of " "projects.")); - parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY)); - parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE, - Constants::QML_WIZARD_TR_CATEGORY)); + parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY)); + parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE, + QtSupport::Constants::QML_WIZARD_TR_CATEGORY)); return parameters; } diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp index 76be0dd7af..accac9f044 100644 --- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp +++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp @@ -37,12 +37,12 @@ #include "qt4project.h" #include "qt4projectmanagerconstants.h" #include "qt4target.h" -#include "qtversionmanager.h" #include "qt4basetargetfactory.h" #include <extensionsystem/pluginmanager.h> #include <projectexplorer/task.h> #include <projectexplorer/taskhub.h> +#include <qtsupport/qtversionfactory.h> #include <utils/qtcassert.h> #include <utils/qtcprocess.h> @@ -103,7 +103,7 @@ void TargetSetupPage::setPreferMobile(bool mobile) m_preferMobile = mobile; } -void TargetSetupPage::setMinimumQtVersion(const QtVersionNumber &number) +void TargetSetupPage::setMinimumQtVersion(const QtSupport::QtVersionNumber &number) { m_minimumQtVersionNumber = number; } @@ -207,11 +207,11 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project) Qt4BaseTargetFactory *factory = m_factories.value(it.value()); foreach (const BuildConfigurationInfo &info, it.value()->usedImportInfos()) { - BaseQtVersion *version = info.version; + QtSupport::BaseQtVersion *version = info.version; for (int i=0; i < m_importInfos.size(); ++i) { if (m_importInfos.at(i).version == version) { if (m_importInfos[i].temporaryQtVersion) { - QtVersionManager::instance()->addVersion(m_importInfos[i].version); + QtSupport::QtVersionManager::instance()->addVersion(m_importInfos[i].version); m_importInfos[i].temporaryQtVersion = false; } } diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h index 44a4c975f2..16823fbc71 100644 --- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h +++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h @@ -34,8 +34,8 @@ #define TARGETSETUPPAGE_H #include "../qt4target.h" -#include "../qtversionmanager.h" #include "../qt4projectmanager_global.h" +#include <qtsupport/qtversionmanager.h> #include <QtCore/QString> #include <QtGui/QWizard> @@ -78,7 +78,7 @@ public: void setPreferMobile(bool mobile); /// Sets the minimum qt version /// calls this before \sa initializePage() - void setMinimumQtVersion(const QtVersionNumber &number); + void setMinimumQtVersion(const QtSupport::QtVersionNumber &number); /// Sets whether the TargetSetupPage looks on disk for builds of this project /// call this before \sa initializePage() void setImportSearch(bool b); @@ -98,7 +98,7 @@ private: bool m_preferMobile; bool m_importSearch; - QtVersionNumber m_minimumQtVersionNumber; + QtSupport::QtVersionNumber m_minimumQtVersionNumber; QString m_proFilePath; QString m_defaultShadowBuildLocation; QMap<QString, Qt4TargetSetupWidget *> m_widgets; diff --git a/src/plugins/qtsupport/QtSupport.pluginspec.in b/src/plugins/qtsupport/QtSupport.pluginspec.in new file mode 100644 index 0000000000..27c49fd590 --- /dev/null +++ b/src/plugins/qtsupport/QtSupport.pluginspec.in @@ -0,0 +1,19 @@ +<plugin name=\"QtSupport\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> + <vendor>Nokia Corporation</vendor> + <copyright>(C) 2011 Nokia Corporation</copyright> + <license> +Commercial Usage + +Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. + +GNU Lesser General Public License Usage + +Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + </license> + <category>Build Systems</category> + <description>Provides support code for build systems.</description> + <url>http://qt.nokia.com</url> + <dependencyList> + <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> + </dependencyList> +</plugin> diff --git a/src/plugins/qt4projectmanager/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 5666faaaa5..0d8ddf8b57 100644 --- a/src/plugins/qt4projectmanager/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -31,14 +31,12 @@ **************************************************************************/ #include "baseqtversion.h" -#include "qt4projectmanagerconstants.h" #include "qmlobservertool.h" #include "qmldumptool.h" #include "qmldebugginglibrary.h" -#include "profilereader.h" -#include "qt4basetargetfactory.h" #include "qtversionmanager.h" +#include "profilereader.h" #include <projectexplorer/toolchainmanager.h> #include <projectexplorer/debugginghelper.h> #include <projectexplorer/gnumakeparser.h> @@ -54,10 +52,8 @@ #include <QtCore/QCoreApplication> #include <QtCore/QProcess> -#include <algorithm> - -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; +using namespace QtSupport::Internal; static const char QTVERSIONID[] = "Id"; static const char QTVERSIONNAME[] = "Name"; @@ -261,6 +257,11 @@ void BaseQtVersion::setId(int id) m_id = id; } +void BaseQtVersion::restoreLegacySettings(QSettings *s) +{ + Q_UNUSED(s); +} + void BaseQtVersion::fromMap(const QVariantMap &map) { m_id = map.value(QLatin1String(QTVERSIONID)).toInt(); @@ -958,22 +959,9 @@ QList<ProjectExplorer::Task> BaseQtVersion::reportIssuesImpl(const QString &proF } QList<ProjectExplorer::Task> -BaseQtVersion::reportIssues(const QString &proFile, const QString &buildDir, bool includeTargetSpecificErrors) +BaseQtVersion::reportIssues(const QString &proFile, const QString &buildDir) { QList<ProjectExplorer::Task> results = reportIssuesImpl(proFile, buildDir); - if (includeTargetSpecificErrors) { - QList<Qt4BaseTargetFactory *> factories; - foreach (const QString &id, supportedTargetIds()) - if (Qt4BaseTargetFactory *factory = Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(id)) - factories << factory; - - qSort(factories); - QList<Qt4BaseTargetFactory *>::iterator newend = std::unique(factories.begin(), factories.end()); - QList<Qt4BaseTargetFactory *>::iterator it = factories.begin(); - for ( ; it != newend; ++it) - results.append((*it)->reportIssues(proFile)); - } - qSort(results); return results; } diff --git a/src/plugins/qt4projectmanager/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 12773a0cdb..d07c22d6cf 100644 --- a/src/plugins/qt4projectmanager/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -33,7 +33,7 @@ #ifndef BASEQTVERSION_H #define BASEQTVERSION_H -#include "qt4projectmanager_global.h" +#include "qtsupport_global.h" #include <projectexplorer/abi.h> #include <projectexplorer/headerpath.h> @@ -45,10 +45,12 @@ QT_BEGIN_NAMESPACE class ProFileEvaluator; +class QSettings; QT_END_NAMESPACE -namespace Qt4ProjectManager { -class QT4PROJECTMANAGER_EXPORT QtVersionNumber +namespace QtSupport +{ +class QTSUPPORT_EXPORT QtVersionNumber { public: QtVersionNumber(int ma, int mi, int p); @@ -68,7 +70,7 @@ private: bool checkVersionString(const QString &version) const; }; -class QT4PROJECTMANAGER_EXPORT QtConfigWidget : public QWidget +class QTSUPPORT_EXPORT QtConfigWidget : public QWidget { Q_OBJECT public: @@ -77,13 +79,16 @@ signals: void changed(); }; -class QT4PROJECTMANAGER_EXPORT BaseQtVersion +class QTSUPPORT_EXPORT BaseQtVersion { + friend class QtVersionFactory; friend class QtVersionManager; public: virtual ~BaseQtVersion(); virtual void fromMap(const QVariantMap &map); + // pre 2.3 settings, only used by SymbianQt + virtual void restoreLegacySettings(QSettings *s); virtual BaseQtVersion *clone() const = 0; virtual bool equals(BaseQtVersion *other); @@ -165,7 +170,7 @@ public: /// Check a .pro-file/Qt version combination on possible issues /// @return a list of tasks, ordered on severity (errors first, then /// warnings and finally info items. - QList<ProjectExplorer::Task> reportIssues(const QString &proFile, const QString &buildDir, bool includeTargetSpecificErrors); + QList<ProjectExplorer::Task> reportIssues(const QString &proFile, const QString &buildDir); virtual ProjectExplorer::IOutputParser *createOutputParser() const; @@ -250,4 +255,6 @@ private: mutable bool m_qmakeIsExecutable; }; } + +Q_DECLARE_OPERATORS_FOR_FLAGS(QtSupport::BaseQtVersion::QmakeBuildConfigs) #endif // BASEQTVERSION_H diff --git a/src/plugins/qt4projectmanager/debugginghelper.ui b/src/plugins/qtsupport/debugginghelper.ui index 7f0de1c718..a3cf9e5349 100644 --- a/src/plugins/qt4projectmanager/debugginghelper.ui +++ b/src/plugins/qtsupport/debugginghelper.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>Qt4ProjectManager::Internal::DebuggingHelper</class> - <widget class="QWidget" name="Qt4ProjectManager::Internal::DebuggingHelper"> + <class>QtSupport::Internal::DebuggingHelper</class> + <widget class="QWidget" name="QtSupport::Internal::DebuggingHelper"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp index 49e2f4e5cd..432151fad5 100644 --- a/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp +++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp @@ -34,11 +34,9 @@ #include "qmldumptool.h" #include "qmlobservertool.h" #include "qmldebugginglibrary.h" -#include <qt4projectmanager/baseqtversion.h> +#include "baseqtversion.h" +#include "qtversionmanager.h" #include <coreplugin/messagemanager.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> -#include <qt4projectmanager/qtversionmanager.h> -#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <projectexplorer/toolchainmanager.h> #include <projectexplorer/debugginghelper.h> #include <projectexplorer/abi.h> @@ -46,8 +44,8 @@ #include <QtCore/QCoreApplication> -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; +using namespace QtSupport::Internal; using ProjectExplorer::DebuggingHelperLibrary; DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version, Tools tools) : diff --git a/src/plugins/qt4projectmanager/debugginghelperbuildtask.h b/src/plugins/qtsupport/debugginghelperbuildtask.h index 5330e1fc81..9a0a7fceeb 100644 --- a/src/plugins/qt4projectmanager/debugginghelperbuildtask.h +++ b/src/plugins/qtsupport/debugginghelperbuildtask.h @@ -33,17 +33,17 @@ #ifndef DEBUGGINGHELPERBUILDTASK_H #define DEBUGGINGHELPERBUILDTASK_H +#include "qtsupport_global.h" #include <utils/environment.h> #include <QtCore/QObject> #include <QtCore/QFutureInterface> #include <QtCore/QMetaType> -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; -namespace Internal { -class DebuggingHelperBuildTask : public QObject { +class QTSUPPORT_EXPORT DebuggingHelperBuildTask : public QObject { Q_DISABLE_COPY(DebuggingHelperBuildTask) Q_OBJECT public: @@ -87,9 +87,8 @@ private: bool m_showErrors; }; -} //namespace Internal } //namespace Qt4ProjectManager -Q_DECLARE_METATYPE(Qt4ProjectManager::Internal::DebuggingHelperBuildTask::Tools) +Q_DECLARE_METATYPE(QtSupport::DebuggingHelperBuildTask::Tools) #endif // DEBUGGINGHELPERBUILDTASK_H diff --git a/src/plugins/qt4projectmanager/profilereader.cpp b/src/plugins/qtsupport/profilereader.cpp index 639aa4ecdb..a92344b5e4 100644 --- a/src/plugins/qt4projectmanager/profilereader.cpp +++ b/src/plugins/qtsupport/profilereader.cpp @@ -38,8 +38,7 @@ #include <QtCore/QDir> #include <QtCore/QDebug> -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; static QString format(const QString &fileName, int lineNo, const QString &msg) { diff --git a/src/plugins/qt4projectmanager/profilereader.h b/src/plugins/qtsupport/profilereader.h index 7cb909c51e..7993818a49 100644 --- a/src/plugins/qt4projectmanager/profilereader.h +++ b/src/plugins/qtsupport/profilereader.h @@ -33,17 +33,20 @@ #ifndef PROFILEREADER_H #define PROFILEREADER_H -#include "profileparser.h" -#include "profileevaluator.h" +#include "qtsupport_global.h" +#include "proparser/profileparser.h" +#include "proparser/profileevaluator.h" #include <QtCore/QObject> #include <QtCore/QMap> #include <QtCore/QTimer> -namespace Qt4ProjectManager { +namespace QtSupport { namespace Internal { +class QtSupportPlugin; +} -class ProMessageHandler : public QObject, +class QTSUPPORT_EXPORT ProMessageHandler : public QObject, public ProFileParserHandler, public ProFileEvaluatorHandler { Q_OBJECT @@ -66,7 +69,7 @@ private: bool m_verbose; }; -class ProFileReader : public ProMessageHandler, public ProFileParser, public ProFileEvaluator +class QTSUPPORT_EXPORT ProFileReader : public ProMessageHandler, public ProFileParser, public ProFileEvaluator { Q_OBJECT @@ -87,7 +90,7 @@ private: int m_ignoreLevel; }; -class ProFileCacheManager : public QObject +class QTSUPPORT_EXPORT ProFileCacheManager : public QObject { Q_OBJECT @@ -109,10 +112,9 @@ private: static ProFileCacheManager *s_instance; - friend class Qt4ProjectManagerPlugin; + friend class QtSupport::Internal::QtSupportPlugin; }; -} // namespace Internal -} // namespace Qt4ProjectManager +} // namespace QtSupport #endif // PROFILEREADER_H diff --git a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp b/src/plugins/qtsupport/qmldebugginglibrary.cpp index dd82a98e93..cff3af70f9 100644 --- a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp +++ b/src/plugins/qtsupport/qmldebugginglibrary.cpp @@ -33,7 +33,7 @@ #include "qmldebugginglibrary.h" #include "baseqtversion.h" -#include "qt4projectmanagerconstants.h" +#include "qtsupportconstants.h" #include <coreplugin/icore.h> #include <utils/qtcassert.h> @@ -43,7 +43,7 @@ #include <QDir> #include <QDebug> -namespace Qt4ProjectManager { +namespace QtSupport { QString QmlDebuggingLibrary::libraryByInstallData(const QString &qtInstallData, bool debugBuild) diff --git a/src/plugins/qt4projectmanager/qmldebugginglibrary.h b/src/plugins/qtsupport/qmldebugginglibrary.h index 7732da4884..85726cc440 100644 --- a/src/plugins/qt4projectmanager/qmldebugginglibrary.h +++ b/src/plugins/qtsupport/qmldebugginglibrary.h @@ -33,8 +33,8 @@ #ifndef QMLDEBUGGINGLIBRARY_H #define QMLDEBUGGINGLIBRARY_H +#include "qtsupport_global.h" #include <utils/buildablehelperlibrary.h> -#include "qt4projectmanager_global.h" QT_FORWARD_DECLARE_CLASS(QDir) @@ -46,7 +46,7 @@ namespace ProjectExplorer { class Project; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; diff --git a/src/plugins/qt4projectmanager/qmldumptool.cpp b/src/plugins/qtsupport/qmldumptool.cpp index fba513c655..fda6d7cf72 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.cpp +++ b/src/plugins/qtsupport/qmldumptool.cpp @@ -31,8 +31,7 @@ **************************************************************************/ #include "qmldumptool.h" -#include "qt4project.h" -#include "qt4projectmanagerconstants.h" +#include "qtsupportconstants.h" #include "qtversionmanager.h" #include "debugginghelperbuildtask.h" @@ -53,8 +52,8 @@ namespace { -using namespace Qt4ProjectManager; -using Qt4ProjectManager::Internal::DebuggingHelperBuildTask; +using namespace QtSupport; +using QtSupport::DebuggingHelperBuildTask; class QmlDumpBuildTask; @@ -154,13 +153,13 @@ private: }; QList<ProjectToUpdate> m_projectsToUpdate; - Internal::DebuggingHelperBuildTask *m_buildTask; // deletes itself after run() + DebuggingHelperBuildTask *m_buildTask; // deletes itself after run() bool m_failed; }; } // end of anonymous namespace -namespace Qt4ProjectManager { +namespace QtSupport { static inline QStringList validBinaryFilenames(bool debugBuild) { @@ -185,8 +184,8 @@ bool QmlDumpTool::canBuild(const BaseQtVersion *qtVersion, QString *reason) { const QString installHeaders = qtVersion->versionInfo().value("QT_INSTALL_HEADERS"); - if (!qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID) - && !(qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID))) { + if (qtVersion->type() != Constants::DESKTOPQT + && qtVersion->type() != Constants::SIMULATORQT) { if (reason) *reason = QCoreApplication::translate("Qt4ProjectManager::QmlDumpTool", "Only available for Qt for Desktop and Qt for Qt Simulator."); return false; @@ -205,54 +204,8 @@ bool QmlDumpTool::canBuild(const BaseQtVersion *qtVersion, QString *reason) return true; } -static BaseQtVersion *qtVersionForProject(ProjectExplorer::Project *project) +QString QmlDumpTool::toolForVersion(BaseQtVersion *version, bool debugDump) { - if (project && project->id() == Qt4ProjectManager::Constants::QT4PROJECT_ID) { - Qt4Project *qt4Project = static_cast<Qt4Project*>(project); - if (qt4Project && qt4Project->activeTarget() - && qt4Project->activeTarget()->activeBuildConfiguration()) { - BaseQtVersion *version = qt4Project->activeTarget()->activeBuildConfiguration()->qtVersion(); - if (version && version->isValid()) - return version; - } - return 0; - } - - if (project && project->id() == QLatin1String("QmlProjectManager.QmlProject")) { - // We cannot access the QmlProject interfaces here, therefore use the metatype system - if (!project->activeTarget() || !project->activeTarget()->activeRunConfiguration()) - return 0; - QVariant variant = project->activeTarget()->activeRunConfiguration()->property("qtVersionId"); - QTC_ASSERT(variant.isValid() && variant.canConvert(QVariant::Int), return 0); - BaseQtVersion *version = QtVersionManager::instance()->version(variant.toInt()); - if (version && version->isValid()) { - return version; - } - return 0; - } - - // else, find any desktop or simulator Qt version that has qmldump, or - // - if there isn't any - one that could build it - BaseQtVersion *canBuildQmlDump = 0; - QtVersionManager *qtVersions = QtVersionManager::instance(); - foreach (BaseQtVersion *version, qtVersions->validVersions()) { - if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID) - || version->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) { - if (version->hasQmlDump()) - return version; - - if (!canBuildQmlDump && QmlDumpTool::canBuild(version)) { - canBuildQmlDump = version; - } - } - } - - return canBuildQmlDump; -} - -QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project, bool debugDump) -{ - BaseQtVersion *version = qtVersionForProject(project); if (version) { QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); QString qtInstallHeaders = version->versionInfo().value("QT_INSTALL_HEADERS"); @@ -340,12 +293,10 @@ QStringList QmlDumpTool::installDirectories(const QString &qtInstallData) return directories; } -void QmlDumpTool::pathAndEnvironment(ProjectExplorer::Project *project, bool preferDebug, - QString *dumperPath, Utils::Environment *env) +void QmlDumpTool::pathAndEnvironment(ProjectExplorer::Project *project, BaseQtVersion *version, + bool preferDebug, QString *dumperPath, Utils::Environment *env) { QString path; - - BaseQtVersion *version = qtVersionForProject(project); if (version && !version->hasQmlDump() && QmlDumpTool::canBuild(version)) { QmlDumpBuildTask *qmlDumpBuildTask = qmlDumpBuilds()->value(version->uniqueId()); if (qmlDumpBuildTask) { @@ -362,9 +313,9 @@ void QmlDumpTool::pathAndEnvironment(ProjectExplorer::Project *project, bool pre return; } - path = Qt4ProjectManager::QmlDumpTool::toolForProject(project, preferDebug); + path = toolForVersion(version, preferDebug); if (path.isEmpty()) - path = Qt4ProjectManager::QmlDumpTool::toolForProject(project, !preferDebug); + path = toolForVersion(version, !preferDebug); if (!path.isEmpty()) { QFileInfo qmldumpFileInfo(path); diff --git a/src/plugins/qt4projectmanager/qmldumptool.h b/src/plugins/qtsupport/qmldumptool.h index 0d254b69b3..4192fc8a06 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.h +++ b/src/plugins/qtsupport/qmldumptool.h @@ -33,7 +33,7 @@ #ifndef QMLDUMPTOOL_H #define QMLDUMPTOOL_H -#include "qt4projectmanager_global.h" +#include "qtsupport_global.h" #include <utils/buildablehelperlibrary.h> @@ -45,14 +45,14 @@ namespace ProjectExplorer { class Project; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; -class QT4PROJECTMANAGER_EXPORT QmlDumpTool : public Utils::BuildableHelperLibrary +class QTSUPPORT_EXPORT QmlDumpTool : public Utils::BuildableHelperLibrary { public: static bool canBuild(const BaseQtVersion *qtVersion, QString *reason = 0); - static QString toolForProject(ProjectExplorer::Project *project, bool debugDump); + static QString toolForVersion(BaseQtVersion *version, bool debugDump); static QString toolByInstallData(const QString &qtInstallData, const QString &qtInstallHeaders, bool debugDump); static QStringList locationsByInstallData(const QString &qtInstallData, bool debugDump); @@ -63,8 +63,8 @@ public: // Copy the source files to a target location and return the chosen target location. static QString copy(const QString &qtInstallData, QString *errorMessage); - static void pathAndEnvironment(ProjectExplorer::Project *project, bool preferDebug, - QString *path, Utils::Environment *env); + static void pathAndEnvironment(ProjectExplorer::Project *project, BaseQtVersion *version, + bool preferDebug, QString *path, Utils::Environment *env); private: static QStringList installDirectories(const QString &qtInstallData); diff --git a/src/plugins/qt4projectmanager/qmlobservertool.cpp b/src/plugins/qtsupport/qmlobservertool.cpp index ca007846e1..1eb16ca27d 100644 --- a/src/plugins/qt4projectmanager/qmlobservertool.cpp +++ b/src/plugins/qtsupport/qmlobservertool.cpp @@ -32,8 +32,7 @@ #include "qmlobservertool.h" -#include "qt4project.h" -#include "qt4projectmanagerconstants.h" +#include "qtsupportconstants.h" #include "baseqtversion.h" #include <coreplugin/icore.h> #include <utils/qtcassert.h> @@ -44,7 +43,7 @@ #include <QtCore/QDir> #include <QtCore/QDebug> -namespace Qt4ProjectManager { +namespace QtSupport { static inline QStringList validBinaryFilenames() { @@ -57,8 +56,8 @@ static inline QStringList validBinaryFilenames() bool QmlObserverTool::canBuild(const BaseQtVersion *qtVersion, QString *reason) { - if (!qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID) - && !qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) { + if (qtVersion->type() != Constants::DESKTOPQT + && qtVersion->type() != Constants::SIMULATORQT) { if (reason) *reason = QCoreApplication::translate("Qt4ProjectManager::QmlObserverTool", "Only available for Qt for Desktop or Qt for Qt Simulator."); return false; @@ -72,23 +71,6 @@ bool QmlObserverTool::canBuild(const BaseQtVersion *qtVersion, QString *reason) return true; } -QString QmlObserverTool::toolForProject(ProjectExplorer::Project *project) -{ - if (project->id() == Qt4ProjectManager::Constants::QT4PROJECT_ID) { - Qt4Project *qt4Project = static_cast<Qt4Project*>(project); - if (qt4Project && qt4Project->activeTarget() - && qt4Project->activeTarget()->activeBuildConfiguration()) { - BaseQtVersion *version = qt4Project->activeTarget()->activeBuildConfiguration()->qtVersion(); - if (version && version->isValid()) { - QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); - QString toolPath = toolByInstallData(qtInstallData); - return toolPath; - } - } - } - return QString(); -} - QString QmlObserverTool::toolByInstallData(const QString &qtInstallData) { if (!Core::ICore::instance()) diff --git a/src/plugins/qt4projectmanager/qmlobservertool.h b/src/plugins/qtsupport/qmlobservertool.h index 3209cf6568..8b895cdde8 100644 --- a/src/plugins/qt4projectmanager/qmlobservertool.h +++ b/src/plugins/qtsupport/qmlobservertool.h @@ -33,8 +33,8 @@ #ifndef QMLOBSERVERTOOL_H #define QMLOBSERVERTOOL_H +#include "qtsupport_global.h" #include <utils/buildablehelperlibrary.h> -#include "qt4projectmanager_global.h" QT_FORWARD_DECLARE_CLASS(QDir) @@ -46,15 +46,14 @@ namespace ProjectExplorer { class Project; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; -class QT4PROJECTMANAGER_EXPORT QmlObserverTool : public Utils::BuildableHelperLibrary +class QTSUPPORT_EXPORT QmlObserverTool : public Utils::BuildableHelperLibrary { public: static bool canBuild(const BaseQtVersion *qtVersion, QString *reason = 0); - static QString toolForProject(ProjectExplorer::Project *project); static QString toolByInstallData(const QString &qtInstallData); static QStringList locationsByInstallData(const QString &qtInstallData); diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 4afdf499de..534676c56b 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -35,7 +35,7 @@ #include "ui_qtversionmanager.h" #include "ui_qtversioninfo.h" #include "ui_debugginghelper.h" -#include "qt4projectmanagerconstants.h" +#include "qtsupportconstants.h" #include "qtversionmanager.h" #include "qtversionfactory.h" #include "qmldumptool.h" @@ -57,8 +57,8 @@ enum ModelRoles { VersionIdRole = Qt::UserRole, BuildLogRole, BuildRunningRole}; -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; +using namespace QtSupport::Internal; /// // QtOptionsPage diff --git a/src/plugins/qt4projectmanager/qtoptionspage.h b/src/plugins/qtsupport/qtoptionspage.h index 86a21577fe..f8eff141dd 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.h +++ b/src/plugins/qtsupport/qtoptionspage.h @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE class QTreeWidgetItem; QT_END_NAMESPACE -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; class QtConfigWidget; diff --git a/src/plugins/qt4projectmanager/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp index bf58409f9c..036521ac52 100644 --- a/src/plugins/qt4projectmanager/qtoutputformatter.cpp +++ b/src/plugins/qtsupport/qtoutputformatter.cpp @@ -42,7 +42,7 @@ #include <QtGui/QTextCursor> using namespace ProjectExplorer; -using namespace Qt4ProjectManager; +using namespace QtSupport; QtOutputFormatter::QtOutputFormatter(ProjectExplorer::Project *project) : OutputFormatter() @@ -57,7 +57,7 @@ QtOutputFormatter::QtOutputFormatter(ProjectExplorer::Project *project) , m_project(project) { if(project) { - m_projectFinder.setProjectFiles(project->files(Qt4Project::ExcludeGeneratedFiles)); + m_projectFinder.setProjectFiles(project->files(Project::ExcludeGeneratedFiles)); m_projectFinder.setProjectDirectory(project->projectDirectory()); connect(project, SIGNAL(fileListChanged()), @@ -264,5 +264,5 @@ void QtOutputFormatter::handleLink(const QString &href) void QtOutputFormatter::updateProjectFileList() { if (m_project) - m_projectFinder.setProjectFiles(m_project.data()->files(Qt4Project::ExcludeGeneratedFiles)); + m_projectFinder.setProjectFiles(m_project.data()->files(Project::ExcludeGeneratedFiles)); } diff --git a/src/plugins/qt4projectmanager/qtoutputformatter.h b/src/plugins/qtsupport/qtoutputformatter.h index ac572c4c59..b120650aec 100644 --- a/src/plugins/qt4projectmanager/qtoutputformatter.h +++ b/src/plugins/qtsupport/qtoutputformatter.h @@ -33,7 +33,7 @@ #ifndef QTOUTPUTFORMATTER_H #define QTOUTPUTFORMATTER_H -#include "qt4projectmanager_global.h" +#include "qtsupport_global.h" #include <utils/outputformatter.h> #include <utils/fileinprojectfinder.h> @@ -47,7 +47,7 @@ namespace ProjectExplorer { class Project; } // namespace ProjectExplorer -namespace Qt4ProjectManager { +namespace QtSupport { struct LinkResult { @@ -56,7 +56,7 @@ struct LinkResult QString href; }; -class QT4PROJECTMANAGER_EXPORT QtOutputFormatter +class QTSUPPORT_EXPORT QtOutputFormatter : public Utils::OutputFormatter { Q_OBJECT @@ -86,6 +86,6 @@ private: }; -} // namespace Qt4ProjectManager +} // namespace QtSupport #endif // QTOUTPUTFORMATTER_H diff --git a/src/plugins/qtsupport/qtsupport.pri b/src/plugins/qtsupport/qtsupport.pri new file mode 100644 index 0000000000..834156ccd6 --- /dev/null +++ b/src/plugins/qtsupport/qtsupport.pri @@ -0,0 +1,4 @@ +include(qtsupport_dependencies.pri) + +LIBS *= -l$$qtLibraryName(QtSupport) +DEFINES += PROPARSER_AS_LIBRARY PROPARSER_THREAD_SAFE PROEVALUATOR_THREAD_SAFE diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro new file mode 100644 index 0000000000..5c3484d0b0 --- /dev/null +++ b/src/plugins/qtsupport/qtsupport.pro @@ -0,0 +1,46 @@ +TEMPLATE = lib +TARGET = QtSupport +DEFINES += QT_CREATOR QTSUPPORT_LIBRARY +QT += network +include(../../qtcreatorplugin.pri) +include(qtsupport_dependencies.pri) +DEFINES += PROPARSER_AS_LIBRARY PROPARSER_LIBRARY PROPARSER_THREAD_SAFE PROEVALUATOR_THREAD_SAFE +include(../../shared/proparser/proparser.pri) + +HEADERS += \ + qtsupportplugin.h \ + qtsupport_global.h \ + qtoutputformatter.h \ + qtversionmanager.h \ + qtversionfactory.h \ + baseqtversion.h \ + qmldumptool.h \ + qmlobservertool.h \ + qmldebugginglibrary.h \ + qtoptionspage.h \ + debugginghelperbuildtask.h \ + qtsupportconstants.h \ + profilereader.h \ + +SOURCES += \ + qtsupportplugin.cpp \ + qtoutputformatter.cpp \ + qtversionmanager.cpp \ + qtversionfactory.cpp \ + baseqtversion.cpp \ + qmldumptool.cpp \ + qmlobservertool.cpp \ + qmldebugginglibrary.cpp \ + qtoptionspage.cpp \ + debugginghelperbuildtask.cpp \ + profilereader.cpp \ + +FORMS += \ + showbuildlog.ui \ + qtversioninfo.ui \ + debugginghelper.ui \ + qtversionmanager.ui \ + + +DEFINES += QT_NO_CAST_TO_ASCII + diff --git a/src/plugins/qtsupport/qtsupport_dependencies.pri b/src/plugins/qtsupport/qtsupport_dependencies.pri new file mode 100644 index 0000000000..7f68594566 --- /dev/null +++ b/src/plugins/qtsupport/qtsupport_dependencies.pri @@ -0,0 +1,2 @@ +include(../../plugins/projectexplorer/projectexplorer.pri) +include(../../libs/qmljs/qmljs.pri) diff --git a/src/plugins/qtsupport/qtsupport_global.h b/src/plugins/qtsupport/qtsupport_global.h new file mode 100644 index 0000000000..b38eda4c6a --- /dev/null +++ b/src/plugins/qtsupport/qtsupport_global.h @@ -0,0 +1,44 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef QTSUPPORT_GLOBAL_H +#define QTSUPPORT_GLOBAL_H + +#include <QtCore/qglobal.h> + +#if defined(QTSUPPORT_LIBRARY) +# define QTSUPPORT_EXPORT Q_DECL_EXPORT +#else +# define QTSUPPORT_EXPORT Q_DECL_IMPORT +#endif + +#endif diff --git a/src/plugins/qtsupport/qtsupportconstants.h b/src/plugins/qtsupport/qtsupportconstants.h new file mode 100644 index 0000000000..802dabdd55 --- /dev/null +++ b/src/plugins/qtsupport/qtsupportconstants.h @@ -0,0 +1,63 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef QTSUPPORTCONSTANTS_H +#define QTSUPPORTCONSTANTS_H + +namespace QtSupport { +namespace Constants { + +//Qt4 settings pages +const char * const QT_SETTINGS_CATEGORY = "L.Qt4"; +const char * const QT_SETTINGS_CATEGORY_ICON = ":/core/images/category_qt.png"; +const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt4"); +const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions"; +const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions"); + +// QtVersions +const char * const SYMBIANQT = "Qt4ProjectManager.QtVersion.Symbian"; +const char * const MAEMOQT = "Qt4ProjectManager.QtVersion.Maemo"; +const char * const DESKTOPQT = "Qt4ProjectManager.QtVersion.Desktop"; +const char * const SIMULATORQT = "Qt4ProjectManager.QtVersion.Simulator"; +const char * const WINCEQT = "Qt4ProjectManager.QtVersion.WinCE"; + +// QML wizard categories +// both the qt4projectmanager and the qmlprojectmanager do have qt quick wizards +// so we define the category here +const char * const QML_WIZARD_CATEGORY = "C.Projects"; // (before Qt) +const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager"; +const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "Qt Quick Project"); +const char * const QML_WIZARD_ICON = ":/qmlproject/images/qml_wizard.png"; + +} +} +#endif // QTSUPPORTCONSTANTS_H diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp new file mode 100644 index 0000000000..2c2fc4093d --- /dev/null +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -0,0 +1,71 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "qtsupportplugin.h" + +#include "qtoptionspage.h" +#include "qtversionmanager.h" + +#include "profilereader.h" + +#include <extensionsystem/pluginmanager.h> + +#include <QtCore/QtPlugin> +#include <QtGui/QMenu> + +using namespace QtSupport; +using namespace QtSupport::Internal; + +QtSupportPlugin::~QtSupportPlugin() +{ +} + +bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMessage) +{ + Q_UNUSED(arguments); + Q_UNUSED(errorMessage); + ProFileParser::initialize(); + ProFileEvaluator::initialize(); + new ProFileCacheManager(this); + + QtVersionManager *mgr = new QtVersionManager; + addAutoReleasedObject(mgr); + addAutoReleasedObject(new QtOptionsPage); + return true; +} + +void QtSupportPlugin::extensionsInitialized() +{ + QtVersionManager::instance()->extensionsInitialized(); +} + +Q_EXPORT_PLUGIN(QtSupportPlugin) diff --git a/src/plugins/qtsupport/qtsupportplugin.h b/src/plugins/qtsupport/qtsupportplugin.h new file mode 100644 index 0000000000..15659040af --- /dev/null +++ b/src/plugins/qtsupport/qtsupportplugin.h @@ -0,0 +1,57 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef QTSUPPORTPLUGIN_H +#define QTSUPPORTPLUGIN_H + +#include <extensionsystem/iplugin.h> +#include <coreplugin/icontext.h> + + +namespace QtSupport { + +namespace Internal { + +class QtSupportPlugin : public ExtensionSystem::IPlugin +{ + Q_OBJECT + +public: + ~QtSupportPlugin(); + bool initialize(const QStringList &arguments, QString *error_message); + void extensionsInitialized(); +}; + +} // namespace Internal +} // namespace QtSupport + +#endif // QTSUPPORTPLUGIN_H diff --git a/src/plugins/qt4projectmanager/qtversionfactory.cpp b/src/plugins/qtsupport/qtversionfactory.cpp index 0d90cc4bae..8488993c78 100644 --- a/src/plugins/qt4projectmanager/qtversionfactory.cpp +++ b/src/plugins/qtsupport/qtversionfactory.cpp @@ -35,9 +35,10 @@ #include "qtversionmanager.h" #include <extensionsystem/pluginmanager.h> +#include <QtCore/QSettings> -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; +using namespace QtSupport::Internal; QtVersionFactory::QtVersionFactory(QObject *parent) : QObject(parent) @@ -55,6 +56,17 @@ bool sortByPriority(QtVersionFactory *a, QtVersionFactory *b) return a->priority() > b->priority(); } +BaseQtVersion *QtVersionFactory::createQtVersionFromLegacySettings(const QString &qmakePath, int id, QSettings *s) +{ + BaseQtVersion *v = createQtVersionFromQMakePath(qmakePath); + if (!v) + return 0; + v->setId(id); + v->setDisplayName(s->value("Name").toString()); + v->restoreLegacySettings(s); + return v; +} + BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const QString &qmakePath, bool isAutoDetected, const QString &autoDetectionSource) { QHash<QString, QString> versionInfo; diff --git a/src/plugins/qt4projectmanager/qtversionfactory.h b/src/plugins/qtsupport/qtversionfactory.h index 81e71e4aa2..c4a157f5da 100644 --- a/src/plugins/qt4projectmanager/qtversionfactory.h +++ b/src/plugins/qtsupport/qtversionfactory.h @@ -34,16 +34,14 @@ #define QTVERSIONFACTORY_H #include "baseqtversion.h" -#include "qt4projectmanager_global.h" - -#include "profilereader.h" +#include "qtsupport_global.h" #include <QtCore/QObject> #include <QtCore/QVariantMap> -namespace Qt4ProjectManager { +namespace QtSupport { -class QT4PROJECTMANAGER_EXPORT QtVersionFactory : public QObject +class QTSUPPORT_EXPORT QtVersionFactory : public QObject { Q_OBJECT public: @@ -60,6 +58,7 @@ public: virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()) = 0; static BaseQtVersion *createQtVersionFromQMakePath(const QString &qmakePath, bool isAutoDetected = false, const QString &autoDetectionSource = QString()); + static BaseQtVersion *createQtVersionFromLegacySettings(const QString &qmakePath, int id, QSettings *s); }; } diff --git a/src/plugins/qt4projectmanager/qtversioninfo.ui b/src/plugins/qtsupport/qtversioninfo.ui index 7cd50da7dd..02375e193d 100644 --- a/src/plugins/qt4projectmanager/qtversioninfo.ui +++ b/src/plugins/qtsupport/qtversioninfo.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>Qt4ProjectManager::Internal::QtVersionInfo</class> - <widget class="QWidget" name="Qt4ProjectManager::Internal::QtVersionInfo"> + <class>QtSupport::Internal::QtVersionInfo</class> + <widget class="QWidget" name="QtSupport::Internal::QtVersionInfo"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp index bc14aadfdf..d403ac6557 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qtsupport/qtversionmanager.cpp @@ -32,13 +32,8 @@ #include "qtversionmanager.h" -#include "qt4projectmanagerconstants.h" #include "qtversionfactory.h" -// only for legay restore -#include "qt-desktop/desktopqtversion.h" -#include "qt-s60/symbianqtversion.h" - #include <projectexplorer/debugginghelper.h> #include <projectexplorer/persistentsettings.h> // only for legay restore @@ -65,8 +60,8 @@ #include <algorithm> -using namespace Qt4ProjectManager; -using namespace Qt4ProjectManager::Internal; +using namespace QtSupport; +using namespace QtSupport::Internal; using ProjectExplorer::DebuggingHelperLibrary; @@ -400,16 +395,9 @@ bool QtVersionManager::legacyRestore() if (qmakePath.isEmpty()) continue; //skip this version - // autodetection = false, from now on only sdk versions are autodetected - BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qmakePath); + BaseQtVersion *version = QtVersionFactory::createQtVersionFromLegacySettings(qmakePath, id, s); if (!version) // Likely to be a invalid version continue; - version->setId(id); - version->setDisplayName(s->value("Name").toString()); - if (SymbianQtVersion *sqv = dynamic_cast<SymbianQtVersion *>(version)) { - sqv->setSystemRoot(QDir::fromNativeSeparators(s->value("S60SDKDirectory").toString())); - sqv->setSbsV2Directory(QDir::fromNativeSeparators(s->value(QLatin1String("SBSv2Directory")).toString())); - } if (m_versions.contains(version->uniqueId())) { // oh uh; diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qtsupport/qtversionmanager.h index 7c23104459..8346241187 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.h +++ b/src/plugins/qtsupport/qtversionmanager.h @@ -33,7 +33,7 @@ #ifndef QTVERSIONMANAGER_H #define QTVERSIONMANAGER_H -#include "qt4projectmanager_global.h" +#include "qtsupport_global.h" #include "baseqtversion.h" #include <projectexplorer/abi.h> @@ -55,7 +55,7 @@ class IOutputParser; class Task; } -namespace Qt4ProjectManager { +namespace QtSupport { class BaseQtVersion; namespace Internal { @@ -70,7 +70,7 @@ struct QMakeAssignment QString value; }; -class QT4PROJECTMANAGER_EXPORT QtVersionManager : public QObject +class QTSUPPORT_EXPORT QtVersionManager : public QObject { Q_OBJECT // for getUniqueId(); @@ -167,6 +167,4 @@ private: } // namespace Qt4ProjectManager -Q_DECLARE_OPERATORS_FOR_FLAGS(Qt4ProjectManager::BaseQtVersion::QmakeBuildConfigs) - #endif // QTVERSIONMANAGER_H diff --git a/src/plugins/qt4projectmanager/qtversionmanager.ui b/src/plugins/qtsupport/qtversionmanager.ui index 12db10607b..8ebf7b8439 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.ui +++ b/src/plugins/qtsupport/qtversionmanager.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>Qt4ProjectManager::Internal::QtVersionManager</class> - <widget class="QWidget" name="Qt4ProjectManager::Internal::QtVersionManager"> + <class>QtSupport::Internal::QtVersionManager</class> + <widget class="QWidget" name="QtSupport::Internal::QtVersionManager"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/qtsupport/showbuildlog.ui b/src/plugins/qtsupport/showbuildlog.ui new file mode 100644 index 0000000000..e29e89494d --- /dev/null +++ b/src/plugins/qtsupport/showbuildlog.ui @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ShowBuildLog</class> + <widget class="QDialog" name="ShowBuildLog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Debugging Helper Build Log</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QPlainTextEdit" name="log"> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Close</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>ShowBuildLog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>ShowBuildLog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> |