when we remove the file:/ from the argument, do the precent-encoding removal to avoid being percent-encoded more than needed

based on a patch by Albert, slightly changed by me
will be in kde 4.3.3
CCBUG: 207461

svn path=/branches/KDE/4.3/kdegraphics/okular/; revision=1032945
remotes/origin/KDE/4.3
Pino Toscano 17 years ago
parent 9ffbea6b08
commit 54d3a1bda1
  1. 5
      shell/shell.cpp

@ -58,7 +58,12 @@ Shell::Shell(KCmdLineArgs* args, int argIndex)
if any.
*/
QString arg = m_args->arg(argIndex);
const QString origArg = arg;
arg.replace(QRegExp("^file:/{1,3}"), "/");
if (arg != origArg)
{
arg = QString::fromUtf8(QByteArray::fromPercentEncoding(arg.toUtf8()));
}
KUrl url = KCmdLineArgs::makeURL(arg.toUtf8());
int sharpPos = -1;
if (!url.isLocalFile() || !QFile::exists(url.toLocalFile()))

Loading…
Cancel
Save