diff --git a/modules/gui/qt/dialogs/preferences/simple_preferences.cpp b/modules/gui/qt/dialogs/preferences/simple_preferences.cpp index fec256a3cb344145e59354eb67ba92c6c2f5fef6..111870e7a4e3f3003796b3aa12082258d0c3584c 100644 --- a/modules/gui/qt/dialogs/preferences/simple_preferences.cpp +++ b/modules/gui/qt/dialogs/preferences/simple_preferences.cpp @@ -1644,16 +1644,20 @@ void SPrefsPanel::saveAsso() #endif /* _WIN32 */ void SPrefsPanel::MLaddNewFolder() { - QUrl newEntryPoint = QFileDialog::getExistingDirectoryUrl( this , qtr("Please choose an entry point folder") , - QUrl( QDir::homePath( ) ) ); + const QUrl homeDirectory = QUrl::fromLocalFile(QDir::homePath()); + QUrl newEntryPoint = QFileDialog::getExistingDirectoryUrl( this + , qtr("Please choose an entry point folder") + , homeDirectory ); if(! newEntryPoint.isEmpty() ) mlFoldersEditor->add( newEntryPoint ); } void SPrefsPanel::MLBanFolder( ) { - QUrl newEntryPoint = QFileDialog::getExistingDirectoryUrl( this , qtr("Please choose an entry point folder") , - QUrl( QDir::homePath( ) ) ); + const QUrl homeDirectory = QUrl::fromLocalFile(QDir::homePath()); + QUrl newEntryPoint = QFileDialog::getExistingDirectoryUrl( this + , qtr("Please choose an entry point folder") + , homeDirectory ); if(! newEntryPoint.isEmpty() ) mlBannedFoldersEditor->add( newEntryPoint );