forked from qt-creator/qt-creator
QmlDesigner: Remove dead code from puppetcreator
Change-Id: I5e648f1083882be7bad87a7fdbccfd2b3c96a9a9 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -116,10 +116,10 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
m_localServer->listen(socketToken);
|
||||
m_localServer->setMaxPendingConnections(3);
|
||||
|
||||
PuppetCreator puppetCreator(kit, project, QString(), nodeInstanceView->model());
|
||||
PuppetCreator puppetCreator(kit, project, nodeInstanceView->model());
|
||||
puppetCreator.setQrcMappingString(qrcMappingString());
|
||||
|
||||
puppetCreator.createPuppetExecutableIfMissing();
|
||||
puppetCreator.createQml2PuppetExecutableIfMissing();
|
||||
|
||||
m_qmlPuppetEditorProcess = puppetCreator.createPuppetProcess("editormode",
|
||||
socketToken,
|
||||
|
||||
@@ -167,11 +167,9 @@ QString PuppetCreator::getStyleConfigFileName() const
|
||||
|
||||
PuppetCreator::PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const QString &qtCreatorVersion,
|
||||
const Model *model)
|
||||
|
||||
: m_qtCreatorVersion(qtCreatorVersion)
|
||||
,m_kit(kit)
|
||||
: m_kit(kit)
|
||||
,m_availablePuppetType(FallbackPuppet)
|
||||
,m_model(model)
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
@@ -185,11 +183,6 @@ PuppetCreator::~PuppetCreator()
|
||||
{
|
||||
}
|
||||
|
||||
void PuppetCreator::createPuppetExecutableIfMissing()
|
||||
{
|
||||
createQml2PuppetExecutableIfMissing();
|
||||
}
|
||||
|
||||
QProcess *PuppetCreator::createPuppetProcess(const QString &puppetMode,
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
@@ -345,7 +338,7 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
|
||||
// check if there was an already failing try to get the UserSpacePuppet
|
||||
// -> imagine as result a FallbackPuppet and nothing will happen again
|
||||
if (m_qml2PuppetForKitPuppetHash.value(m_kit->id(), UserSpacePuppet) == UserSpacePuppet ) {
|
||||
if (checkQml2PuppetIsReady()) {
|
||||
if (checkPuppetIsReady(qml2PuppetPath(UserSpacePuppet))) {
|
||||
m_availablePuppetType = UserSpacePuppet;
|
||||
} else {
|
||||
if (m_kit->isValid()) {
|
||||
@@ -521,11 +514,6 @@ QString PuppetCreator::qmakeCommand() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString PuppetCreator::compileLog() const
|
||||
{
|
||||
return m_compileLog;
|
||||
}
|
||||
|
||||
void PuppetCreator::setQrcMappingString(const QString qrcMapping)
|
||||
{
|
||||
m_qrcMapping = qrcMapping;
|
||||
@@ -569,6 +557,7 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath,
|
||||
|
||||
qCInfo(puppetBuild) << Q_FUNC_INFO;
|
||||
qCInfo(puppetBuild) << m_compileLog;
|
||||
m_compileLog.clear();
|
||||
|
||||
if (process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0)
|
||||
return true;
|
||||
@@ -586,11 +575,6 @@ QString PuppetCreator::qml2PuppetProjectFile()
|
||||
return puppetSourceDirectoryPath() + QStringLiteral("/qml2puppet/qml2puppet.pro");
|
||||
}
|
||||
|
||||
QString PuppetCreator::qmlPuppetProjectFile()
|
||||
{
|
||||
return puppetSourceDirectoryPath() + QStringLiteral("/qmlpuppet/qmlpuppet.pro");
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkPuppetIsReady(const QString &puppetPath) const
|
||||
{
|
||||
QFileInfo puppetFileInfo(puppetPath);
|
||||
@@ -603,11 +587,6 @@ bool PuppetCreator::checkPuppetIsReady(const QString &puppetPath) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkQml2PuppetIsReady() const
|
||||
{
|
||||
return checkPuppetIsReady(qml2PuppetPath(UserSpacePuppet));
|
||||
}
|
||||
|
||||
static bool nonEarlyQt5Version(const QtSupport::QtVersionNumber ¤tQtVersionNumber)
|
||||
{
|
||||
return currentQtVersionNumber >= QtSupport::QtVersionNumber(5, 2, 0) || currentQtVersionNumber < QtSupport::QtVersionNumber(5, 0, 0);
|
||||
@@ -623,20 +602,4 @@ bool PuppetCreator::qtIsSupported() const
|
||||
&& currentQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkPuppetVersion(const QString &qmlPuppetPath)
|
||||
{
|
||||
|
||||
QProcess qmlPuppetVersionProcess;
|
||||
qmlPuppetVersionProcess.start(qmlPuppetPath, {"--version"});
|
||||
qmlPuppetVersionProcess.waitForReadyRead(6000);
|
||||
|
||||
QByteArray versionString = qmlPuppetVersionProcess.readAll();
|
||||
|
||||
bool canConvert;
|
||||
unsigned int versionNumber = versionString.toUInt(&canConvert);
|
||||
|
||||
return canConvert && versionNumber == 2;
|
||||
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -52,12 +52,11 @@ public:
|
||||
|
||||
PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const QString &qtCreatorVersion,
|
||||
const Model *model);
|
||||
|
||||
~PuppetCreator();
|
||||
|
||||
void createPuppetExecutableIfMissing();
|
||||
void createQml2PuppetExecutableIfMissing();
|
||||
|
||||
QProcess *createPuppetProcess(const QString &puppetMode,
|
||||
const QString &socketToken,
|
||||
@@ -65,8 +64,6 @@ public:
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const;
|
||||
|
||||
QString compileLog() const;
|
||||
|
||||
void setQrcMappingString(const QString qrcMapping);
|
||||
|
||||
static QString defaultPuppetToplevelBuildDirectory();
|
||||
@@ -74,7 +71,6 @@ public:
|
||||
protected:
|
||||
bool build(const QString &qmlPuppetProjectFilePath) const;
|
||||
|
||||
void createQml2PuppetExecutableIfMissing();
|
||||
|
||||
QString qmlPuppetToplevelBuildDirectory() const;
|
||||
QString qmlPuppetFallbackDirectory() const;
|
||||
@@ -87,12 +83,9 @@ protected:
|
||||
PuppetBuildProgressDialog *progressDialog = nullptr) const;
|
||||
static QString puppetSourceDirectoryPath();
|
||||
static QString qml2PuppetProjectFile();
|
||||
static QString qmlPuppetProjectFile();
|
||||
|
||||
bool checkPuppetIsReady(const QString &puppetPath) const;
|
||||
bool checkQml2PuppetIsReady() const;
|
||||
bool qtIsSupported() const;
|
||||
static bool checkPuppetVersion(const QString &qmlPuppetPath);
|
||||
QProcess *puppetProcess(const QString &puppetPath,
|
||||
const QString &workingDirectory,
|
||||
const QString &puppetMode,
|
||||
@@ -114,7 +107,6 @@ protected:
|
||||
QString getStyleConfigFileName() const;
|
||||
|
||||
private:
|
||||
QString m_qtCreatorVersion;
|
||||
mutable QString m_compileLog;
|
||||
ProjectExplorer::Kit *m_kit = nullptr;
|
||||
PuppetType m_availablePuppetType;
|
||||
|
||||
Reference in New Issue
Block a user