summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.cpp
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2012-04-25 14:14:56 +0200
committerTim Jenssen <tim.jenssen@nokia.com>2012-04-27 16:23:20 +0200
commit0a8755ace26f1174e9ed99e5060c4d8da0ba010d (patch)
tree7d73b3e0151b06707d8b9df5cef25be7203a420f /src/libs/installer/packagemanagercore.cpp
parentff6179ea53debd66e63738382b3af62087b81af7 (diff)
now installer can disallow to install from a remote location
- at the moment the implementation is windows only - in some cases it is problematically to install big installers from a remote location: if the connection is lost -> crash - the installer itself can have the flag DependsOnLocalInstallerBinary in the config.xml file - or a component can request that installer.setDependsOnLocalInstallerBinary() Change-Id: I0c8d70ca89dd55d2d0c52bf3418f11c95b5290a1 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r--src/libs/installer/packagemanagercore.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 985fccbc7..e43033c3f 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -1106,6 +1106,19 @@ bool PackageManagerCore::isProcessRunning(const QString &name) const
return PackageManagerCorePrivate::isProcessRunning(name, runningProcesses());
}
+void PackageManagerCore::setDependsOnLocalInstallerBinary()
+{
+ d->m_dependsOnLocalInstallerBinary = true;
+}
+
+bool PackageManagerCore::localInstallerBinaryUsed()
+{
+#ifdef Q_OS_WIN
+ return KDUpdater::pathIsOnLocalDevice(qApp->applicationFilePath());
+#endif
+ return true;
+}
+
/*!
Executes a program.
@@ -1116,7 +1129,6 @@ bool PackageManagerCore::isProcessRunning(const QString &name) const
command as first item, the return code as second item.
\note On Unix, the output is just the output to stdout, not to stderr.
*/
-
QList<QVariant> PackageManagerCore::execute(const QString &program, const QStringList &arguments,
const QString &stdIn) const
{