summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/qinstallercomponent.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-03-16 09:11:18 +0100
committerkh1 <qt-info@nokia.com>2011-03-16 09:11:18 +0100
commit2bf7d0ac73ef50c8d8da0a4df4506eefe6731fdf (patch)
treee176c856fb9529ee588ad1a9f6664bd046f29d1e /installerbuilder/libinstaller/qinstallercomponent.cpp
parent88beecfba1b8a8b306b1597d280dbcf02dd65bc5 (diff)
parentabbee7b0ec2e1fbc676b31949320b35a4c6620c7 (diff)
Merge commit 'abbee7b0ec2e1fbc676b31949320b35a4c6620c7' into refactor
Conflicts: installerbuilder/libinstaller/qinstallercomponent.h
Diffstat (limited to 'installerbuilder/libinstaller/qinstallercomponent.cpp')
-rw-r--r--installerbuilder/libinstaller/qinstallercomponent.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/qinstallercomponent.cpp b/installerbuilder/libinstaller/qinstallercomponent.cpp
index c497331bd..2eea34bbe 100644
--- a/installerbuilder/libinstaller/qinstallercomponent.cpp
+++ b/installerbuilder/libinstaller/qinstallercomponent.cpp
@@ -98,6 +98,7 @@ public:
QMap<QString, QWidget*> userInterfaces;
QUrl repositoryUrl;
+ QString localTempPath;
QStringList downloadableArchives;
QStringList stopProcessForUpdateRequests;
@@ -468,6 +469,15 @@ QString Component::displayName() const
return value(QLatin1String("DisplayName"));
}
+void Component::loadComponentScript()
+{
+ const QString script = value(QLatin1String("Script"));
+ if (!localTempPath().isEmpty() && !script.isEmpty()) {
+ loadComponentScript(QString::fromLatin1("%1/%2/%3").arg(
+ d->localTempPath, name(), script));
+ }
+}
+
/*!
Loads the script at \a fileName into this component's script engine. The installer and all its
components as well as other useful stuff are being exported into the script.
@@ -1210,3 +1220,14 @@ void Component::setRepositoryUrl(const QUrl& url)
{
d->repositoryUrl = url;
}
+
+
+QString Component::localTempPath() const
+{
+ return d->localTempPath;
+}
+
+void Component::setLocalTempPath(const QString &tempLocalPath)
+{
+ d->localTempPath = tempLocalPath;
+}