Commit 953140e5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: be sure to use everywhere the saved path.

And also fix the support for it on Windows.
parent 2c622a1a
...@@ -164,7 +164,7 @@ FileOpenPanel::~FileOpenPanel() ...@@ -164,7 +164,7 @@ FileOpenPanel::~FileOpenPanel()
void FileOpenPanel::browseFile() 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 ) foreach( const QString &file, files )
{ {
QListWidgetItem *item = QListWidgetItem *item =
......
...@@ -466,7 +466,7 @@ void DialogsProvider::openUrlDialog() ...@@ -466,7 +466,7 @@ void DialogsProvider::openUrlDialog()
**/ **/
static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) 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() ) if (!dir.isEmpty() )
{ {
......
...@@ -45,7 +45,7 @@ static inline QString removeTrailingSlash( QString s ) ...@@ -45,7 +45,7 @@ static inline QString removeTrailingSlash( QString s )
return 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 ) ) #define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
static inline QString colon_escape( QString s ) static inline QString colon_escape( QString s )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment