summaryrefslogtreecommitdiffstats
path: root/src/plugins/platformthemes
Commit message (Collapse)AuthorAgeFilesLines
* Add PreselectFirstFileInDirectory platform theme hintMitch Curtis2022-01-071-0/+2
| | | | | | | | | | | | This allows Qt Quick Dialogs to accurately check whether it should select the first file in a directory when a file dialog is opened. While we're here, fix an incorrect version on the last theme hint that was added. Task-number: QTBUG-98562 Change-Id: I08cc8a0fbed28a42d1212016c6ee7fc5459578bf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QGtk3Theme: implement appearance function to detect dark themesMitch Curtis2021-10-112-0/+44
| | | | | | | | | | | This allows Qt Quick Controls to detect if a dark theme is in use, and if so, use a dark theme of the current style (if available). Fixes: QTBUG-93955 Pick-to: 6.2 Change-Id: I15fc8a2271acf9ba27232359056d5a681d4cffca Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Implement preview support for GTK file dialogIlya Fedin2021-09-292-0/+43
| | | | | | | | | | | | | | | This adds preview support in GTK file dialog implementation, this is helpful for a lot of applications like image viewers, messengers and etc. [ChangeLog][Platform Specific Changes][Linux] A native GTK file dialog (created via QFileDialog or QtQuick.Dialogs) now shows an image preview pane. Task-number: QTBUG-3796 Task-number: QTBUG-53167 Change-Id: Ib80108c09b84d774440a0445adcccab4b64652ef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix memory leakJiDe Zhang2021-09-292-0/+2
| | | | | | | | | Destroy the QDBusPendingCallWatcher object when received the QDBusPendingCallWatcher::finished signal later. Pick-to: 5.15 6.2 Change-Id: I1ec67bf7c286f38200c374ad92df2a1579588a8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-062-2/+2
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* FileChooser portal: send window id in hexJan Grulich2021-03-081-1/+1
| | | | | | | | | We send window id in decimal, however, it is expected to be send in hex. This causes a mismatch and makes portal dialog to show in background. Pick-to: 5.15 6.0 6.1 Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-242-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-27/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove QtDBus includesDavid Skoland2021-01-121-3/+3
| | | | | | | | | | | | | | Per the discussion of QTBUG-88831, we determined that module-wide imports are unfortunate, especially for compile times. Following this, all QtDBus includes have been replaced with the headers for the classes actually used in each file. Additionally, some cleanup of header file order and format has been performed in the changed files. Pick-to: 6.0 Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-073-46/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QFont: Prefer setFamilies() over setFamily()Andy Shaw2020-11-201-1/+1
| | | | | | | | | | | | | | | | By depending on setFamilies() then we can be sure that font names with spaces, commas, quotes and so on are correctly handled without being misinterpreted. For now it will split on the comma when a string containing one is passed to setFamily. But from Qt 6.2 this will be removed to preserve the family string as a convenience function. [ChangeLog][QtGui][QFont] Indicated that setFamilies/families is preferred over setFamily/family to ensure that font family names are preserved when spaces, commas and so on are used in the name. Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* CMake: Add handling of PLUGIN_EXTENDS for generic pluginsAlexey Edelev2020-11-093-0/+3
| | | | | | | | | | Modify pro2cmake converter to add extra argument to qt_internal_add_plugin. DEFINE_IF FALSE is added to generic plugins those had "PLUGIN_EXTENDS = - " specified in .pro files. Fixes: QTBUG-87861 Change-Id: I9269df19a32a088f5261f50e7ffff6d29c3d605f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* FileChooser portal: skip empty filters to avoid rejection from portalsJan Grulich2020-10-121-0/+5
| | | | | | | | | | Xdg-desktop-portal will reject any OpenFile request if there is an empty filter. We will just simply skip it to avoid the rejection so users get a file dialog. Pick-to: 5.15 Change-Id: I85c056f46b22cdbc9e14010bc3c49206b6f8f002 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* xdgdesktopportal: properly fix a dangling pointerGiuseppe D'Angelo2020-10-061-6/+5
| | | | | | | | | | | | | | | | The previous fix didn't actually work, as it kept a reference into a container which could have been muted by the time the reference was going to be used. Use an index instead. Amends 32c09ea5b0f529418eece63de5c3b2c206f62896. Change-Id: Ib855b4a663c281467e46536b98a0ce2b961f19ee Pick-to: 5.15 Task-number: QTBUG-87143 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compiler warnings from QKeyCombinationLars Knoll2020-09-281-2/+2
| | | | | | | | Change lots of code to avoid the deprecated operator+() or implicit casts to int. Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use OpenType font weightsJonas Karlsson2020-08-281-2/+1
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* xdgdesktopportal: Avoid dangling pointerMichael Weghorn2020-08-201-2/+2
| | | | | | | | | | | | | | | | Use pointer to newly inserted element in 'filterList' since local variable 'filter' goes out of scope at the end of the block. This is a follow-up for commit 3e09c28101d1af1dd90a4b515d7edbe5a3737f97 ("Filechooser portal: Implement "current_filter"). Thanks to Giuseppe D'Angelo for pointing this out in that commit's Gerrit change. Pick-to: 5.15 Change-Id: I9af35c46315c7f90721d0d39b0fda6384c15786a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Filechooser portal: Implement "current_filter"Michael Weghorn2020-08-102-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds supports for setting and retrieving the selected MIME and name filter for 'QXdgDesktopPortalFileDialog'. For preselecting a filter [1]: > current_filter (sa(us)) > > Request that this filter be set by default at dialog creation. If > the filters list is nonempty, it should match a filter in the list > to set the default filter from the list. Alternatively, it may be > specified when the list is empty to apply the filter > unconditionally. The "current_filter" return value was added in xdg-desktop-portal commit [2]. [1] https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.portal.FileChooser [2] https://github.com/flatpak/xdg-desktop-portal/commit/35fca7fae881bdaba1bebccf7775eba84407a488 Fixes: QTBUG-85658 Pick-to: 5.15 Change-Id: I8651c1a8942dfd358895b7826730729c4d22e680 Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-062-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate rest of projects under src/Alexandru Croitor2020-07-031-1/+1
| | | | | Change-Id: I7d7692306a80deb9e8d2a90454dad4b39320f380 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move UNIX themes into QtGuiFriedemann Kleint2020-06-225-5/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: I9e3aecd8e172b60121f472c840eaf2a5538af438 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make sure we correctly construct underlying base platform themeJan Grulich2020-06-161-1/+1
| | | | | | | | | | When the base platform theme is not set to a null pointer, then we might assume it has been already constructed and later on try to access an invalid address which will cause a crash. Pick-to: 5.15 Change-Id: I6187336bca527e1feeb0902bcfb16f2fbec86d24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QAbstractFileIconEngine into QtGuiTor Arne Vestbø2020-06-032-2/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-05-182-1/+30
|\ | | | | | | | | | | | | Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
| * Support opening directories over portalJan Grulich2020-05-142-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | Recent version of xdg-desktop-portal got support for opening directories through the portal, which means we no longer need to rely on opening the dialog inside sandbox, hoping we have permissions to user directories. [ChangeLog][Linux] QFileDialog will open directories through the portal if required version of xdg-desktop-portal is running on the system. Change-Id: Ifc9035e268f1cc8d9d6a93480e651e0d9e1e9929 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-273-3/+3
| | | | | | | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | 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>
* | Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-053-15/+10
| | | | | | | | | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Regenerate plugin projects to get new target namesAlexandru Croitor2020-01-273-9/+9
| | | | | | | | | | | | | | | | | | And also to get the original output names (qmake's "TARGET"), so that the plugin file names are as they were in Qt 5. Change-Id: I96a060d1a81693652847857372bec334728cb549 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-245-13/+13
|\| | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Tidy nullptr usageAllan Sandfeld Jensen2019-12-064-12/+12
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Regenerate src/*Alexandru Croitor2019-11-143-3/+3
| | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate everything under ./srcAlexandru Croitor2019-11-123-3/+0
| | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Regenerate platformthemes pluginsAlexandru Croitor2019-10-084-15/+52
| | | | | | | | | | | | Change-Id: I1073bcc5467c345a4d6889a6bf5ba2ab484db050 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | cmake: Add missing CLASS_NAMEAlbert Astals Cid2019-10-031-0/+1
| | | | | | | | | | | | Change-Id: I5853578f427ae1d1b32ee5405694c216e2dd17cf Reviewed-by: Qt CMake Build Bot Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Add some missing CLASS_NAME values to pluginsAlexandru Croitor2019-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This substantially decreases the number of warnings when doing a Qt static build with examples. This is a quickfix modifying the relevant files directly. A proper fix will follow that regenerates the whole files. Change-Id: I2a3cc2c4ea02b3412beb96f7b4be9d43365a460d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-164-5/+10
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * More nullptr usage in headersKevin Funk2019-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-262-0/+4
| |\ | | | | | | | | | Change-Id: Id511850002d9274d17891c063376ac4b3ff939dd
| | * qtlite: Fix build the source code with -no-feature-shortcutMikhail Svetkin2019-02-252-0/+4
| | | | | | | | | | | | | | | Change-Id: If47149466a5da901e3eb6e6f2dcfb0a7816bc60b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-221-2/+3
| |\| | | | | | | | | | Change-Id: I9e7cb1b131b7b216aad8ed1b1536669fd1557c21
| | * Properly convert filename to bytearray when sending over portalJan Grulich2019-02-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | We should be using QFile::encodeName() to properly convert filenames from string to bytearray. This takes user's locale into account. Change-Id: I090f73f21feb73af166e88baa0e7f4a595cdb25b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-121-1/+1
| |/ | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Add terminating character when sending byte arrays in FileChooser portalJan Grulich2018-10-311-2/+2
| | | | | | | | | | | | | | | | | | Terminating character is needed for gtk portal backend, which is not able to contruct a string without it and thus not able to pre-select a file or a directory in file dialog. Change-Id: I5b40fb1ce584936fc92e93f38dc8559890852d99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "mimetype" featureLiang Qi2018-10-121-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | cmake: enable the xdgdesktopportal pluginAlbert Astals Cid2019-02-112-1/+22
| | | | | | | | | | | | | | | Change-Id: I97454ea918e3b34ca8a33bf221bcf9a0f5fa56f8 Reviewed-by: Liang Qi <liang.qi@qt.io>