forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user