Commit d972b3b0 authored by hjk's avatar hjk
Browse files

QtSupport: Remove SimulatorQt



Unused for years.

Change-Id: I721068ecf18afb09fb928a348cbb5e8127a3dfc2
Reviewed-by: default avatarRainer Keller <rainer.keller@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 40dc2893
......@@ -101,7 +101,6 @@ DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *parent, Deskt
m_commandLineArguments(source->m_commandLineArguments),
m_proFilePath(source->m_proFilePath),
m_runMode(source->m_runMode),
m_forcedGuiMode(source->m_forcedGuiMode),
m_isUsingDyldImageSuffix(source->m_isUsingDyldImageSuffix),
m_userWorkingDirectory(source->m_userWorkingDirectory),
m_parseSuccess(source->m_parseSuccess),
......@@ -162,9 +161,6 @@ void DesktopQmakeRunConfiguration::ctor()
{
setDefaultDisplayName(defaultDisplayName());
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
QmakeProject *project = static_cast<QmakeProject *>(target()->project());
connect(project, &QmakeProject::proFileUpdated,
this, &DesktopQmakeRunConfiguration::proFileUpdated);
......@@ -176,8 +172,6 @@ void DesktopQmakeRunConfiguration::ctor()
void DesktopQmakeRunConfiguration::kitChanged()
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
emit runModeChanged(runMode()); // Always emit
}
......@@ -249,7 +243,6 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
QHBoxLayout *innerBox = new QHBoxLayout();
m_useTerminalCheck = new QCheckBox(tr("Run in terminal"), this);
m_useTerminalCheck->setChecked(m_qmakeRunConfiguration->runMode() == ApplicationLauncher::Console);
m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode());
innerBox->addWidget(m_useTerminalCheck);
m_useQvfbCheck = new QCheckBox(tr("Run on QVFb"), this);
......@@ -380,10 +373,8 @@ void DesktopQmakeRunConfigurationWidget::commandLineArgumentsChanged(const QStri
void DesktopQmakeRunConfigurationWidget::runModeChanged(ApplicationLauncher::Mode runMode)
{
if (!m_ignoreChange) {
m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode());
if (!m_ignoreChange)
m_useTerminalCheck->setChecked(runMode == ApplicationLauncher::Console);
}
}
void DesktopQmakeRunConfigurationWidget::usingDyldImageSuffixChanged(bool state)
......@@ -458,16 +449,9 @@ QString DesktopQmakeRunConfiguration::executable() const
ApplicationLauncher::Mode DesktopQmakeRunConfiguration::runMode() const
{
if (m_forcedGuiMode)
return ProjectExplorer::ApplicationLauncher::Gui;
return m_runMode;
}
bool DesktopQmakeRunConfiguration::forcedGuiMode() const
{
return m_forcedGuiMode;
}
bool DesktopQmakeRunConfiguration::isUsingDyldImageSuffix() const
{
return m_isUsingDyldImageSuffix;
......
......@@ -80,7 +80,6 @@ public:
virtual QString executable() const;
virtual ProjectExplorer::ApplicationLauncher::Mode runMode() const;
bool forcedGuiMode() const;
virtual QString workingDirectory() const;
virtual QString commandLineArguments() const;
......@@ -131,7 +130,6 @@ private:
// Cached startup sub project information
ProjectExplorer::ApplicationLauncher::Mode m_runMode;
bool m_forcedGuiMode;
bool m_isUsingDyldImageSuffix;
QString m_userWorkingDirectory;
bool m_parseSuccess;
......
......@@ -296,9 +296,6 @@ Target *QmakeProjectImporter::preferredTarget(const QList<Target *> &possibleTar
if (t->kit() == KitManager::defaultKit()) {
activeTarget = t;
activeTargetPriority = 3;
} else if (activeTargetPriority < 2 && version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)) {
activeTarget = t;
activeTargetPriority = 2;
} else if (activeTargetPriority < 1 && version && version->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)) {
activeTarget = t;
activeTargetPriority = 1;
......
......@@ -463,14 +463,10 @@ bool PuppetCreator::qtIsSupported() const
{
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
if (currentQtVersion
return currentQtVersion
&& currentQtVersion->isValid()
&& nonEarlyQt5Version(currentQtVersion->qtVersion())
&& (currentQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
|| currentQtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)))
return true;
return false;
&& currentQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
}
bool PuppetCreator::checkPuppetVersion(const QString &qmlPuppetPath)
......
......@@ -110,9 +110,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
if (!setPreferDump && qtVersion)
preferDebugDump = (qtVersion->defaultBuildConfig() & QtSupport::BaseQtVersion::DebugBuild);
if (qtVersion && qtVersion->isValid()) {
projectInfo.tryQmlDump = project && (
qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
|| qtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
projectInfo.tryQmlDump = project && qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
projectInfo.qtQmlPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_QML")).canonicalFilePath();
projectInfo.qtImportsPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_IMPORTS")).canonicalFilePath();
projectInfo.qtVersionString = qtVersion->qtVersionString();
......
......@@ -305,8 +305,7 @@ void QmlProjectRunConfiguration::updateEnabled()
bool QmlProjectRunConfiguration::isValidVersion(QtSupport::BaseQtVersion *version)
{
if (version
&& (version->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
|| version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT))
&& version->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
&& !version->qmlviewerCommand().isEmpty()) {
return true;
}
......
......@@ -196,10 +196,9 @@ bool QmlDumpTool::canBuild(const BaseQtVersion *qtVersion, QString *reason)
{
const QString installHeaders = qtVersion->qmakeProperty("QT_INSTALL_HEADERS");
if (qtVersion->type() != QLatin1String(Constants::DESKTOPQT)
&& qtVersion->type() != QLatin1String(Constants::SIMULATORQT)) {
if (qtVersion->type() != QLatin1String(Constants::DESKTOPQT)) {
if (reason)
*reason = QCoreApplication::translate("QmakeProjectManager::QmlDumpTool", "Only available for Qt for Desktop and Qt for Qt Simulator.");
*reason = QCoreApplication::translate("QmakeProjectManager::QmlDumpTool", "Only available for Qt for Desktop.");
return false;
}
if (qtVersion->qtVersion() < QtVersionNumber(4, 7, 1)) {
......
......@@ -32,9 +32,7 @@ HEADERS += \
screenshotcropper.h \
qtconfigwidget.h \
desktopqtversionfactory.h \
simulatorqtversionfactory.h \
desktopqtversion.h \
simulatorqtversion.h \
winceqtversionfactory.h \
winceqtversion.h
......@@ -62,9 +60,7 @@ SOURCES += \
screenshotcropper.cpp \
qtconfigwidget.cpp \
desktopqtversionfactory.cpp \
simulatorqtversionfactory.cpp \
desktopqtversion.cpp \
simulatorqtversion.cpp \
winceqtversionfactory.cpp \
winceqtversion.cpp
......
......@@ -114,8 +114,6 @@ QtcPlugin {
files: [
"desktopqtversion.cpp", "desktopqtversion.h",
"desktopqtversionfactory.cpp", "desktopqtversionfactory.h",
"simulatorqtversion.cpp", "simulatorqtversion.h",
"simulatorqtversionfactory.cpp", "simulatorqtversionfactory.h",
"winceqtversion.cpp", "winceqtversion.h",
"winceqtversionfactory.cpp", "winceqtversionfactory.h",
]
......
......@@ -43,7 +43,6 @@ const char CODEGEN_SETTINGS_PAGE_NAME[] = QT_TRANSLATE_NOOP("QtSupport", "Qt Cla
// QtVersions
const char DESKTOPQT[] = "Qt4ProjectManager.QtVersion.Desktop";
const char SIMULATORQT[] = "Qt4ProjectManager.QtVersion.Simulator";
const char WINCEQT[] = "Qt4ProjectManager.QtVersion.WinCE";
// BaseQtVersion settings
......
......@@ -38,7 +38,6 @@
#include "qtkitinformation.h"
#include "qtoptionspage.h"
#include "qtversionmanager.h"
#include "simulatorqtversionfactory.h"
#include "uicodemodelsupport.h"
#include "winceqtversionfactory.h"
......@@ -77,7 +76,6 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
addAutoReleasedObject(new QtVersionManager);
addAutoReleasedObject(new DesktopQtVersionFactory);
addAutoReleasedObject(new SimulatorQtVersionFactory);
addAutoReleasedObject(new WinCeQtVersionFactory);
addAutoReleasedObject(new UiCodeModelManager);
......
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "simulatorqtversion.h"
#include "qtsupportconstants.h"
#include <coreplugin/featureprovider.h>
#include <QCoreApplication>
using namespace QtSupport;
using namespace QtSupport::Internal;
SimulatorQtVersion::SimulatorQtVersion()
: BaseQtVersion()
{
}
SimulatorQtVersion::SimulatorQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
: BaseQtVersion(path, isAutodetected, autodetectionSource)
{
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
}
SimulatorQtVersion *SimulatorQtVersion::clone() const
{
return new SimulatorQtVersion(*this);
}
QString SimulatorQtVersion::type() const
{
return QLatin1String(Constants::SIMULATORQT);
}
QStringList SimulatorQtVersion::warningReason() const
{
QStringList ret = BaseQtVersion::warningReason();
if (qtVersion() >= QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
if (qtVersion() >= QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
return ret;
}
QList<ProjectExplorer::Abi> SimulatorQtVersion::detectQtAbis() const
{
ensureMkSpecParsed();
return qtAbisFromLibrary(qtCorePaths(versionInfo(), qtVersionString()));
}
QString SimulatorQtVersion::description() const
{
return QCoreApplication::translate("QtVersion", "Qt Simulator", "Qt Version is meant for Qt Simulator");
}
Core::FeatureSet SimulatorQtVersion::availableFeatures() const
{
Core::FeatureSet features = BaseQtVersion::availableFeatures();
features |= Core::FeatureSet(Constants::FEATURE_MOBILE);
return features;
}
bool SimulatorQtVersion::supportsPlatform(const QString &platformName) const
{
return platformName.isEmpty();
}
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef SIMULATORQTVERSION_H
#define SIMULATORQTVERSION_H
#include "baseqtversion.h"
namespace QtSupport {
namespace Internal {
class SimulatorQtVersion : public BaseQtVersion
{
public:
SimulatorQtVersion();
SimulatorQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
SimulatorQtVersion *clone() const;
QString type() const;
QStringList warningReason() const;
QList<ProjectExplorer::Abi> detectQtAbis() const;
QString description() const;
Core::FeatureSet availableFeatures() const;
bool supportsPlatform(const QString &platformName) const;
};
} // Internal
} // QtSupport
#endif // SIMULATORQTVERSION_H
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "simulatorqtversionfactory.h"
#include "simulatorqtversion.h"
#include "qtsupportconstants.h"
#include "profilereader.h"
#include <QFileInfo>
using namespace QtSupport;
using namespace QtSupport::Internal;
SimulatorQtVersionFactory::SimulatorQtVersionFactory(QObject *parent)
: QtVersionFactory(parent)
{
}
SimulatorQtVersionFactory::~SimulatorQtVersionFactory()
{
}
bool SimulatorQtVersionFactory::canRestore(const QString &type)
{
return type == QLatin1String(Constants::SIMULATORQT);
}
BaseQtVersion *SimulatorQtVersionFactory::restore(const QString &type, const QVariantMap &data)
{
if (!canRestore(type))
return 0;
BaseQtVersion *v = new SimulatorQtVersion;
v->fromMap(data);
return v;
}
int SimulatorQtVersionFactory::priority() const
{
return 50;
}
BaseQtVersion *SimulatorQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
{
QFileInfo fi = qmakePath.toFileInfo();
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
return 0;
QStringList configValues = evaluator->values(QLatin1String("CONFIG"));
if (!configValues.contains(QLatin1String("simulator")))
return 0;
return new SimulatorQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
}
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef SIMULATORQTVERSIONFACTORY_H
#define SIMULATORQTVERSIONFACTORY_H
#include "qtversionfactory.h"
namespace QtSupport {
namespace Internal {
class SimulatorQtVersionFactory : public QtVersionFactory
{
public:
explicit SimulatorQtVersionFactory(QObject *parent = 0);
~SimulatorQtVersionFactory();
virtual bool canRestore(const QString &type);
virtual BaseQtVersion *restore(const QString &type, const QVariantMap &data);
virtual int priority() const;
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
};
} // Internal
} // QtSupport
#endif // SIMULATORQTVERSIONFACTORY_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment