From: Peter Penz Date: Wed, 16 May 2007 19:21:06 +0000 (+0000) Subject: revert last patch ("fix issue that invoking 'dolphin .' does not work") and replace... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/d78f3bcbc8c34e8162171357e69854bc735491d9?ds=inline revert last patch ("fix issue that invoking 'dolphin .' does not work") and replace it by a more generic approach svn path=/trunk/KDE/kdebase/apps/; revision=665386 --- diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index a3dc80fef..85e27811a 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include DolphinApplication::DolphinApplication() : @@ -77,7 +76,7 @@ int DolphinApplication::newInstance() KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if (args->count() > 0) { for (int i = 0; i < args->count(); ++i) { - openWindow(args->arg(i)); + openWindow(args->url(i).path()); } } else { openWindow(QString()); @@ -90,14 +89,9 @@ int DolphinApplication::newInstance() int DolphinApplication::openWindow(const QString& url) { - QString dir = url; - if (dir == ".") { - dir = QDir::currentPath(); - } - DolphinMainWindow* win = createMainWindow(); - if ((win->activeView() != 0) && !dir.isEmpty()) { - win->activeView()->setUrl(KUrl(dir)); + if ((win->activeView() != 0) && !url.isEmpty()) { + win->activeView()->setUrl(KUrl(url)); } win->show(); return win->getId();