Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2014-10-17 14:06:46 +0400
committerDaniel Molkentin <danimo@owncloud.com>2014-10-17 14:07:18 +0400
commit4525161e7c051aa63bcdc5166f7458a2fc564a24 (patch)
tree77d9d12c2e9479b263b2bd095012fd36327eb073 /src/updater
parentdee6d18d69497216432c55d31bfe765029dd7645 (diff)
Updater: allow overriding update URL through environment
Diffstat (limited to 'src/updater')
-rw-r--r--src/updater/updater.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/updater/updater.cpp b/src/updater/updater.cpp
index f0dd46512..c10efd754 100644
--- a/src/updater/updater.cpp
+++ b/src/updater/updater.cpp
@@ -80,7 +80,11 @@ QString Updater::getSystemInfo()
// To test, cmake with -DAPPLICATION_UPDATE_URL="http://127.0.0.1:8080/test.rss"
Updater *Updater::create()
{
- QUrl updateBaseUrl = addQueryParams(QUrl(QLatin1String(APPLICATION_UPDATE_URL)));
+ QUrl updateBaseUrl(QString::fromLocal8Bit(qgetenv("OCC_UPDATE_URL")));
+ if (updateBaseUrl.isEmpty()) {
+ updateBaseUrl = QUrl(QLatin1String(APPLICATION_UPDATE_URL));
+ }
+ updateBaseUrl = addQueryParams(updateBaseUrl);
#if defined(Q_OS_MAC) && defined(HAVE_SPARKLE)
updateBaseUrl.addQueryItem( QLatin1String("sparkle"), QLatin1String("true"));
return new SparkleUpdater(updateBaseUrl.toString());