summaryrefslogtreecommitdiffstats
path: root/tests/manual/dialogs/filedialogpanel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QFileSystemModel: don't crash with setIconProvider(nullptr)Ahmad Samir2024-02-011-1/+10
| | | | | | | | | | | | | | | | | | | | The method takes a pointer, so the code shouldn't crash when passed a nullptr. QFileInfoGatherer::getInfo() still needs to generate a descriptive string for the file, so we refactor QAbstractFileIconProvider::type() to put the implementation into a reusable static function QAbstractFileIconProviderPrivate::getFileType(const QFileInfo &info). This unfortunately involves constructing a QMimeDatabase on the fly, but the docs say that is fine. Drive-by change: use nullptr instead of `0` for pointers. Pick-to: 6.5 6.6 6.7 Fixes: QTBUG-99178 Change-Id: Ia32ea0a26701d593e74fbecced7be8d9e0aa0f52 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Mark all of Qt as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add window-modal show option to dialogs manual testMikolaj Boc2022-09-131-13/+8
| | | | | | | | This provides an easy way to test window modality using a ready available test. Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove fatuously true or false QT_VERSION checksEdward Welbourne2021-09-231-15/+1
| | | | | | | | | QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-1/+1
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix compilation of some manual testsFriedemann Kleint2020-09-261-1/+1
| | | | | | | | | - qtabletevent/device_information - dialogs - windowflags Change-Id: Id3e4b2aec2a873b00dcda39fb1227b24832181ca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-261-2/+1
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-2/+2
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-061-1/+8
|\ | | | | | | Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
| * Manual dialog test: Output URLs when testing QFileDialogFriedemann Kleint2019-04-051-1/+8
| | | | | | | | | | Change-Id: Icfaedcd68ff387cc888e41ec0b1db1810122b229 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Manual dialog test: Fix deprecation warningsFriedemann Kleint2019-03-221-2/+2
| | | | | | | | | | | | | | | | | | filedialogpanel.cpp:441:55: warning: 'bool QFileDialog::confirmOverwrite() const' is deprecated: Use !testOption(DontConfirmOverwrite) instead [-Wdeprecated-declarations] filedialogpanel.cpp:443:53: warning: 'bool QFileDialog::resolveSymlinks() const' is deprecated: Use !testOption(DontResolveSymlinks) instead [-Wdeprecated-declarations] printdialogpanel.cpp:708:62: warning: 'const QRect QDesktopWidget::availableGeometry(int) const' is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] Change-Id: I087615b7e62b5fc11ec1063590fe55b2615f95fd Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | QtWidgets: mark QDialog/QFileDialog functions as deprecatedChristian Ehrlicher2019-02-061-1/+1
|/ | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QDialog::setOrientation()/orientation() - QDialog::setExtension()/extension()/showExtension() - QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible() - QFileDialog::setResolveSymlinks()/resolveSymlinks() Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Manual dialog test: fix use custom directory icon option settingDongmei Wang2017-06-131-1/+1
| | | | | | | | In FileDialogPanel::options(), QFileDialog::DontUseCustomDirectoryIcons was set when the "Don't use custom directory icons" box wasn't checked. Change-Id: I6e9d9b41cf91f4abcc98c02bed44675908a8391d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix build of the manual dialog test with Qt 4.Friedemann Kleint2015-03-251-0/+1
| | | | | Change-Id: If2b0ae9842ebc2795168d2c50934b8a87006544b Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.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>
* 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>
* Fix current directory setting in manual dialog test.Friedemann Kleint2014-07-151-5/+10
| | | | | | | | | It was always constructing a QUrl from the string causing the warning "Non-native QFileDialog supports only local files" with the new QUrl-based implementations of getOpenFileUrl(), etc. Change-Id: Idd9bb432a48865df137f8f39f53014dda150ffe9 Reviewed-by: David Faure <david.faure@kdab.com>
* Add QFileDialog::ShowDirsOnly to manual dialog test.Friedemann Kleint2013-12-101-0/+5
| | | | | | | Task-number: QTBUG-35396 Change-Id: I6ccb59d6bd3857aea66911e03200f28d093e57b4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Add print dialog manual test.Friedemann Kleint2013-11-041-32/+7
| | | | | | | | | Allowing for creating a printer in various modes and toying with the paper settings. Task-number: QTBUG-34276 Change-Id: Ieb35dc55c509f84d7d81817c7903e02a41ba8b44 Reviewed-by: John Layt <jlayt@kde.org>
* Fix compilation of the manual dialogs test with Qt 4.Friedemann Kleint2013-11-011-0/+10
| | | | | | | This is useful for comparisons and bug fixes. Change-Id: Ib5c5bcb7df4b15779be0b613782206f052c94430 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QFileDialog: add MIME Type filtersDavid Faure2013-08-291-5/+32
| | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-041-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/plugins/platforms/cocoa/qnsview.mm Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
| * Update manualtests license to say "part of test suite".Gunnar Sletta2013-05-261-1/+1
| | | | | | | | | | Change-Id: Ice9498c65a20ff17e68303578f8a1d9d6877f501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Windows: Introduce QFileDialog::DontUseCustomDirectoryIconsSérgio Martins2013-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-04-301-1/+1
|\| | | | | | | refs/staging/dev
| * File dialog manual test: Remove dot from default suffix.Friedemann Kleint2013-04-231-1/+1
| | | | | | | | | | Change-Id: Icadfd2103bb89b5f9ea167737d9e6af05d7a6b86 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add QUrl based static methods to QFileDialogKevin Ottens2013-04-291-0/+70
|/ | | | | | | | | | | | | | | 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>
* Filedialog test: Do not set directory if empty.Friedemann Kleint2013-02-161-1/+3
| | | | | | | | | Make it possible to test the saving/restoring of directories which is done by default. Task-number: QTBUG-28855 Change-Id: Id16010b6aea9cd78b9bebdbe1b148eb7f5141f8b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Dialog testing tool: add missing enableDeleteModalDialogButton() callsJ-P Nurmi2013-02-071-0/+2
| | | | | Change-Id: I012dc8c7c07fced69f8b7eda7a1686af1e11033f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Manual file dialog test: Add showModal().Friedemann Kleint2013-01-241-18/+53
| | | | | | | | Modal dialogs can now tested by just showing or running exec(). Remove connection of accept() from applySettings(). Change-Id: I5e3c0e6405ce5682f39d10a9c06b9d61be10ed3f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Dialog testing tool: Control life cycle of non-modal file dialogs.Friedemann Kleint2013-01-161-6/+28
|/ | | | | | | | | Keep the non-modal file dialog around and delete only on request, such that one can simulate repeated invocations of show() on the same dialog for testing native dialogs. Change-Id: I80d0f1dfafbc02a31be192098121654a01025174 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix some typosSergio Ahumada2012-12-211-2/+2
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Add manual test for dialogs.Friedemann Kleint2012-10-311-0/+373
Implemented for QFileDialog, currently. Task-number: QTBUG-27621 Change-Id: I0c9b7628aa92e3fbca6f737448a7c469893764f1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>