[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:17 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=b06038e

The following commit has been merged in the master branch:
commit b06038e60ed2ec358f43282fd2c24a322c977568
Author: Aleix Pol <aleixpol at kde.org>
Date:   Wed Mar 4 22:33:54 2015 +0100

    Prefer the usage of QUrl::toLocalFile to QUrl::path
    
    QUrl::toLocalFile is portable.
---
 core/filetransferjob.cpp      | 10 +++++-----
 plugins/share/shareplugin.cpp |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/filetransferjob.cpp b/core/filetransferjob.cpp
index 6686690..1e0dfcd 100644
--- a/core/filetransferjob.cpp
+++ b/core/filetransferjob.cpp
@@ -66,8 +66,8 @@ void FileTransferJob::doStart()
         QString(mDeviceName))
     );
     QUrl destCheck = mDestination;
-    if (QFile::exists(destCheck.path())) {
-        QFileInfo destInfo(destCheck.path());
+    if (QFile::exists(destCheck.toLocalFile())) {
+        QFileInfo destInfo(destCheck.toLocalFile());
         KIO::RenameDialog *dialog = new KIO::RenameDialog(Q_NULLPTR,
             i18n("Incoming file exists"),
             QUrl(mDeviceName + ":/" + destCheck.fileName()),
@@ -102,7 +102,7 @@ void FileTransferJob::renameDone(int result)
     case KIO::R_OVERWRITE:
     {
         // Delete the old file if exists
-        QFile oldFile(mDestination.path());
+        QFile oldFile(mDestination.toLocalFile());
         if (oldFile.exists()) {
             oldFile.remove();
         }
@@ -125,10 +125,10 @@ void FileTransferJob::startTransfer()
     description(this, i18n("Receiving file over KDE-Connect"),
                         QPair<QString, QString>(i18nc("File transfer origin", "From"),
                         QString(mDeviceName)),
-                        QPair<QString, QString>(i18nc("File transfer destination", "To"), mDestination.path()));
+                        QPair<QString, QString>(i18nc("File transfer destination", "To"), mDestination.toLocalFile()));
 
     mDestinationJob = KIO::open(mDestination, QIODevice::WriteOnly);
-    QFile(mDestination.path()).open(QIODevice::WriteOnly | QIODevice::Truncate); //KIO won't create the file if it doesn't exist
+    QFile(mDestination.toLocalFile()).open(QIODevice::WriteOnly | QIODevice::Truncate); //KIO won't create the file if it doesn't exist
     connect(mDestinationJob, SIGNAL(open(KIO::Job*)), this, SLOT(open(KIO::Job*)));
     connect(mDestinationJob, SIGNAL(result(KJob*)), this, SLOT(openFinished(KJob*)));
 
diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index 5db0254..75ea0f9 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -54,8 +54,8 @@ QUrl SharePlugin::destinationDir() const
     const QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
     QUrl dir = QUrl::fromLocalFile(config->group("receive").readEntry("path", downloadPath));
 
-    if (!dir.path().endsWith('/')) {
-        dir.setPath(dir.path() + '/');
+    if (!dir.toLocalFile().endsWith('/')) {
+        dir.setPath(dir.toLocalFile() + '/');
     }
 
     QString url = dir.toLocalFile();
@@ -99,7 +99,7 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
         QString filename = np.get<QString>("filename", QString::number(QDateTime::currentMSecsSinceEpoch()));
         QUrl destination = destinationDir();
         destination = destination.adjusted(QUrl::StripTrailingSlash);
-        destination.setPath(destination.path() + '/' + filename);
+        destination.setPath(destination.toLocalFile() + '/' + filename);
         FileTransferJob* job = np.createPayloadTransferJob(destination);
         job->setDeviceName(device()->name());
         connect(job, SIGNAL(result(KJob*)), this, SLOT(finished(KJob*)));

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list