aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qbs/modules/java/JavaModule.qbs1
-rw-r--r--share/qbs/modules/typescript/TypeScriptModule.qbs2
-rw-r--r--src/lib/corelib/buildgraph/command.cpp10
-rw-r--r--src/lib/corelib/buildgraph/command.h3
-rw-r--r--src/lib/corelib/buildgraph/jscommandexecutor.cpp2
-rw-r--r--src/lib/corelib/buildgraph/processcommandexecutor.cpp2
-rw-r--r--src/lib/corelib/tools/persistence.cpp2
7 files changed, 19 insertions, 3 deletions
diff --git a/share/qbs/modules/java/JavaModule.qbs b/share/qbs/modules/java/JavaModule.qbs
index e39999c3c..1d7bb0ba8 100644
--- a/share/qbs/modules/java/JavaModule.qbs
+++ b/share/qbs/modules/java/JavaModule.qbs
@@ -180,6 +180,7 @@ Module {
JavaUtils.javacArguments(product, inputs,
JavaUtils.helperOverrideArgs(product,
"javac")));
+ cmd.ignoreDryRun = true;
cmd.silent = true;
return [cmd];
}
diff --git a/share/qbs/modules/typescript/TypeScriptModule.qbs b/share/qbs/modules/typescript/TypeScriptModule.qbs
index fbcd4fcf0..618ef7de7 100644
--- a/share/qbs/modules/typescript/TypeScriptModule.qbs
+++ b/share/qbs/modules/typescript/TypeScriptModule.qbs
@@ -227,6 +227,7 @@ Module {
};
var jcmd = new JavaScriptCommand();
+ jcmd.ignoreDryRun = true;
jcmd.silent = true;
jcmd.inputPaths = inputPaths.sort(sortFunc);
jcmd.outputPaths = outputPaths.sort(sortFunc);
@@ -240,6 +241,7 @@ Module {
var args = ["--module", "commonjs",
"--outDir", outDir].concat(outputPaths.filter(function (f) { return !f.endsWith(".json"); }));
var cmd = new Command(ModUtils.moduleProperty(product, "compilerPath"), args);
+ cmd.ignoreDryRun = true;
cmd.silent = true;
return [jcmd, cmd];
}
diff --git a/src/lib/corelib/buildgraph/command.cpp b/src/lib/corelib/buildgraph/command.cpp
index 248af8c44..a9f6cabd2 100644
--- a/src/lib/corelib/buildgraph/command.cpp
+++ b/src/lib/corelib/buildgraph/command.cpp
@@ -46,6 +46,7 @@ AbstractCommand::AbstractCommand()
: m_description(defaultDescription()),
m_extendedDescription(defaultExtendedDescription()),
m_highlight(defaultHighLight()),
+ m_ignoreDryRun(defaultIgnoreDryRun()),
m_silent(defaultIsSilent())
{
}
@@ -60,6 +61,7 @@ bool AbstractCommand::equals(const AbstractCommand *other) const
&& m_description == other->m_description
&& m_extendedDescription == other->m_extendedDescription
&& m_highlight == other->m_highlight
+ && m_ignoreDryRun == other->m_ignoreDryRun
&& m_silent == other->m_silent
&& m_properties == other->m_properties;
}
@@ -69,6 +71,7 @@ void AbstractCommand::fillFromScriptValue(const QScriptValue *scriptValue, const
m_description = scriptValue->property(QLatin1String("description")).toString();
m_extendedDescription = scriptValue->property(QLatin1String("extendedDescription")).toString();
m_highlight = scriptValue->property(QLatin1String("highlight")).toString();
+ m_ignoreDryRun = scriptValue->property(QLatin1String("ignoreDryRun")).toBool();
m_silent = scriptValue->property(QLatin1String("silent")).toBool();
m_codeLocation = codeLocation;
@@ -76,6 +79,7 @@ void AbstractCommand::fillFromScriptValue(const QScriptValue *scriptValue, const
<< QLatin1String("description")
<< QLatin1String("extendedDescription")
<< QLatin1String("highlight")
+ << QLatin1String("ignoreDryRun")
<< QLatin1String("silent");
}
@@ -84,6 +88,7 @@ void AbstractCommand::load(PersistentPool &pool)
m_description = pool.idLoadString();
m_extendedDescription = pool.idLoadString();
m_highlight = pool.idLoadString();
+ pool.stream() >> m_ignoreDryRun;
pool.stream() >> m_silent;
m_codeLocation.load(pool);
m_properties = pool.loadVariantMap();
@@ -94,6 +99,7 @@ void AbstractCommand::store(PersistentPool &pool) const
pool.storeString(m_description);
pool.storeString(m_extendedDescription);
pool.storeString(m_highlight);
+ pool.stream() << m_ignoreDryRun;
pool.stream() << m_silent;
m_codeLocation.store(pool);
pool.store(m_properties);
@@ -120,6 +126,8 @@ static QScriptValue js_CommandBase(QScriptContext *context, QScriptEngine *engin
engine->toScriptValue(AbstractCommand::defaultExtendedDescription()));
cmd.setProperty(QLatin1String("highlight"),
engine->toScriptValue(AbstractCommand::defaultHighLight()));
+ cmd.setProperty(QLatin1String("ignoreDryRun"),
+ engine->toScriptValue(AbstractCommand::defaultIgnoreDryRun()));
cmd.setProperty(QLatin1String("silent"),
engine->toScriptValue(AbstractCommand::defaultIsSilent()));
return cmd;
@@ -163,6 +171,8 @@ static QScriptValue js_Command(QScriptContext *context, QScriptEngine *engine)
engine->toScriptValue(commandPrototype->stderrFilePath()));
cmd.setProperty(QLatin1String("environment"),
engine->toScriptValue(commandPrototype->environment().toStringList()));
+ cmd.setProperty(QLatin1String("ignoreDryRun"),
+ engine->toScriptValue(commandPrototype->ignoreDryRun()));
return cmd;
}
diff --git a/src/lib/corelib/buildgraph/command.h b/src/lib/corelib/buildgraph/command.h
index 83c411d79..f49f3be36 100644
--- a/src/lib/corelib/buildgraph/command.h
+++ b/src/lib/corelib/buildgraph/command.h
@@ -58,6 +58,7 @@ public:
static QString defaultDescription() { return QString(); }
static QString defaultExtendedDescription() { return QString(); }
static QString defaultHighLight() { return QString(); }
+ static bool defaultIgnoreDryRun() { return false; }
static bool defaultIsSilent() { return false; }
virtual CommandType type() const = 0;
@@ -67,6 +68,7 @@ public:
const QString description() const { return m_description; }
const QString extendedDescription() const { return m_extendedDescription; }
const QString highlight() const { return m_highlight; }
+ bool ignoreDryRun() const { return m_ignoreDryRun; }
bool isSilent() const { return m_silent; }
CodeLocation codeLocation() const { return m_codeLocation; }
@@ -86,6 +88,7 @@ private:
QString m_description;
QString m_extendedDescription;
QString m_highlight;
+ bool m_ignoreDryRun;
bool m_silent;
CodeLocation m_codeLocation;
QVariantMap m_properties;
diff --git a/src/lib/corelib/buildgraph/jscommandexecutor.cpp b/src/lib/corelib/buildgraph/jscommandexecutor.cpp
index 17cca78f0..077b15969 100644
--- a/src/lib/corelib/buildgraph/jscommandexecutor.cpp
+++ b/src/lib/corelib/buildgraph/jscommandexecutor.cpp
@@ -192,7 +192,7 @@ void JsCommandExecutor::doStart()
QBS_ASSERT(!m_running, return);
m_thread->start();
- if (dryRun()) {
+ if (dryRun() && !command()->ignoreDryRun()) {
QTimer::singleShot(0, this, SIGNAL(finished())); // Don't call back on the caller.
return;
}
diff --git a/src/lib/corelib/buildgraph/processcommandexecutor.cpp b/src/lib/corelib/buildgraph/processcommandexecutor.cpp
index e7687bdd8..6f36838d6 100644
--- a/src/lib/corelib/buildgraph/processcommandexecutor.cpp
+++ b/src/lib/corelib/buildgraph/processcommandexecutor.cpp
@@ -93,7 +93,7 @@ void ProcessCommandExecutor::doStart()
QStringList arguments = m_arguments;
- if (dryRun()) {
+ if (dryRun() && !cmd->ignoreDryRun()) {
QTimer::singleShot(0, this, SIGNAL(finished())); // Don't call back on the caller.
return;
}
diff --git a/src/lib/corelib/tools/persistence.cpp b/src/lib/corelib/tools/persistence.cpp
index ae36c4a4c..a75f80e12 100644
--- a/src/lib/corelib/tools/persistence.cpp
+++ b/src/lib/corelib/tools/persistence.cpp
@@ -41,7 +41,7 @@
namespace qbs {
namespace Internal {
-static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-86";
+static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-87";
PersistentPool::PersistentPool(const Logger &logger) : m_logger(logger)
{