┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-05-16 19:21:06 +0000
committerPeter Penz <[email protected]>2007-05-16 19:21:06 +0000
commitd78f3bcbc8c34e8162171357e69854bc735491d9 (patch)
tree282feedd11d69fa1a99ab9f3e3438b46d3fca9e8
parentaca3c707df3fe46bc1b50b4b1a8cc8703e3bfc16 (diff)
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
-rw-r--r--src/dolphinapplication.cpp12
1 files changed, 3 insertions, 9 deletions
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 <applicationadaptor.h>
#include <kcmdlineargs.h>
#include <kurl.h>
-#include <QDir>
#include <QtDBus/QDBusConnection>
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();