Do the same treatment to paths passed from the command line

when we are starting a new shell and when we are passing the argument
through dbus
BUGS: 205076

svn path=/trunk/KDE/kdegraphics/okular/; revision=1067205
This commit is contained in:
Albert Astals Cid 2009-12-29 08:38:49 +00:00
parent 6e881ebe8d
commit 846a3e3c83

View file

@ -18,6 +18,7 @@
#include <klocale.h>
#include <QtDBus/qdbusinterface.h>
#include "aboutdata.h"
#include "shellutils.h"
static bool attachUniqueInstance(KCmdLineArgs* args)
{
@ -28,7 +29,7 @@ static bool attachUniqueInstance(KCmdLineArgs* args)
if (!iface.isValid())
return false;
iface.call("openDocument", args->url(0).pathOrUrl());
iface.call("openDocument", ShellUtils::urlFromArg(args->arg(0), ShellUtils::qfileExistFunc()).url());
return true;
}