diff options
| author | Peter Penz <[email protected]> | 2007-05-16 19:37:31 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-16 19:37:31 +0000 |
| commit | dec19c1e771e216feddbc757ac14f9cb7bd4226a (patch) | |
| tree | 1e20f8025ffacf924e80bcf47110dc9885d4696b /src | |
| parent | d78f3bcbc8c34e8162171357e69854bc735491d9 (diff) | |
fix for the fix for the fix [1]: assure that invoking Dolphin with remote URLs like "dolphin ftp://ftp.kde.org/" works too (thanks to David Faure)
[1] I hope this does not get a neverending story ;-)
svn path=/trunk/KDE/kdebase/apps/; revision=665393
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinapplication.cpp | 10 | ||||
| -rw-r--r-- | src/dolphinapplication.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index 85e27811a..4c3273bff 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -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(); diff --git a/src/dolphinapplication.h b/src/dolphinapplication.h index 4ea91db83..982873e28 100644 --- a/src/dolphinapplication.h +++ b/src/dolphinapplication.h @@ -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. */ |
