Skip to content

Commit

Permalink
support for special characters passed as arguments on Windows - fixed #…
Browse files Browse the repository at this point in the history
  • Loading branch information
krzemin committed Oct 24, 2015
1 parent 29f0775 commit a8bc924
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ QStringList parseArgs(int argc, char **argv)

for(int i = 1; i < argc; i++)
{
#ifdef Q_OS_WIN
QString p = QString::fromLocal8Bit(argv[i]);
#else
QString p = argv[i];

#endif
if(p.startsWith("file://"))
p = p.remove(0, 7);

Expand All @@ -186,7 +189,6 @@ QStringList parseArgs(int argc, char **argv)
if(QFileInfo(p).isFile())
pathList << p;
}

return pathList;
}

Expand Down

0 comments on commit a8bc924

Please sign in to comment.