summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2015-08-15 23:13:00 +0200
committerVolker Krause <[email protected]>2015-08-16 10:05:56 +0200
commit0511f3affc1e95b2ac5fc1978e4690d09ddf3db4 (patch)
treebbf8300f1383f2ea16cc9ba2ee4445ab72605460
parent2b1e2b3456801409ed0c48f2f8309909612ab4dd (diff)
Port away from KIO::NetAccess.
-rw-r--r--accountwizard/global.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/accountwizard/global.cpp b/accountwizard/global.cpp
index 01700a9..6b4db7f 100644
--- a/accountwizard/global.cpp
+++ b/accountwizard/global.cpp
@@ -23,7 +23,6 @@
#include <qfileinfo.h>
#include <QDir>
#include <kio/copyjob.h>
-#include <kio/netaccess.h>
#include <QDir>
#include <QStandardPaths>
@@ -104,7 +103,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
localPackageFile = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1String("/accountwizard/") + remoteFileName ;
KIO::Job *job = KIO::copy(remotePackageUrl, QUrl::fromLocalFile(localPackageFile), KIO::Overwrite | KIO::HideProgressInfo);
qCDebug(ACCOUNTWIZARD_LOG) << "downloading remote URL" << remotePackageUrl << "to" << localPackageFile;
- if (!KIO::NetAccess::synchronousRun(job, 0)) {
+ if (!job->exec()) {
return QString();
}
}
@@ -115,7 +114,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
const QString dest = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/") ;
QDir().mkpath(dest + file.fileName());
KIO::Job *getJob = KIO::copy(file, QUrl::fromLocalFile(dest), KIO::Overwrite | KIO::HideProgressInfo);
- if (KIO::NetAccess::synchronousRun(getJob, 0)) {
+ if (getJob->exec()) {
qCDebug(ACCOUNTWIZARD_LOG) << "worked, unpacked in " << dest;
return dest + file.fileName() + QLatin1Char('/') + assistant + QLatin1Char('/') + assistant + QLatin1String(".desktop");
} else {