[vlc-commits] commit: Qt: try to fix the "open containing folder" on Win32 ( Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Sat Sep 4 19:51:44 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 23 23:59:24 2010 +0200| [9f67114ecd32454a70d74c354905c234df90d349] | committer: Jean-Baptiste Kempf
Qt: try to fix the "open containing folder" on Win32
Should close #3536
(cherry picked from commit 89f5d36846718c86518e11d6f542e61b8823b5ab)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=9f67114ecd32454a70d74c354905c234df90d349
---
.../gui/qt4/components/playlist/playlist_model.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index d1a7ac4..6534868 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -1066,6 +1066,12 @@ void PLModel::popupExplore()
!strncasecmp( psz_access, "file", 4 ) ||
!strncasecmp( psz_access, "dire", 4 ) ))
{
+#ifdef WIN32
+ /* Qt openURL doesn't know to open files that starts with a / or \ */
+ if( psz_path[0] == '/' || psz_path[0] == '\\' )
+ psz_path++;
+#endif
+
QFileInfo info( qfu( decode_URI( psz_path ) ) );
QDesktopServices::openUrl(
QUrl::fromLocalFile( info.absolutePath() ) );
More information about the vlc-commits
mailing list