aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickdialogs/quickdialogsquickimpl/qquickfiledialogimpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'v6.5.5-lts' into tqtc/lts-6.5-opensourceTarja Sundqvist2025-01-291-6/+78
|\ | | | | | | | | | | | | | | | | | | Qt 6.5.5-lts release Conflicts solved: dependencies.yaml src/quick/doc/snippets/qml/treeview/qml-customdelegate.qml Change-Id: Ifa297315fa0e6e70d9f26312f9183da4769d18fc
| * FileDialog: set url schema when using the file name text fieldOliver Eftevaag2024-01-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the text field to choose a file name inside the non-native file dialog, the selectedFile property would be updated based on the currentFolder property and what the newly typed filename was. However, the schema was ignored. This patch fixes the issue by also setting the schema in QQuickFileDialogImpl::setFileName(const QString &fileName). Fixes: QTBUG-120065 Change-Id: I1860fbbc8209270d0bc6e34a4be6a91bad2253ab Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 26d9634468332fd3d6c4cc341aad67673d6b2cce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f839b0ae73fdde85b7e453c2dd0210fd529907ca) (cherry picked from commit 53c60c2f94dfadc8cb89728de3b08ccf49b35afc)
| * Only update the filename text field when the user selects a fileOliver Eftevaag2024-01-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, it's normal for file dialogs to not update the text field that represents the filename of the currently selected file, if the selected file is a directory. To achieve that behavior, I'm removing the binding on the text property, and instead call setText() to update the text field when either the user selects another file in the file dialog list view, or when the selectedFile is changed externally. But only if the selectedFile is an actual real file, and not a directory. Fixes: QTBUG-119917 Change-Id: I8dbf41ba403d09419a2d66130bdad59e66c9d1cf Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 8e734b2fc027dc53fca1f344d1ab234a0756ea89) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ddee70ac8cebbba4e1f394d3d8b7149ef0436bc0) (cherry picked from commit 000e0ec5169fd055cc6d49af9842185f0e5b5b2c)
| * FileDialog: prompt the user when selecting an existing fileOliver Eftevaag2023-12-241-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is common for editing software to prompt the user when he/she wishes to save the work done in the editor, and an existing file is selected in the file dialog. This is an extra safety step, to hopefully prevent the user from accidentally shooting himself/herself in the foot, by overwriting an existing file and losing something valuable. One of the available file dialog option is DontConfirmOverwrite. Which according to the documentation, could be set in order to bypass a confirmation which is supposed to show up by default. But that weren't the case when using the non-native quick file dialog. The FileDialog will now show that confirmation dialog as a popup dialog, which popups up on top of the FileDialog, when selecting an existing file using the SaveFile file mode. The DontConfirmOverwrite option can now be used as intended, which will make the FileDialog behave like it used to, when selecting an existing file. In additon, hitting enter while the file dialog list view has focus, will now function the same as clicking the "Open" button. This was done in order to prevent the user from being able to bypass the new confirmation dialog. Fixes: QTBUG-119916 Change-Id: I07710a7126c53f489fd5554ea21e7684244a93c1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1cc20d181bdee1131bf2eb191e7f8fe4e4927e03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d340459e7cd7b4ec9e7ae0e5166ad8879d22bdf7) (cherry picked from commit 025c130c1ed67b9dbd96cacac2de80e90ea07e1b)
| * Check if QQuickFileDialogImplPrivate::options is null before derefEirik Aavitsland2023-12-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | A recent fix introduced an unchecked deref of d->options. No problem has been observed, but all other usages in this file are guarded, so avoid introducing a potential crash. Change-Id: I3602808c42094d24ba08d32612af3d3e95e90279 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> (cherry picked from commit 8ba21bb39fdb92de889c3ba5f3bc10428576a5f3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d92f73f7684f2965244409f0cd6912fb89721c5b) (cherry picked from commit 8d006425f80aaae1d089bd607a55449ca3ab40a9)
| * Fix default button label for non-native file dialog in SaveFile modeEirik Aavitsland2023-12-141-1/+3
| | | | | | | | | | | | | | | | | | | | It would use the OpenFile label independently of actual mode. Fixes: QTBUG-105080 Pick-to: 6.6 Change-Id: Ia529f6854dd676197af99cbe0a610f5833181ce2 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> (cherry picked from commit 9184766ea929de23099da73366d99652c01a724f)
* | Revert "Update commercial SPDX-License-Identifier"Tarja Sundqvist2025-01-031-1/+1
|/ | | | | | | | | | This reverts commit da5933f22c00270ac9083a089686e5c54e0057da. Revert of commercial SPDX license identifiers is required for the Qt 6.5.x opensource releases, Qt 6.5.4 onwards. Change-Id: Ic056fb761f242af0ec4c883ecb35d50804c1c67c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update commercial SPDX-License-IdentifierTarja Sundqvist2023-10-231-1/+1
| | | | | | | | | | Updated the commercial SPDX-License-Identifier to the files in tqtc-qtdeclarative. Examples, tests, or documentation files were not updated. Task-number: QTQAINFRA-5900 Change-Id: I74e2ac15b270b503edc80369b126913dd2ec33e1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-011-0/+758
Qt Quick Controls 2 was named that way because it was a follow-up to Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer supported, we don't need to have "2" in the name. Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. By doing this renaming a few weeks before feature freeze, it won't affect the release but still results in as little time possible spent manually fixing conflicts in cherry-picks from non-LTS releases as a result of the renaming. This patch does the following: - Renames directories. - Adapts CMakeLists.txt and other files to account for the new paths. A follow-up patch will handle documentation. It does not touch library names or other user-facing stuff, as that will have to be done in Qt 7. Task-number: QTBUG-95413 Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>