Summary: | okular: inconsistent handling of reference given as part of command line arg | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Jochen Trumpf <Jochen.Trumpf> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | yskim75 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch file to fix url encoding in okular |
Description
Jochen Trumpf
2009-08-25 14:22:26 UTC
The other bug is bug #205084. Cheers, Jochen Created attachment 39324 [details]
patch file to fix url encoding in okular
Okay, unless someone has a better idea, how about adding this hotfix in the meantime (see attached patch)? It is duplicating code from ShellUtils (which appears not to be accessible from this context), but at least it solves this annoying bug and makes using source-references together with --unique less painful ...
Does this one work? Index: shell/main.cpp =================================================================== --- shell/main.cpp (revision 1067040) +++ shell/main.cpp (working copy) @@ -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 @@ 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; } Yep, that one works for me and is much more elegant than my attempt. I'll consider this bug fixed once you have committed the change. Thanks. SVN commit 1067205 by aacid: 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 M +2 -1 main.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1067205 *** Bug 226764 has been marked as a duplicate of this bug. *** |