[vlc-devel] commit: Qt: be sure to use everywhere the saved path. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun Jun 21 14:50:52 CEST 2009
vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 21 03:57:49 2009 +0200| [46a61c6d513c5dae0d12c26379693948155c6615] | committer: Jean-Baptiste Kempf
Qt: be sure to use everywhere the saved path.
And also fix the support for it on Windows.
(cherry picked from commit 953140e515e407698579f525ad5e0c17eb9e094b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46a61c6d513c5dae0d12c26379693948155c6615
---
modules/gui/qt4/components/open_panels.cpp | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 2 +-
modules/gui/qt4/util/qt_dirs.hpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 6714a5e..7d9277c 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -163,7 +163,7 @@ FileOpenPanel::~FileOpenPanel()
void FileOpenPanel::browseFile()
{
- QStringList files = QFileDialog::getOpenFileNames( this );
+ QStringList files = QFileDialog::getOpenFileNames( this, qtr( "Select one or multiple files" ), p_intf->p_sys->filepath) ;
foreach( const QString &file, files )
{
QListWidgetItem *item =
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 887284c..52dd5a2 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -466,7 +466,7 @@ void DialogsProvider::openUrlDialog()
**/
static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
{
- QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory") );
+ QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory"), p_intf->p_sys->filepath );
if (!dir.isEmpty() )
{
diff --git a/modules/gui/qt4/util/qt_dirs.hpp b/modules/gui/qt4/util/qt_dirs.hpp
index 5f46a6e..5abb7d0 100644
--- a/modules/gui/qt4/util/qt_dirs.hpp
+++ b/modules/gui/qt4/util/qt_dirs.hpp
@@ -45,7 +45,7 @@ static inline QString removeTrailingSlash( QString s )
return s;
}
-#define savedirpathFromFile( a ) p_intf->p_sys->filepath = QFileInfo( a ).path()
+#define savedirpathFromFile( a ) p_intf->p_sys->filepath = toNativeSeparators( QFileInfo( a ).path() )
#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
static inline QString colon_escape( QString s )
More information about the vlc-devel
mailing list