summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2014-11-28 16:44:37 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2014-11-28 16:58:25 +0100
commit19549b3b0f224db1bcf164139533473486d61b1c (patch)
treeabb98970a6ff3bcf91abb3f7937ade473ee7d237 /src/libs/installer/component.cpp
parent5b5ee638f65412bcff020c4e0869bc48edce0daa (diff)
Fix ambiguity for scScript symbols
Commit 41e58eb4a481 introduced a new definition of QLatin1String scScript as "script", which clashes with the definition of scScript as "Script" in component.cpp. Resolve this ambiguity (which is not detected by the compiler) by renaming one instance to scScriptTag. Task-number: QTIFW-590 Change-Id: If1e108270509f7a1a0066d19e09a9f3699f0d19c Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r--src/libs/installer/component.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 75f76c861..476d869fe 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -59,7 +59,7 @@
using namespace QInstaller;
-static const QLatin1String scScript("Script");
+static const QLatin1String scScriptTag("Script");
static const QLatin1String scDefault("Default");
static const QLatin1String scAutoDependOn("AutoDependOn");
static const QLatin1String scVirtual("Virtual");
@@ -309,7 +309,7 @@ void Component::loadDataFromPackage(const Package &package)
setValue(scNewComponent, package.data(scNewComponent).toString());
setValue(scRequiresAdminRights, package.data(scRequiresAdminRights).toString());
- setValue(scScript, package.data(scScript).toString());
+ setValue(scScriptTag, package.data(scScriptTag).toString());
setValue(scReplaces, package.data(scReplaces).toString());
setValue(scReleaseDate, package.data(scReleaseDate).toString());
@@ -494,7 +494,7 @@ QString Component::displayName() const
void Component::loadComponentScript()
{
- const QString script = d->m_vars.value(scScript);
+ const QString script = d->m_vars.value(scScriptTag);
if (!localTempPath().isEmpty() && !script.isEmpty())
loadComponentScript(QString::fromLatin1("%1/%2/%3").arg(localTempPath(), name(), script));
}
@@ -1174,7 +1174,7 @@ QStringList Component::autoDependencies() const
{
QStringList autoDependencyStringList =
d->m_vars.value(scAutoDependOn).split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
- autoDependencyStringList.removeAll(scScript);
+ autoDependencyStringList.removeAll(scScriptTag);
return autoDependencyStringList;
}
@@ -1203,7 +1203,7 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
return false;
// The script can override this method and determines if the component needs to be installed.
- if (autoDependOnList.first().compare(scScript, Qt::CaseInsensitive) == 0) {
+ if (autoDependOnList.first().compare(scScriptTag, Qt::CaseInsensitive) == 0) {
QJSValue valueFromScript;
try {
valueFromScript = d->scriptEngine()->callScriptMethod(d->m_scriptContext,
@@ -1254,7 +1254,7 @@ bool Component::isDefault() const
return false;
// the script can override this method
- if (d->m_vars.value(scDefault).compare(scScript, Qt::CaseInsensitive) == 0) {
+ if (d->m_vars.value(scDefault).compare(scScriptTag, Qt::CaseInsensitive) == 0) {
QJSValue valueFromScript;
try {
valueFromScript = d->scriptEngine()->callScriptMethod(d->m_scriptContext,