Commit 754be1bc authored by dt's avatar dt Committed by Daniel Teske

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/70Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent dcd34feb
......@@ -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);
}
......
......@@ -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
......
......@@ -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>
......@@ -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())
......
......@@ -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;
}
......
......@@ -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)
......@@ -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;
}
......
......@@ -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);
......
......@@ -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());
}
......
......@@ -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);
}
}
......
......@@ -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\"/>
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 {
......
......@@ -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();
......
......@@ -32,7 +32,9 @@
#include "desktopqtversion.h"
#include "qt4projectmanagerconstants.h"
#include "profileevaluator.h"
#include <qtsupport/qtsupportconstants.h>