Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
1ae9c10f
Commit
1ae9c10f
authored
Feb 08, 2010
by
Robert Loehning
Browse files
Changed FolderNavigationWidget::showInGraphicalShell to show expected directories.
parent
84e2ecb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/foldernavigationwidget.cpp
View file @
1ae9c10f
...
...
@@ -386,7 +386,6 @@ static inline void showGraphicalShellError(QWidget *parent,
void
FolderNavigationWidget
::
showInGraphicalShell
(
QWidget
*
parent
,
const
QString
&
pathIn
)
{
Q_UNUSED
(
parent
)
// Mac, Windows support folder or file.
#if defined(Q_OS_WIN)
const
QString
explorer
=
Environment
::
systemEnvironment
().
searchInPath
(
QLatin1String
(
"explorer.exe"
));
...
...
@@ -396,8 +395,13 @@ void FolderNavigationWidget::showInGraphicalShell(QWidget *parent, const QString
tr
(
"Could not find explorer.exe in path to launch Windows Explorer."
));
return
;
}
QProcess
::
startDetached
(
explorer
,
QStringList
(
QLatin1String
(
"/select,"
)
+
QDir
::
toNativeSeparators
(
pathIn
)));
QString
param
;
if
(
!
QFileInfo
(
pathIn
).
isDir
())
param
=
QLatin1String
(
"/select,"
);
param
+=
QDir
::
toNativeSeparators
(
pathIn
);
QProcess
::
startDetached
(
explorer
,
QStringList
(
param
));
#elif defined(Q_OS_MAC)
Q_UNUSED
(
parent
)
QStringList
scriptArgs
;
scriptArgs
<<
QLatin1String
(
"-e"
)
<<
QString
::
fromLatin1
(
"tell application
\"
Finder
\"
to reveal POSIX file
\"
%1
\"
"
)
...
...
@@ -410,7 +414,7 @@ void FolderNavigationWidget::showInGraphicalShell(QWidget *parent, const QString
#else
// we cannot select a file here, because no file browser really supports it...
const
QFileInfo
fileInfo
(
pathIn
);
const
QString
folder
=
fileInfo
.
isDir
()
?
fileInfo
.
absoluteFilePath
()
:
fileInfo
.
absolutePath
();
const
QString
folder
=
fileInfo
.
absolut
eFil
ePath
();
const
QString
app
=
Utils
::
UnixUtils
::
fileBrowser
(
Core
::
ICore
::
instance
()
->
settings
());
QProcess
browserProc
;
const
QString
browserArgs
=
Utils
::
UnixUtils
::
substituteFileBrowserParameters
(
app
,
folder
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment