]> cloud.milkyroute.net Git - dolphin.git/commitdiff
fix for the fix for the fix [1]: assure that invoking Dolphin with remote URLs like...
authorPeter Penz <peter.penz19@gmail.com>
Wed, 16 May 2007 19:37:31 +0000 (19:37 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Wed, 16 May 2007 19:37:31 +0000 (19:37 +0000)
[1] I hope this does not get a neverending story ;-)

svn path=/trunk/KDE/kdebase/apps/; revision=665393

src/dolphinapplication.cpp
src/dolphinapplication.h

index 85e27811a55ea1ed177114696835197b3a500176..4c3273bff02a74708e0db443be5cff866729fe1d 100644 (file)
@@ -76,10 +76,10 @@ int DolphinApplication::newInstance()
     KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
     if (args->count() > 0) {
         for (int i = 0; i < args->count(); ++i) {
-            openWindow(args->url(i).path());
+            openWindow(args->url(i));
         }
     } else {
-        openWindow(QString());
+        openWindow(KUrl());
     }
 
     args->clear();
@@ -87,11 +87,11 @@ int DolphinApplication::newInstance()
     return exitValue;
 }
 
-int DolphinApplication::openWindow(const QString& url)
+int DolphinApplication::openWindow(const KUrl& url)
 {
     DolphinMainWindow* win = createMainWindow();
-    if ((win->activeView() != 0) && !url.isEmpty()) {
-        win->activeView()->setUrl(KUrl(url));
+    if ((win->activeView() != 0) && url.isValid()) {
+        win->activeView()->setUrl(url);
     }
     win->show();
     return win->getId();
index 4ea91db83853282083f375915b83e0fe93473772..982873e28c247884efbbfa3f75b4897825ebe765 100644 (file)
@@ -25,6 +25,7 @@
 #include <kuniqueapplication.h>
 
 class DolphinMainWindow;
+class KUrl;
 
 /**
  * @brief Holds the application data which can be accessed.
@@ -55,7 +56,7 @@ public:
     virtual int newInstance();
 
 public slots:
-    int openWindow(const QString& url);
+    int openWindow(const KUrl& url);
 
 protected:
     /** Called by the DolphinMainWindow to deregister. */