Commit a9750d02 authored by Robert Loehning's avatar Robert Loehning
Browse files

Fix opening in file manager



Task-number: QTCREATORBUG-8174
Change-Id: I9858ff5c24e80ed1f4375b2f4076bc74832bb217
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent dccb63b4
......@@ -77,11 +77,11 @@ QString UnixUtils::substituteFileBrowserParameters(const QString &pre, const QSt
c = pre.at(++i);
QString s;
if (c == QLatin1Char('d'))
s = QFileInfo(file).path();
s = QLatin1Char('"') + QFileInfo(file).path() + QLatin1Char('"');
else if (c == QLatin1Char('f'))
s = file;
s = QLatin1Char('"') + file + QLatin1Char('"');
else if (c == QLatin1Char('n'))
s = QFileInfo(file).fileName();
s = QLatin1Char('"') + QFileInfo(file).fileName() + QLatin1Char('"');
else if (c == QLatin1Char('%'))
s = c;
else {
......
......@@ -95,11 +95,11 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
"Could not find explorer.exe in path to launch Windows Explorer."));
return;
}
QString param;
QStringList param;
if (!QFileInfo(pathIn).isDir())
param = QLatin1String("/select,");
param += QLatin1String("/select,");
param += QDir::toNativeSeparators(pathIn);
QProcess::startDetached(explorer, QStringList(param));
QProcess::startDetached(explorer, param);
#elif defined(Q_OS_MAC)
Q_UNUSED(parent)
QStringList scriptArgs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment