Change in kio[master]: Port from deprecated KRun::run(KService) to KRun::runService...

David Faure (Code Review) noreply at kde.org
Tue Dec 30 08:49:06 UTC 2014


David Faure has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/287

Change subject: Port from deprecated KRun::run(KService) to KRun::runService(...)
......................................................................

Port from deprecated KRun::run(KService) to KRun::runService(...)

Change-Id: Ia36476a4ac34d3fd16deba996595976ca071c79e
---
M src/widgets/dropjob.cpp
M src/widgets/kdesktopfileactions.cpp
M src/widgets/kfileitemactions.cpp
M src/widgets/krun.cpp
4 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/87/287/1

diff --git a/src/widgets/dropjob.cpp b/src/widgets/dropjob.cpp
index 44ecf52..63beb0a 100644
--- a/src/widgets/dropjob.cpp
+++ b/src/widgets/dropjob.cpp
@@ -395,7 +395,7 @@
     if (desktopFile.hasApplicationType()) {
         // Drop to application -> start app with urls as argument
         KService service(destFile);
-        if (!KRun::run(service, m_urls, KJobWidgets::window(q))) {
+        if (!KRun::runService(service, m_urls, KJobWidgets::window(q))) {
             q->setError(KIO::ERR_CANNOT_LAUNCH_PROCESS);
             q->setErrorText(destFile);
         }
diff --git a/src/widgets/kdesktopfileactions.cpp b/src/widgets/kdesktopfileactions.cpp
index 98ced79..2f02c2f 100644
--- a/src/widgets/kdesktopfileactions.cpp
+++ b/src/widgets/kdesktopfileactions.cpp
@@ -145,7 +145,7 @@
     }
 
     QList<QUrl> lst;
-    return KRun::run(s, lst, 0 /*TODO - window*/, false, QString(), asn);
+    return KRun::runService(s, lst, 0 /*TODO - window*/, false, QString(), asn);
 }
 
 static bool runLink(const QUrl &_url, const KDesktopFile &cfg, const QByteArray &asn)
diff --git a/src/widgets/kfileitemactions.cpp b/src/widgets/kfileitemactions.cpp
index 8384cb4..d9dfa8c 100644
--- a/src/widgets/kfileitemactions.cpp
+++ b/src/widgets/kfileitemactions.cpp
@@ -619,7 +619,7 @@
             KRun::displayOpenWithDialog(serviceItems.urlList(), m_parentWidget);
             continue;
         }
-        KRun::run(*servicePtr, serviceItems.urlList(), m_parentWidget);
+        KRun::runService(*servicePtr, serviceItems.urlList(), m_parentWidget);
     }
 }
 
@@ -650,7 +650,7 @@
     KService::Ptr app = act->data().value<KService::Ptr>();
     Q_ASSERT(app);
     if (app) {
-        KRun::run(*app, m_props.urlList(), m_parentWidget);
+        KRun::runService(*app, m_props.urlList(), m_parentWidget);
     }
 }
 
diff --git a/src/widgets/krun.cpp b/src/widgets/krun.cpp
index b9ad4e0..8b21c78 100644
--- a/src/widgets/krun.cpp
+++ b/src/widgets/krun.cpp
@@ -228,7 +228,7 @@
 #endif
     }
 
-    return KRun::run(*offer, lst, window, tempFile, suggestedFileName, asn);
+    return KRun::runService(*offer, lst, window, tempFile, suggestedFileName, asn);
 }
 
 bool KRun::displayOpenWithDialog(const QList<QUrl> &lst, QWidget *window, bool tempFiles,
@@ -255,7 +255,7 @@
             //qDebug() << "No service set, running " << l.text();
             service = KService::Ptr(new KService(QString() /*name*/, l.text(), QString() /*icon*/));
         }
-        return KRun::run(*service, lst, window, tempFiles, suggestedFileName, asn);
+        return KRun::runService(*service, lst, window, tempFiles, suggestedFileName, asn);
     }
     return false;
 }
@@ -782,7 +782,7 @@
 {
     KService::Ptr service(new KService(_name, _exec, _icon));
 
-    return run(*service, _urls, window, false, QString(), asn);
+    return runService(*service, _urls, window, false, QString(), asn);
 }
 
 bool KRun::runCommand(const QString &cmd, QWidget *window, const QString &workingDirectory)
@@ -985,7 +985,7 @@
         }
     } else {
         KService::Ptr service = KService::serviceByStorageId(_exec);
-        if (service && q->run(*service, urls, m_window, false, QString(), m_asn)) {
+        if (service && q->runService(*service, urls, m_window, false, QString(), m_asn)) {
             m_bFinished = true;
             startTimer();
             return true;
@@ -1250,7 +1250,7 @@
         if (serv && serv->hasMimeType(type)) {
             QList<QUrl> lst;
             lst.append(d->m_strURL);
-            if (KRun::run(*serv, lst, d->m_window, false, QString(), d->m_asn)) {
+            if (KRun::runService(*serv, lst, d->m_window, false, QString(), d->m_asn)) {
                 setFinished(true);
                 return;
             }

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/287
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia36476a4ac34d3fd16deba996595976ca071c79e
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: David Faure <faure at kde.org>
Gerrit-Reviewer: Martin Gräßlin <mgraesslin at kde.org>
Gerrit-Reviewer: Sysadmin Testing Account <null at kde.org>


More information about the Kde-frameworks-devel mailing list