forked from qt-creator/qt-creator
QmakeProjectManager: Make "system" execution opt-in
It has too many side effects.
Amends fcd6384f4d.
T_SYSTEM and E_SYSTEM are now treated the same.
Fixes: QTCREATORBUG-24551
Change-Id: Ib6df2762d329f2ddc0dd66190454159d446a9ac9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -75,6 +75,17 @@ using namespace QmakeProjectManager::Internal;
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
|
||||
class RunSystemAspect : public TriStateAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RunSystemAspect() : TriStateAspect(tr("Run"), tr("Ignore"), tr("Use global setting"))
|
||||
{
|
||||
setSettingsKey("RunSystemFunction");
|
||||
setDisplayName(tr("qmake system() behavior when parsing:"));
|
||||
}
|
||||
};
|
||||
|
||||
QmakeExtraBuildInfo::QmakeExtraBuildInfo()
|
||||
{
|
||||
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
|
||||
@@ -198,6 +209,8 @@ QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Utils::Id id)
|
||||
emit qmakeBuildConfigurationChanged();
|
||||
qmakeBuildSystem()->scheduleUpdateAllNowOrLater();
|
||||
});
|
||||
|
||||
addAspect<RunSystemAspect>();
|
||||
}
|
||||
|
||||
QmakeBuildConfiguration::~QmakeBuildConfiguration()
|
||||
@@ -439,6 +452,17 @@ void QmakeBuildConfiguration::forceQtQuickCompiler(bool enable)
|
||||
aspect<QtQuickCompilerAspect>()->setSetting(enable ? TriState::Enabled : TriState::Disabled);
|
||||
}
|
||||
|
||||
bool QmakeBuildConfiguration::runSystemFunction() const
|
||||
{
|
||||
switch (aspect<RunSystemAspect>()->value()) {
|
||||
case 0:
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
return QmakeSettings::runSystemFunction();
|
||||
}
|
||||
|
||||
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
||||
{
|
||||
QStringList result;
|
||||
@@ -875,3 +899,5 @@ void QmakeBuildConfiguration::restrictNextBuild(const RunConfiguration *rc)
|
||||
}
|
||||
|
||||
} // namespace QmakeProjectManager
|
||||
|
||||
#include <qmakebuildconfiguration.moc>
|
||||
|
||||
Reference in New Issue
Block a user