aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickdialogs/quickdialogsquickimpl/qquickfiledialogdelegate.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Set explicit default security level of all files with default securityJan Arve Sæther2025-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The files (folders) already processed are listed in each issue in epic QTBUG-134547 These files were processed half a year ago. In order to make it clear that all of these files are already processed, mark them with an explicit default security header. For the record, this was generated with this script: find -E . -regex ".*\.(cpp|h|hpp|mm|qml|js)$" | xargs python3 ~/bin/add-cra-header.py in the folders listed in each subtask of QTBUG-134547 (add-cra-header.py only exist at my desktop, but it simply adds the default security header if it doesn't already have any existing security header) QUIP: 23 Fixes: QTBUG-134547 Pick-to: 6.10 6.9 6.8 Change-Id: Ieb8c78ea6561fdbdd27c7b13185ece853eedf80f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* QQuickDialogs: fix dark mode in SideBarIvan Solovev2025-06-131-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch explicitly sets the colors from the palette for some of the elements of the SideBar. It also removes the usage of Basic.darkShade color, which is not available in general case, replacing it with the palette.dark color. A more complicated problem was related to the icons in buttonDelegate and addFavoriteDelegate, that were not updating their colors. The reason for that was that the unrelying C++ code was constructing the delegates using QQmlComponent::createWithInitialProperties(), and passed a QQuickIcon object as one of the properties. As a result, the original binding on icon.color was removed. To keep the binding, construct the components with a default icon, then manually set the source and the size. This approach is slower, but it allows to preserve the original binding from the QtQuick Button component. Last affected element was the drag pixmap, which was always using the original color. Use the buttonText() palette color to update all the non-transparent pixels of the icon before using it in the drag. Fixes: QTBUG-122738 Pick-to: 6.10 6.9 Change-Id: Ibf4182b1c5a631fe7043e8d76ed98629c69ab4d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add context menu to remove custom favorites in the SideBarJan Arve Sæther2025-01-241-1/+1
| | | | | | | | Follow-up to 0b1e5c45de264bf7b62e074c50aba0acb3f157f8. Pick-to: 6.9 Change-Id: I287ca7b068bf7d89df98bbf77574ebfedefafeff Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Add drag and drop to the QtQuick Dialogs SideBarEd Cooke2025-01-031-20/+263
| | | | | | | | | | | | | | | | | | | | | | | The current SideBar implementation for the QtQuick Dialogs non-native FileDialog has a SideBar containing supported standard paths. This patch adds support for adding favorites to the SideBar, that can be added by dragging a directory into the SideBar. Each FileDialogDelegate contains a QQuickTapHandler which listens for a long press. When long pressed, the delegate can be dragged. A long press is used to initiate the drag as the delegates are part of a Flickable. The drag and drop is a system drag and drop. If the dragged delegate is a directory, the drag is started. When the dragging enters the SideBar, a delegate appears with 'Add Favorite' text, to suggest to the user that this is the drop area. The context menu used for removing a favorite is a QQuickContextMenu, which handles the context menu event internally. Pick-to: 6.9 Change-Id: Icf60f3785522df607ed1f7420486da4318118f0f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* FileDialog: prompt the user when selecting an existing fileOliver Eftevaag2023-12-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.7 6.6 6.5 Change-Id: I07710a7126c53f489fd5554ea21e7684244a93c1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-011-0/+152
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>