diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-03-05 11:48:57 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-03-25 14:12:41 +0100 |
commit | d2815ad5a6d836bd67f1002b1a6fe2733e9b1b79 (patch) | |
tree | b51561fa5057e742e81f393bf6badb10e9d0627b /src/libs/installer/repository.cpp | |
parent | dc70e9b9bbe086dee04640c4196eabf9c91b05be (diff) |
Unify access to the supported schemes.
Fixes an issue that https downloaded files where not properly
named and put in the right temporary download directory.
Change-Id: I8a973e8b63cfae2f575d84591a8ebbef53d45a3a
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer/repository.cpp')
-rw-r--r-- | src/libs/installer/repository.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libs/installer/repository.cpp b/src/libs/installer/repository.cpp index 786cb2a49..261bdaac9 100644 --- a/src/libs/installer/repository.cpp +++ b/src/libs/installer/repository.cpp @@ -40,6 +40,7 @@ **************************************************************************/ #include "repository.h" +#include "kdupdaterfiledownloaderfactory.h" #include <QFileInfo> #include <QStringList> @@ -89,11 +90,8 @@ Repository::Repository(const QUrl &url, bool isDefault) */ Repository Repository::fromUserInput(const QString &repositoryUrl) { - QStringList supportedSchemes; - supportedSchemes << QLatin1String("http") << QLatin1String("https") << QLatin1String("ftp") << - QLatin1String("file"); - QUrl url = QUrl::fromUserInput(repositoryUrl); + const QStringList supportedSchemes = KDUpdater::FileDownloaderFactory::supportedSchemes(); if (!supportedSchemes.contains(url.scheme()) && QFileInfo(url.toString()).exists()) url = QLatin1String("file:///") + url.toString(); |