forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user