selectedFile can represent the currently-selected file (if the platform
supports it), and so we can free up "currentFolder" for FolderDialog
now that it means the folder that is being displayed, rather than the
folder that is currently selected.
[ChangeLog][QtQuickDialogs] FileDialog's currentFile and currentFiles
properties have been deprecated. The selectedFile and selectedFiles
properties now refer to the currently selected file(s), as well
as the final selection.
Fixes: QTBUG-98562
Task-number: QTBUG-87798
Change-Id: Ic66481332338f21169a9f63617cf4db4be83265d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 13399bd54d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This option doesn't make sense for FolderDialog, and was likely an
oversight in the original Qt.labs.platform version.
Task-number: QTBUG-87798
Change-Id: Ia97b6d208ec9344f071a93e36387de804cddb283
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit dbf207116e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was documenting the old behavior.
Task-number: QTBUG-87798
Change-Id: I2ba3ce1e10b777d8b1e18a8d7f2553cd47ff5a53
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 080c848491)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike FileDialog, which requires name filters to be in the footer
alongside the DialogButtonBox, FolderDialog only has one item in its
footer: DialogButtonBox. Simplify the code (and also avoid calling
some signal-connected functions twice) by removing this attached
property and let QQuickDialog take care of the plumbing.
Task-number: QTBUG-87798
Change-Id: I68e83732a551b21b974de5c4e1b419030c6c9740
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit fb580219e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 7d22d32dc0
We need to apply the same idea to QuickDialogs2QuickImpl it seems
Task-number: QTBUG-86533
Pick-to: 6.2 dev
Change-Id: Ib7d11c196659aa16ab7a8cda1a199c6b1c7179f9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
While we're at it, correct the values of some properties
we're setting on FolderListModel.
Task-number: QTBUG-87798
Change-Id: I61d40c84e6ee8784cb2c27f90b6aaffc9976311c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 7dcffc2e54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apparently CMake does not consider link dependencies brought via
INTERFACE_LINK_LIBRARIES as implicit dependencies to be added to
IMPORTED_LINK_DEPENDENT_LIBRARIES.
This means CMake won't add an -rpath-link flag when we expect it to,
leading to some tests failing to link when cross-compiling.
Until we figure out if our assumption is wrong or it's a bug in CMake,
fix the issue by linking explicitly to a few more dependencies
and thus force the addition of those dependencies to the
IMPORTED_LINK_DEPENDENT_LIBRARIES property of the generated
QtFooTargets.cmake files.
The issue was always there, but it got triggered recently in the CI
because 701294e3624fd76db2e71c2f620feafc59bda350 landed in qtbase
in conjunction with a submodule dependency update.
Task-number: QTBUG-86533
Fixes: QTBUG-99275
Change-Id: I89a87c6cca5d7ae6c04e7f672ee606444452391a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 7d8f0ade0b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qquickfiledialog.cpp:
* Can't link to '[QtCoreQml]StandardPaths'
qquickfolderdialog.cpp:
* Can't link to 'folder
qquickmessagedialog.cpp:
* Undocumented parameter 'button' in MessageDialog::buttonClicked()
* Undocumented parameter 'role' in MessageDialog::buttonClicked()
qquicktreeviewdelegate.cpp:
* Can't link to 'QQuickItem::x position'
* Can't link to 'QQuickControl::rightMargin'
* Can't link to 'indicator'
qquicktreeview.cpp
* Unknown macro 'c'
Change-Id: I717030b5be45e716b719aa9a59fe7d7a47f11ddb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 52402e6522)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtQuickDialogs] Added FolderDialog. This is a native
FolderDialog on platforms that support it, and a non-native
Qt Quick FolderDialog on platforms that don't.
Task-number: QTBUG-87798
Change-Id: I95d872f450b528e54dd26f5421b6c5a4b71a9bc3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
[ChangeLog][QtQuickDialogs] To make the font dialog's API consistent with the file and folder
dialog, we're deprecating the "currentFont" property and replacing it
with the "selectedFont" property, which previously was used as the final
selection made by the user.
By the time the user accepts the dialog, the currentFont and
selectedFont had the same value anyways. So if the application needs to
react "live" to which font the user is selecting, they can now simply
bind to the selectedFont property, and if the application only wants to
update a font when the user accepts the dialog, they can handle the
accepted signal, and read from the selectedFont property in the signal
handler.
Fixes: QTBUG-98563
Change-Id: I744bb421a466748d41e5e9c6fd6978c45601984c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
[ChangeLog][QtQuickDialogs] Added MessageDialog. This is a native
MessageDialog on platforms that support it, and a non-native
Qt Quick MessageDialog on platforms that don't.
Fixes: QTBUG-87800
Change-Id: I5e7c7afb0bfeb1c84b67f36712b0ed2d5df75ecb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This matches what Windows, macOS, and Linux do.
Fixes: QTBUG-73633
Pick-to: 6.2
Change-Id: Ibf20acda17ab65b48599b3936bef7679375060d9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
macOS shows files amongst directories instead of after them.
Change-Id: Ib21918611eed59936dccd694540bc426752729fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
For the non-native implementation of the QQuickFontDialog, when the qml
user assigns a new font to the currentFont property, the list view
indexes should be changed to point the family, style and pointSize of the
new font.
In cases where the family, style or size of the new font exists in
the model for the representing listview, the index for that listview should
be updated to the new value, or 0 if the value isn't found, or -1 if the model
is empty.
Fixes: QTBUG-96934
Pick-to: 6.2
Change-Id: Ia7bb11d01c4a0807d0df742f34bd8aefb00104f6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Replace the hardcoded cpp exports with a generated one where it's
applicable.
Task-number: QTBUG-90492
Change-Id: I4af021bf828e05c8d6f3f975befd3b6b2cf63462
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
And in case of QtQuick.Controls::Popup::anchors.centerIn it was an Item.
Change-Id: I2ad7ac6969b729711138390de4efe8d6509dcc5e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
C++20 deprecated the implicit capture of `this` when a lambda just
captures [=], so we must stop relying on that. Adding `this` to such
a capture list works in C++20, but it's illegal in C++17 (d'oh).
Hence, turn these captures into capturing (by value) what they need.
Pick-to: 6.2
Change-Id: I67fc1572b68dec9d3bdb78da3e03471970b9ce12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Referencing GroupBox by id rather than by parent.
Pick-to: 6.2
Change-Id: Idf5eb767539074e070a4c20336bcfa26b4e480a6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
- Always set the text edit's text to the current directory, not the
selected file. This matches the expected behavior of a file dialog.
- Fix an issue where the text edit's visibility was toggled twice,
resulting in it showing up on top of the breadcrumbs when it
shouldn't.
The latter issue was found while fixing the former, and they are
both tested by the same auto test.
Change-Id: I8f1420ec9edaba1e33f1d1a268567a45d63d76b5
Pick-to: 6.2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
customFilters defined in .qdocconf are not supported anymore by Qt
Assistant since Qt 5.13. Therefore remove them from all .qdocconf files,
also to avoid cargo-culting them to new help modules.
Task-number: QTBUG-95987
Change-Id: Id17e9c73093aea87d66d13454cbfe9172916fb37
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Refer to correct types in Window QML type docs.
* Fix link target for 'Required properties'.
* Fix other minor issues.
Pick-to: 6.2
Task-number: QTBUG-95860
Change-Id: Icc2819a18ad8cfc44d39f13b22c595ed7b2f0806
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
An error was reported for static builds:
[...]libQt6QuickDialogs2QuickImpl.a(mocs_compilation.cpp.o):(.data.rel.ro.local._ZN27QQuickFileNameFilterForeign16staticMetaObjectE+0x0): multiple definition of `QQuickFileNameFilterForeign::staticMetaObject'; [...]libQt6QuickDialogs2.a(mocs_compilation.cpp.o):(.data.rel.ro.local._ZN27QQuickFileNameFilterForeign16staticMetaObjectE+0x0): first defined here
This patch attempts to fix it by giving each foreign struct a different
name.
Pick-to: 6.2
Change-Id: I1b859ad1ec7b0ce82b40a1fa5a74ceb219841bf3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The Qt6QuickControls2 package did not get a Dependencies.cmake file
generated to call find_package(Qt6Quick) because Quick was removed
from the PUBLIC_LIBRARIES section of the Qt module definition.
Same for the other controls Qt modules and their dependencies.
Those were incorrectly removed with the idea that they were plugin
targets which don't have public dependencies, but that's not the case,
they are Qt modules, not plugins.
Restore the public library dependencies, so that transitive
find_package'ing works.
Amends 9c30798a43
Pick-to: 6.2
Fixes: QTBUG-95532
Change-Id: Ie2cb69cdde5585e90a5ce97a6d3666a647daef40
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
These changes are subjective, and might not be seen as an improvement by
everyone.
Personally, I felt that some space could be removed between the text
fields and list views for the material style, and between the list
views and group boxes for the universal style.
Task-number: QTBUG-87799
Pick-to: 6.2
Change-Id: I2a94caaa2304ccef0c9709bbfe9a0cd9b56e2034
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
For auto-generated plugins we don't need the declarations.
Pick-to: 6.2
Change-Id: I0250703e7c81debc6bc6ca526722c43b8a8058c8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
- Specify preferredHeights directly on the items that need them rather
than doing it at a higher level. This makes the lower row with the
text edits and check boxes shorter, giving more space to the row with
the list views.
- Convert the ColumnLayout containing the check boxes into a RowLayout
to save vertical space.
- Add some spacing and padding where necessary now that everything is
more compressed.
Task-number: QTBUG-87799
Pick-to: 6.2
Change-Id: Iba288f678c1d449ace3bc143073d216fe69d9d9a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The pro2cmake.py conversion script faithfully reproduced the .pro files
for the plugins, which specified the libraries as public. But in CMake,
the implications of this are that public usage requirements should then
be propagated to consumers. We don't expect any consumers, since a
plugin is created as a MODULE library in CMake, so for Windows we don't
even have an import library to link with. The only exception to this is
for static builds where plugins are created as STATIC libraries
instead, but only in certain controlled situations do we then link to
plugins. Even then, usage requirements are not expected to propagate to
the consumers, so these relationships should always be specified as
private.
As a drive-by fix, remove Qt::Foo dependencies that are already implied
by Qt::FooPrivate.
Pick-to: 6.2
Task-number: QTBUG-90819
Change-Id: I3f33766612367520e09e599f03ac06d43613aa81
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The source files in Qt Quick Dialogs should now have a copyright header
that mentions they are indeed a part of the Qt Quick Dialogs module.
Pick-to: 6.2
Change-Id: I855edbca61f8e5c2a08dea50b5c70f1cdb3f996f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The new qml CMake API places a closer relationship between
the backing target and the plugin target. Both are typically
created together and they share a lot of common details.
Instead of creating them in different parts of the source
tree, they are now specified together. The src/imports
area has effectively been absorbed into the other
corresponding subdirectories below src with this change.
Task-number: QTBUG-91621
Change-Id: I9bd32e9eb78c198ccc9db04e2829303cac323502
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Adding non-native FontDialog to QtQuick.
This is a native FontDialog on platforms
that support it, and a non-native
Qt Quick FontDialog on platforms that don't.
Fixes: QTBUG-87799
Change-Id: I43a59e3668a8a40f1d0c04a3c2506283d552a22b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This prevented the function from being exported if something actually
tried to use it. At the moment, no other file is including the affected
header (that is a separate bug in qmltyperegistrar), which is why the
build wasn't failing despite the typo.
Change-Id: Ia9b266c4f5a42326932344e49bea228fd36ebb65
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
[ChangeLog][QtQuickDialogs] Added FileDialog. This is a native
FileDialog on platforms that support it, and a non-native
Qt Quick FileDialog on platforms that don't.
Fixes: QTBUG-87797
Change-Id: Ia3a98b616479b818c96c232a0329750023079642
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>