#include <applicationadaptor.h>
#include <kcmdlineargs.h>
#include <kurl.h>
-#include <QDir>
#include <QtDBus/QDBusConnection>
DolphinApplication::DolphinApplication() :
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());
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();