forked from qt-creator/qt-creator
Qmake: Use Utils::FileName in QMakeStep
Change-Id: I311947e476818ae7b14f299e0c917280f077165d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -182,7 +182,7 @@ bool QMakeStep::init()
|
|||||||
else
|
else
|
||||||
workingDirectory = qmakeBc->buildDirectory().toString();
|
workingDirectory = qmakeBc->buildDirectory().toString();
|
||||||
|
|
||||||
m_qmakeExecutable = qtVersion->qmakeCommand().toString();
|
m_qmakeExecutable = qtVersion->qmakeCommand();
|
||||||
m_qmakeArguments = allArguments(qtVersion);
|
m_qmakeArguments = allArguments(qtVersion);
|
||||||
m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0));
|
m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0));
|
||||||
|
|
||||||
@@ -311,10 +311,10 @@ void QMakeStep::finish(bool success)
|
|||||||
runNextCommand();
|
runNextCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStep::startOneCommand(const QString &command, const QString &args)
|
void QMakeStep::startOneCommand(const FileName &command, const QString &args)
|
||||||
{
|
{
|
||||||
ProcessParameters *pp = processParameters();
|
ProcessParameters *pp = processParameters();
|
||||||
pp->setCommand(Utils::FileName::fromString(command));
|
pp->setCommand(command);
|
||||||
pp->setArguments(args);
|
pp->setArguments(args);
|
||||||
pp->resolveAll();
|
pp->resolveAll();
|
||||||
|
|
||||||
@@ -436,10 +436,10 @@ void QMakeStep::setSeparateDebugInfo(bool enable)
|
|||||||
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QMakeStep::makeCommand() const
|
FileName QMakeStep::makeCommand() const
|
||||||
{
|
{
|
||||||
auto *ms = qobject_cast<BuildStepList *>(parent())->firstOfType<MakeStep>();
|
auto ms = qobject_cast<BuildStepList *>(parent())->firstOfType<MakeStep>();
|
||||||
return ms ? ms->effectiveMakeCommand().toString() : QString();
|
return ms ? ms->effectiveMakeCommand() : FileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QMakeStep::makeArguments(const QString &makefile) const
|
QString QMakeStep::makeArguments(const QString &makefile) const
|
||||||
@@ -459,7 +459,7 @@ QString QMakeStep::effectiveQMakeCall() const
|
|||||||
QString qmake = qtVersion ? qtVersion->qmakeCommand().toUserOutput() : QString();
|
QString qmake = qtVersion ? qtVersion->qmakeCommand().toUserOutput() : QString();
|
||||||
if (qmake.isEmpty())
|
if (qmake.isEmpty())
|
||||||
qmake = tr("<no Qt version>");
|
qmake = tr("<no Qt version>");
|
||||||
QString make = makeCommand();
|
QString make = makeCommand().toString();
|
||||||
if (make.isEmpty())
|
if (make.isEmpty())
|
||||||
make = tr("<no Make step found>");
|
make = tr("<no Make step found>");
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qmakeprojectmanager_global.h"
|
#include "qmakeprojectmanager_global.h"
|
||||||
|
|
||||||
#include <projectexplorer/abstractprocessstep.h>
|
#include <projectexplorer/abstractprocessstep.h>
|
||||||
|
|
||||||
#include <QStringList>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace Utils { class FileName; }
|
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Abi;
|
class Abi;
|
||||||
class BuildStep;
|
class BuildStep;
|
||||||
@@ -145,7 +144,7 @@ public:
|
|||||||
bool separateDebugInfo() const;
|
bool separateDebugInfo() const;
|
||||||
void setSeparateDebugInfo(bool enable);
|
void setSeparateDebugInfo(bool enable);
|
||||||
|
|
||||||
QString makeCommand() const;
|
Utils::FileName makeCommand() const;
|
||||||
QString makeArguments(const QString &makefile) const;
|
QString makeArguments(const QString &makefile) const;
|
||||||
QString effectiveQMakeCall() const;
|
QString effectiveQMakeCall() const;
|
||||||
|
|
||||||
@@ -167,12 +166,12 @@ private:
|
|||||||
void doCancel() override;
|
void doCancel() override;
|
||||||
void finish(bool success) override;
|
void finish(bool success) override;
|
||||||
|
|
||||||
void startOneCommand(const QString &command, const QString &args);
|
void startOneCommand(const Utils::FileName &command, const QString &args);
|
||||||
void runNextCommand();
|
void runNextCommand();
|
||||||
|
|
||||||
QString m_qmakeExecutable;
|
Utils::FileName m_qmakeExecutable;
|
||||||
QString m_qmakeArguments;
|
QString m_qmakeArguments;
|
||||||
QString m_makeExecutable;
|
Utils::FileName m_makeExecutable;
|
||||||
QString m_makeArguments;
|
QString m_makeArguments;
|
||||||
QString m_userArgs;
|
QString m_userArgs;
|
||||||
// Extra arguments for qmake.
|
// Extra arguments for qmake.
|
||||||
|
|||||||
Reference in New Issue
Block a user