Fix opening in file manager

Task-number: QTCREATORBUG-8174
Change-Id: I9858ff5c24e80ed1f4375b2f4076bc74832bb217
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Robert Loehning
2012-11-19 12:41:48 +01:00
parent dccb63b406
commit a9750d0226
2 changed files with 6 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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;