Obey the page argument when using the unique option

Patch by Victor Blazquez

svn path=/trunk/KDE/kdegraphics/okular/; revision=1218021
This commit is contained in:
Albert Astals Cid 2011-01-30 16:40:51 +00:00
parent 40d20ca58d
commit 054623a581

View file

@ -29,7 +29,10 @@ static bool attachUniqueInstance(KCmdLineArgs* args)
if (!iface.isValid())
return false;
iface.call("openDocument", ShellUtils::urlFromArg(args->arg(0), ShellUtils::qfileExistFunc()).url());
if (args->isSet("page"))
iface.call("openDocument", ShellUtils::urlFromArg(args->arg(0), ShellUtils::qfileExistFunc(), args->getOption("page")).url());
else
iface.call("openDocument", ShellUtils::urlFromArg(args->arg(0), ShellUtils::qfileExistFunc()).url());
return true;
}