]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
select items after they have been copied/moved by a drag & drop operation
[dolphin.git] / src / dolphinviewcontainer.cpp
index 95b16448a3b553d34aeb94a98ecbb514b287c9a3..9f61360d73a3db98b5305c92a2d08ae2c10ee186 100644 (file)
@@ -39,8 +39,9 @@
 #include <kmimetyperesolver.h>
 #include <knewmenu.h>
 #include <konqmimedata.h>
-#include <konq_fileitemcapabilities.h>
+#include <kfileitemlistproperties.h>
 #include <konq_operations.h>
+#include <kshell.h>
 #include <kurl.h>
 #include <kurlcombobox.h>
 #include <krun.h>
@@ -281,7 +282,7 @@ void DolphinViewContainer::slotDirListerCompleted()
         // it is unclear whether writing is supported
         m_isFolderWritable = true;
     } else {
-        KonqFileItemCapabilities capabilities(KFileItemList() << item);
+        KFileItemListProperties capabilities(KFileItemList() << item);
         m_isFolderWritable = capabilities.supportsWriting();
     }
 
@@ -401,12 +402,18 @@ void DolphinViewContainer::restoreView(const KUrl& url)
             const QString browser = config.readEntry("BrowserApplication");
             if (!browser.isEmpty()) {
                 app = browser;
+                if (app.startsWith('!')) {
+                    // a literal command has been configured, remove the '!' prefix
+                    app = app.mid(1);
+                }
             }
         } else {
             showErrorMessage(i18nc("@info:status",
                                    "Protocol not supported by Dolphin, Konqueror has been launched"));
         }
-        const QString command = app + ' ' + url.pathOrUrl();
+
+        QString secureUrl = KShell::quoteArg(url.pathOrUrl());
+        const QString command = app + ' ' + secureUrl;
         KRun::runCommand(command, app, app, this);
     } else {
         showErrorMessage(i18nc("@info:status", "Invalid protocol"));