summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Support virtual folders as initial directory for file dialog.Friedemann Kleint2015-03-271-0/+10
| | | | | | | | | | | | | Use the scheme "clsid" to be able to pass them as "clsid:<GUID>" (with '{', '}' stripped). Task-number: QTBUG-33962 Change-Id: Ib045fe81518bca6e91588007ce8a245a48479b1f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Patrick Spendrin <patrick.spendrin@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * QFileDialog: fix overwritten filterJoerg Bornemann2015-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following code: QFileDialog dlg; dlg.setFilter(QDir::Hidden | ...); dlg.setOption(QFileDialog::DontUseNativeDialog) setFilter stores the filter value in QDialogPrivate::options. setOption will overwrite this value with the default value from a newly created QFileSystemModel. The intention was to set the filter in the model to the value in options. Change-Id: I561c5cf1ad4d9d729a56620d86ec549eb3105a07 Task-number: QTBUG-37085 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Introduce QT_NO_MIMETYPESérgio Martins2015-02-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The mime type stuff generates one of the biggest translation units in QtCore due to the compressed 1.7MB freedesktop.org.xml resource. With QT_NO_MIMETYPE, libQt5Core.so is almost 400Kb smaller (4.8MB->4.4MB gcc 4.9 stripped release build) Change-Id: I5339090994034355724ff4deddb64720e81baeaf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QFileDialog: don't warn about directory url prematurlyRichard Moe Gustavsen2015-02-151-1/+1
| | | | | | | | | | | | | | | | | | The app can set a directory url before showing the dialog. Since we don't really know if the dialog is going to be native or not at that point, it is too early to warn. Change-Id: Ie9875ca90a500258841bad702ee864a46775641c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QFileDialog: don't clear directory url upon showRichard Moe Gustavsen2015-02-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the app sets a directory url that is not a local file, the url would be cleared just before showing the dialog. The reason is that we try to convert the url to a local file when preparing helper options, but fail. Trying to convert the url in the first place is wrong, since the app should be able to point the file dialog to any url, not just local directories. Since QFileDialogPrivate::init() calls QFileDialog::setDirectoryUrl(), and setDirectoryUrl() calls options->setInitialDirectory(), there should be no reason to set initialDirectory once more in QFileDialogPrivate::helperPrepareShow(). The easiest fix is therefore to remove the code in initHelper() that modifies the initial url. Change-Id: Ia6c2113e867b1156cf9d59d347116f7df8c06d93 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-131-2/+2
| | | | | | | | | | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QFileDialog::setDirectory(): remove unused local variableMaks Naumov2015-02-021-1/+0
|/ | | | | Change-Id: I461679f7e47d6e98b3adda0114a5a3bd07a6a4d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileDialog: prevent section collapsing in the main selection areaGiuseppe D'Angelo2014-11-031-1/+1
| | | | | | | | | | | | | | | | | | In the non-native QFileDialog, a QSplitter separates the two central views (the list view of "places" and the tree view for navigating the file system). Unfortunately, that splitter allows sections to be collapsed, resulting in a weird status where the user doesn't understand what has just happened and thinks that (s)he may have broken something. Worse, that gets actually saved into the application settings, so the splitter may stay collapsed forever. Instead, let's simply prevent sections from being collapsible. Task-number: QTBUG-19467 Change-Id: I11ff7c55a5535680a3edce5f4e70c9338291b94f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-12/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * QFileDialog: save and restore all settings even if widgets not usedShawn Rutledge2014-09-011-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | Some applications may use native file dialogs and some may use the widget implementation, but QFileDialog always saves all settings to the same place each time it destroyed. So it is important to remember all settings read in restoreState and put them back in saveState. This bug was introduced by 37ca2224eca671200a2710f57f970d2993e62aa5 Task-number: QTBUG-36888 Change-Id: Ied1db83817480312e963a042784d7bdd16f0a2b1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-3/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * QFileDialog docs: remove misleading sentence about static functionsShawn Rutledge2014-08-061-3/+1
| | | | | | | | | | | | | | | | | | Native dialogs are used whenever possible, not just when the dialog is instantiated via the static function. Task-number: QTBUG-36657 Change-Id: Ibad67114e67f8e2f9956037f8469542c72bfd8ea Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QFileDialog: implement getOpenFileUrl and friends for realDavid Faure2014-08-061-87/+81
| | | | | | | | | | | | | | | | | | i.e. make them support remote URLs. To avoid code duplication, getOpenFileName/getSaveFileName/getExistingDirectory are now implemented in terms of getOpenFileUrl/getSaveFileUrl/getExistingDirectoryUrl. Change-Id: If409ac9ab72c2a65f04e2ef1dc28e7d47bbcd73c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QFileDialog: turn workingDirectory into a QUrlDavid Faure2014-08-051-43/+63
| | | | | | | | | | | | | | In order to make this work better with remote URLs. Change-Id: Ic440735142441150838b05e88940adcc12a90d09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QUrl: fromLocalFile(QString()) should lead to an empty URL.David Faure2014-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is much more useful than the URL "file:", it allows to use "empty path" and "empty URL" for the same meaning (e.g. not set). QFileDialog actually uses "file:" though, as the URL for the "My Computer" item in the sidebar. This patch preserves that. [ChangeLog][QtCore][QUrl] QUrl::fromLocalFile now returns an empty URL if the input string is empty. Change-Id: Ib5ce1a3cdf5f229368e5bcd83c62c1d1ac9f8a17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileDialog: emit urlsSelected+urlSelected in accept().David Faure2014-07-241-8/+13
| | | | | | | | | | | | | | Not just filesSelected+fileSelected (which only happens for local files). Change-Id: Ife592c3c921231356f96cbc2871b6d724a15d2c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QFileDialog: compile with QT_NO_URL_CAST_FROM_STRING.David Faure2014-07-091-0/+2
| | | | | | | | | | | | | | This is useful to detect confusions between local paths and URLs. Change-Id: I1aa72ae10186984812691c8a1a4e843db3c85246 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | qfiledialog: clean up dead code.David Faure2014-07-091-51/+0
|/ | | | | | | | | Q_WS_WIN is never defined, and the qt_win_get_* functions don't exist anymore. The QPA plugin takes care of doing the Windows-specific handling for the file dialog. Change-Id: Icdf9aed7da3db8ed2bd71d60f821869340ec1041 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog: Return empty QUrl from the static get..FileUrl() functions.Friedemann Kleint2014-05-061-3/+8
| | | | | | Task-number: QTBUG-38672 Change-Id: Idf554cd93d1a79db7c82f3165bd128fb31ead3e5 Reviewed-by: David Faure <david.faure@kdab.com>
* Observe case insensitive file systems in QFileDialog::selectFile().Friedemann Kleint2014-04-291-20/+40
| | | | | | | | | | When stripping the root path from a file name that cannot be found in the model, use case sensitive comparison depending on file system. Task-number: QTBUG-38162 Change-Id: I28e28973fca2da35a5768fdd00cc258b9669a15a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix QFileDialog::viewMode() when using a native file dialog.David Faure2014-04-281-1/+1
| | | | | | | | | | | It should return the view mode that was set in setViewMode() and stored in the options. Change-Id: Iaaa94a201a25baa251446688bf5bdaca5cf3373b Reviewed-by: Mark Gaiser Reviewed-by: Dominik Haumann <dhaumann@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix crash when accessing QFileDialog::selectedFiles() before widgets exist.Friedemann Kleint2014-04-281-2/+2
| | | | | | | | Discovered while investigating: Task-number: QTBUG-38414 Change-Id: I764195254ba4b54c86079c6e8ef750d6249960d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QFileDialog: documentation clarifications about file type filteringShawn Rutledge2014-03-171-2/+14
| | | | | | | | | | *.* is not a portable file type filter. Anyway it's better to filter by mime types, because it's more inclusive now and may even get better in the future. Task-number: QTBUG-37393 Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove the _qt_filedialog_xxx hooksJ-P Nurmi2014-03-151-45/+4
| | | | | | | | | | These internal and obsolete hooks are no longer used. The correct way to provide platform dialogs in Qt 5.x is to implement a platform theme plugin, as was done for GTK+ 2.x. Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Don't block Key_Back in file dialogPaul Olav Tvete2014-03-141-6/+1
| | | | | | | | | | Update the 10 year old FIXME hack to allow Key_Back (which will close the dialog on Android). Also clean up nearby code that has been dead for seven years. Task-number: QTBUG-35784 Change-Id: I609858afb2caefe7025e421406288ae56717fea5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QFileDialog: restore state from QSettings after creating widgetsShawn Rutledge2014-02-201-3/+7
| | | | | | | | | | | | After 37ca2224eca671200a2710f57f970d2993e62aa5 it's necessary to read the saved QSettings again after creating widgets, in order to deal with the settings which only affect widgets (such as saved bookmarks). It's also necessary to read them if widgets are not used though, because some of the settings affect native dialog options. Task-number: QTBUG-36888 Change-Id: I8cf53db864b173c50a876a1d5ce29c1e073fcaa6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-1/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * QPA fix: allow setting the initially selected name filter (KDE)Dominik Haumann2014-02-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In KDE, without this patch, the Q_ASSERT in the following code fragment fails: QFileDialog dialog; QStringList list = QStringList() << "c (*.cpp)" << "h (*.h)"; dialog.setNameFilters(list); QString filter("h (*.h)"); dialog.selectNameFilter(filter); dialog.show(); Q_ASSERT(dialog.selectedNameFilter() == filter); The reason for the fail is that the selectNameFilter() does not properly propagate the filter to the QPA plugin. So the first part of this patch adds d->options->setInitiallySelectedNameFilter(filter); in the function QFileDialog::selectNameFilter(). The second part of this patch makes sure that the initially set name filter in the QFileDialogOptions "options" is not overwritten in the helperPrepareShow() function. This is achieved by adding an if(), following the if() for the initiallySelectedfiles() the line below. With this patch, the Q_ASSERT() holds true in KDE Framework 5's file dialog integration. Change-Id: I15d8c88a0fa3cdc03e3330f3458bbad139a71212 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-101-1/+5
|\| | | | | | | Change-Id: I99af0bef7f1c931533a324ebcfb27c40ee871a5e
| * QFileDialog::setDirectory() and directory() should be symmetricShawn Rutledge2014-01-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | QFileDialog::setDirectory() calls options->setInitialDirectory(). Then QFileDialogPrivate::helperPrepareShow() calls it again with the result of QFileDialog::directory(). Assuming there are cases where that's actually necessary, we need QFileDialog::directory() to return the same one which was previously set in setDirectory(). Task-number: QTBUG-35779 Change-Id: Iac1f88c770ff1ef06a7f884f9a42d72674c967ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-12/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Android native message dialogBogDan Vatra2013-11-091-2/+2
| | | | | | | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Fix QFileDialog::getSaveFilename() with a given default nameShawn Rutledge2013-11-081-9/+10
| | | | | | | | | | | | | | | | | | | | The QFileDialogOptions::initiallySelectedFiles were overridden, and the given filename was also not properly converted to a local file URL. Task-number: QTBUG-34408 Task-number: QTBUG-34446 Change-Id: I51d05b954a5393d10db9232945ba05bda7068e73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QFileDialog: document the consequences of being "widgetless"Shawn Rutledge2013-10-311-1/+9
| | | | | | | | | | | | | | | | | | After 37ca2224eca671200a2710f57f970d2993e62aa5 it's an exposed behavior change that the widgets and related paraphernalia don't exist. Task-number: QTBUG-34100 Change-Id: Ie0ebcb8c5c5668b6c12c5447f25bfbfd893dec6c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QFileDialog: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | | | | | | Change-Id: I32a631493138a777458557232da084f497adc526 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-241-78/+188
|\| | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-151-78/+188
| | | | | | | | | | | | | | | | | | | | | | This is a performance and memory optimization which also fixes bugs that are related to creating widgets, file system models etc. despite using platform native dialogs. Similar to 785bc64f8e743ac269f15cbe7fecba93d3d507ac for QColorDialog. Task-number: QTBUG-33039 Change-Id: Ia1aa7ec1f43b47006b9ebd377aed15c958538a17 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-111-4/+4
|\| | | | | | | Change-Id: Ib8cfeee7d9ca15e8ad520e428b72c200827a8628
| * Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | WinRT: Fix Widget buildsAndrew Knight2013-09-271-1/+1
|/ | | | | | | | Tweak pri files and preprocessor usage to support widgets under WinRT. Change-Id: I6dc7d160078c0da343d6d39d2a0d52112c6f9f59 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog: add MIME Type filtersDavid Faure2013-08-291-0/+70
| | | | | | | | | | | | | | Currently just a convenience method for setNameFilters(), it uses QMimeType to create a name filter from the glob patterns and description defined in each MIME type. In the longer term, this API could be used to do proper mimetype-based filtering using QMimeDatabase::mimeTypeForFile() in the builtin QFileDialog (aka "not native"), instead of only looking at globs via the name filters. Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add QUrl based API to QFileDialogKevin Ottens2013-07-181-6/+127
| | | | | Change-Id: Iaf4f8e57e8df956dec9105eb00c193645f2db098 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Have QFileDialog use QUrl internallyKevin Ottens2013-07-181-19/+64
| | | | | | | | | | | | When using the native dialog and through the helper, we use QUrl in QFileDialog. It is preparatory work for having QUrl based methods on QFileDialog interface itself. Done-with: sean.harmer@kdab.com Done-with: faure@kde.org Change-Id: I61e99d498252241f38ec05724702a90ba050c4bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Silently strip leading dot off QFileDialog default suffixes.Friedemann Kleint2013-05-211-0/+2
| | | | | | Change-Id: Ie41fafe8c2ce7e8ac8dd595ca3809c1da3b386f4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Windows: Introduce QFileDialog::DontUseCustomDirectoryIconsSérgio Martins2013-05-091-0/+14
| | | | | | | | | | | | | | | Folders can have a custom icon, set by the user. Some system folders also have one, for example c:\windows\fonts. This option allows you to disable this behavior, you'll get the folder directory icon. As a side-effect, you'll get a very big performance improvement on removable/network media: 2 seconds vs 60 seconds on a SDCard with 10000 folders. Change-Id: Id55ea628186e0a6523585ec7a4ff622d6f5da505 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add QUrl based static methods to QFileDialogKevin Ottens2013-04-291-0/+185
| | | | | | | | | | | | | | | With QUrl variants of the static methods, it is possible to get to use VFS facilities of the platform if available. Since we can't predict if the application will use the VFS available in the platform or its own mechanisms, an extra parameter is provided to restrict the protocols allowed to the user. This extra parameter defaults to no restriction, which is the most convenient if the platform file dialog and the application use a matching VFS. It's likely to be the most common use. Change-Id: I4c9effde9d194d226cd8b7a140eb9036187ba87b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>