[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeutils/ark
From:       Raphael Kubo da Costa <kubito () gmail ! com>
Date:       2009-08-04 20:02:03
Message-ID: 1249416123.027427.1430.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1006978 by rkcosta:

Use KUrl::pathOrUrl() whenever possible instead of KUrl::path().

CCBUG: 202470

 M  +1 -1      app/extractHereDndPlugin.cpp  
 M  +4 -4      kerfuffle/addtoarchive.cpp  
 M  +3 -3      kerfuffle/batchextract.cpp  
 M  +1 -1      kerfuffle/queries.cpp  
 M  +1 -1      part/archivemodel.cpp  
 M  +3 -3      part/part.cpp  


--- trunk/KDE/kdeutils/ark/app/extractHereDndPlugin.cpp #1006977:1006978
@@ -44,7 +44,7 @@
     BatchExtract *batchJob = new BatchExtract();
 
     batchJob->setAutoSubfolder(true);
-    batchJob->setDestinationFolder(m_dest.path());
+    batchJob->setDestinationFolder(m_dest.pathOrUrl());
     batchJob->setPreservePaths(true);
     foreach(const KUrl& url, m_urls) {
         batchJob->addInput(url);
--- trunk/KDE/kdeutils/ark/kerfuffle/addtoarchive.cpp #1006977:1006978
@@ -59,7 +59,7 @@
 
 void AddToArchive::setFilename(const KUrl& path)
 {
-    m_filename = path.path();
+    m_filename = path.pathOrUrl();
 }
 
 void AddToArchive::setMimeType(const QString & mimeType)
@@ -90,14 +90,14 @@
 
 bool AddToArchive::addInput(const KUrl& url)
 {
-    m_inputs << url.path(
-        QFileInfo(url.path()).isDir() ?
+    m_inputs << url.pathOrUrl(
+        QFileInfo(url.pathOrUrl()).isDir() ?
         KUrl::AddTrailingSlash :
         KUrl::RemoveTrailingSlash
     );
 
     if (m_firstPath.isEmpty()) {
-        QString firstEntry = url.path(KUrl::RemoveTrailingSlash);
+        QString firstEntry = url.pathOrUrl(KUrl::RemoveTrailingSlash);
         m_firstPath = QFileInfo(firstEntry).dir().absolutePath();
     }
 
--- trunk/KDE/kdeutils/ark/kerfuffle/batchextract.cpp #1006977:1006978
@@ -189,9 +189,9 @@
 
 bool BatchExtract::addInput(const KUrl& url)
 {
-    Kerfuffle::Archive *archive = Kerfuffle::factory(url.path());
+    Kerfuffle::Archive *archive = Kerfuffle::factory(url.pathOrUrl());
 
-    if ((archive == NULL) || (!QFileInfo(url.path()).exists())) {
+    if ((archive == NULL) || (!QFileInfo(url.pathOrUrl()).exists())) {
         m_failedFiles.append(url.fileName());
         return false;
     }
@@ -261,7 +261,7 @@
     }
 
     setAutoSubfolder(dialog->autoSubfolders());
-    setDestinationFolder(dialog->destinationDirectory().path());
+    setDestinationFolder(dialog->destinationDirectory().pathOrUrl());
     setOpenDestinationAfterExtraction(dialog->openDestinationAfterExtraction());
     setPreservePaths(dialog->preservePaths());
 
--- trunk/KDE/kdeutils/ark/kerfuffle/queries.cpp #1006977:1006978
@@ -90,7 +90,7 @@
         mode);
     dialog->exec();
 
-    m_data["newFilename"] = dialog->newDestUrl().path();
+    m_data["newFilename"] = dialog->newDestUrl().pathOrUrl();
 
     setResponse(dialog->result());
 }
--- trunk/KDE/kdeutils/ark/part/archivemodel.cpp #1006977:1006978
@@ -495,7 +495,7 @@
 
     QStringList paths;
     foreach(const QUrl &url, data->urls()) {
-        paths << url.path();
+        paths << url.toLocalFile();
     }
 
     //for now, this code is not used because adding files to paths inside the
--- trunk/KDE/kdeutils/ark/part/part.cpp #1006977:1006978
@@ -284,8 +284,8 @@
     const QStringList dirHistory = conf.readPathEntry("History Items", QStringList());
 
     for (int i = 0; i < qMin(10, dirHistory.size()); ++i) {
-        QAction *newAction = m->addAction(KUrl(dirHistory.at(i)).path());
-        newAction->setData(KUrl(dirHistory.at(i)).path());
+        QAction *newAction = m->addAction(KUrl(dirHistory.at(i)).pathOrUrl());
+        newAction->setData(KUrl(dirHistory.at(i)).pathOrUrl());
     }
 }
 
@@ -547,7 +547,7 @@
         //this is done to update the quick extract menu
         updateActions();
 
-        m_destinationDirectory = dialog->destinationDirectory().path();
+        m_destinationDirectory = dialog->destinationDirectory().pathOrUrl();
 
         QList<QVariant> files;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic