Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0 Alpha, 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0
-
None
-
Ubuntu 13.10
-
7c03f00a4ea6da72e0064ecb659c4c4bc3c8083b
Description
QPlatformFileDialog's initiallySelectedFiles option hold a list of files that is set before the file dialog pops up. This is needed for example in OSX, because the filename cannot be changed after the dialog is created.
In void QGtk2FileDialogHelper::applyOptions() QStrings are copied to QUrls because QGtk2FileDialogHelper::selectFile expects the parameter to be QUrl again (since 5.2).
src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp
foreach (const QUrl &filename, opts->initiallySelectedFiles())
selectFile(filename.toLocalFile());
Thus QString is copied into a QUrl in the wrong way. See https://gist.github.com/webmaster128/8256606 where END STATE 1 is what you want and END STATE 2 is what is done.
Attachments
1.
|
Same for initialDirectory | Closed | Shawn Rutledge |
Gerrit Reviews
For Gerrit Dashboard: QTBUG-35947 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
74762,1 | GTK FileDialog: don't convert QUrl to QString prematurely | stable | qt/qtbase | Status: MERGED | +2 | 0 |
74762,1 | GTK FileDialog: don't convert QUrl to QString prematurely | stable | qt/qtbase | Status: MERGED | +2 | 0 |