forked from qt-creator/qt-creator
add extra arguments for qmake
unlike user arguments, extra arguments are not user editable Change-Id: I0413c2da699c6d2fce1db10a8bc3dd938c8477b0 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -86,6 +86,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Core::Id id) :
|
|||||||
QMakeStep::QMakeStep(BuildStepList *bsl, QMakeStep *bs) :
|
QMakeStep::QMakeStep(BuildStepList *bsl, QMakeStep *bs) :
|
||||||
AbstractProcessStep(bsl, bs),
|
AbstractProcessStep(bsl, bs),
|
||||||
m_userArgs(bs->m_userArgs),
|
m_userArgs(bs->m_userArgs),
|
||||||
|
m_extraArgs(bs->m_extraArgs),
|
||||||
m_forced(bs->m_forced),
|
m_forced(bs->m_forced),
|
||||||
m_linkQmlDebuggingLibrary(bs->m_linkQmlDebuggingLibrary),
|
m_linkQmlDebuggingLibrary(bs->m_linkQmlDebuggingLibrary),
|
||||||
m_useQtQuickCompiler(bs->m_useQtQuickCompiler),
|
m_useQtQuickCompiler(bs->m_useQtQuickCompiler),
|
||||||
@@ -154,6 +155,8 @@ QString QMakeStep::allArguments(const BaseQtVersion *v, bool shorted) const
|
|||||||
QString args = QtcProcess::joinArgs(arguments);
|
QString args = QtcProcess::joinArgs(arguments);
|
||||||
// User arguments
|
// User arguments
|
||||||
QtcProcess::addArgs(&args, m_userArgs);
|
QtcProcess::addArgs(&args, m_userArgs);
|
||||||
|
foreach (QString arg, m_extraArgs)
|
||||||
|
QtcProcess::addArgs(&args, arg);
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,6 +408,21 @@ void QMakeStep::setUserArguments(const QString &arguments)
|
|||||||
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList QMakeStep::extraArguments() const
|
||||||
|
{
|
||||||
|
return m_extraArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QMakeStep::setExtraArguments(const QStringList &args)
|
||||||
|
{
|
||||||
|
if (m_extraArgs != args) {
|
||||||
|
m_extraArgs = args;
|
||||||
|
emit extraArgumentsChanged();
|
||||||
|
qmakeBuildConfiguration()->emitQMakeBuildConfigurationChanged();
|
||||||
|
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool QMakeStep::linkQmlDebuggingLibrary() const
|
bool QMakeStep::linkQmlDebuggingLibrary() const
|
||||||
{
|
{
|
||||||
return m_linkQmlDebuggingLibrary;
|
return m_linkQmlDebuggingLibrary;
|
||||||
@@ -517,6 +535,7 @@ QString QMakeStep::userArguments()
|
|||||||
FileName QMakeStep::mkspec() const
|
FileName QMakeStep::mkspec() const
|
||||||
{
|
{
|
||||||
QString additionalArguments = m_userArgs;
|
QString additionalArguments = m_userArgs;
|
||||||
|
QtcProcess::addArgs(&additionalArguments, m_extraArgs);
|
||||||
for (QtcProcess::ArgIterator ait(&additionalArguments); ait.next(); ) {
|
for (QtcProcess::ArgIterator ait(&additionalArguments); ait.next(); ) {
|
||||||
if (ait.value() == QLatin1String("-spec")) {
|
if (ait.value() == QLatin1String("-spec")) {
|
||||||
if (ait.next())
|
if (ait.next())
|
||||||
|
|||||||
@@ -135,8 +135,11 @@ public:
|
|||||||
QStringList parserArguments();
|
QStringList parserArguments();
|
||||||
// arguments set by the user
|
// arguments set by the user
|
||||||
QString userArguments();
|
QString userArguments();
|
||||||
Utils::FileName mkspec() const;
|
|
||||||
void setUserArguments(const QString &arguments);
|
void setUserArguments(const QString &arguments);
|
||||||
|
// QMake extra arguments. Not user editable.
|
||||||
|
QStringList extraArguments() const;
|
||||||
|
void setExtraArguments(const QStringList &args);
|
||||||
|
Utils::FileName mkspec() const;
|
||||||
bool linkQmlDebuggingLibrary() const;
|
bool linkQmlDebuggingLibrary() const;
|
||||||
void setLinkQmlDebuggingLibrary(bool enable);
|
void setLinkQmlDebuggingLibrary(bool enable);
|
||||||
bool useQtQuickCompiler() const;
|
bool useQtQuickCompiler() const;
|
||||||
@@ -152,6 +155,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void userArgumentsChanged();
|
void userArgumentsChanged();
|
||||||
|
void extraArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
void linkQmlDebuggingLibraryChanged();
|
||||||
void useQtQuickCompilerChanged();
|
void useQtQuickCompilerChanged();
|
||||||
void separateDebugInfoChanged();
|
void separateDebugInfoChanged();
|
||||||
@@ -174,6 +178,8 @@ private:
|
|||||||
QString m_makeExecutable;
|
QString m_makeExecutable;
|
||||||
QString m_makeArguments;
|
QString m_makeArguments;
|
||||||
QString m_userArgs;
|
QString m_userArgs;
|
||||||
|
// Extra arguments for qmake.
|
||||||
|
QStringList m_extraArgs;
|
||||||
|
|
||||||
QFutureInterface<bool> m_inputFuture;
|
QFutureInterface<bool> m_inputFuture;
|
||||||
QFutureWatcher<bool> m_inputWatcher;
|
QFutureWatcher<bool> m_inputWatcher;
|
||||||
|
|||||||
Reference in New Issue
Block a user