summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix
Commit message (Collapse)AuthorAgeFilesLines
* dbusmenu: Skip registration with the registrar on WaylandVlad Zahorodnii2025-04-111-14/+19
|||||||||||||||||| The RegisterWindow request expects a window id. The QDBusMenuBar uses the QWindow::winId() property for that. On X11, the winId() returns the XID of the window. On Wayland, the winId() returns an integer that has meaning only to the application, there are no global window ids on Wayland. The menubar should be registered using other means, for example using the kde-appmenu protocol, which QtWayland already does. The QDBusMenuBar can skip synchronously calling the RegisterWindow request on Wayland because the menu will be registered using a different api. Pick-to: 6.9 Change-Id: I6b2968624c5c9ddbdc93807f65eac369dc7a993a Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QGnomeTheme: Prevent leak of QDBusPendingCallWatcherDavid Redondo2025-04-102-3/+4
|||||||| Otherwise the watcher can outlive the theme and the connected lambda calls into the already destroyed theme. Change-Id: I55e7834d1eb806d9f5f1945a4e1016d14b2969b6 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Remove double negation ifdefs in QKdeThemeAxel Spoerl2025-04-072-10/+10
||||||| Replace ifndef QT_NO_DBUS antipattern by if QT_CONFIG(dbus). Change-Id: I186c779f3c4ed36a1fb082993e792e9c28ee20f0 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove double negation ifdefs in QGnomethemeAxel Spoerl2025-04-072-14/+14
||||||| Replace ifndef QT_NO_DBUS antipattern by if QT_CONFIG(dbus). Change-Id: I7dd44a6f5496e6f12c16ee1ecef3a004e5580d17 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove double negation ifdefs in QGenericUnixThemeAxel Spoerl2025-04-072-12/+12
||||||| Replace ifndef QT_NO_DBUS antipattern by if QT_CONFIG(dbus). Change-Id: Ifca080594358df0d836db25721b43ad31129cf48 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* GnomeTheme: Add missing QtDBus includesMichael Weghorn2025-03-301-0/+3
||||||||||||||||||||||||||||||||||||||||||||||| This fixes the following build error seen in a local -no-pch Clang 19 build: [1677/16903] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o FAILED: qtbase/src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o /usr/bin/ccache /usr/bin/clang++ -DENABLE_PIXMAN_DRAWHELPERS -DGui_EXPORTS -DMD4C_USE_UTF8 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_GUI_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_NO_STD_FORMAT_SUPPORT -DQT_NO_USING_NAMESPACE -DQT_QPA_DEFAULT_PLATFORM_NAME=\"xcb\" -DQT_STRICT_QLIST_ITERATORS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -D_GLIBCXX_ASSERTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/michi/development/git/qt5/qtbase/src/gui/Gui_autogen/include -I/home/michi/development/git/qt5/qtbase/include -I/home/michi/development/git/qt5/qtbase/include/QtGui -I/home/michi/development/git/qt5/qtbase/src/gui -I/home/michi/development/git/qt5/qtbase/src/gui/../3rdparty/VulkanMemoryAllocator -I/home/michi/development/git/qt5/qtbase/src/gui/../3rdparty/D3D12MemoryAllocator -I/home/michi/development/git/qt5/qtbase/include/QtGui/6.10.0 -I/home/michi/development/git/qt5/qtbase/include/QtGui/6.10.0/QtGui -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/home/michi/development/git/qt5/qtbase/src/gui/../3rdparty/md4c -I/home/michi/development/git/qt5/qtbase/include/QtCore -I/home/michi/development/git/qt5/qtbase/mkspecs/linux-clang -I/home/michi/development/git/qt5/qtbase/src/corelib -I/home/michi/development/git/qt5/qtbase/include/QtCore/6.10.0 -I/home/michi/development/git/qt5/qtbase/include/QtCore/6.10.0/QtCore -I/home/michi/development/git/qt5/qtbase/include/QtDBus -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -D_GLIBCXX_DEBUG -g -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fPIC -Werror "-Wno-error=#warnings" -Wno-error=deprecated-declarations -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-copy-with-user-provided-copy -Wno-error=unused-but-set-variable -fcf-protection=full -ftrivial-auto-var-init=pattern -fstack-protector-strong -fno-exceptions -pthread -MD -MT qtbase/src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o -MF qtbase/src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o.d -o qtbase/src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o -c /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:41:32: error: incomplete type 'QDBusMessage' named in nested name specifier 41 | QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), | ^~~~~~~~~~~~~~ /home/michi/development/git/qt5/qtbase/src/dbus/qdbusconnection.h:34:7: note: forward declaration of 'QDBusMessage' 34 | class QDBusMessage; | ^ /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:41:22: error: variable has incomplete type 'QDBusMessage' 41 | QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), | ^ /home/michi/development/git/qt5/qtbase/src/dbus/qdbusconnection.h:34:7: note: forward declaration of 'QDBusMessage' 34 | class QDBusMessage; | ^ /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:47:9: error: no template named 'QDBusReply' 47 | QDBusReply<QVariant> reply = dbus.call(message); | ^ /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:66:9: error: unknown type name 'QDBusPendingCallWatcher'; did you mean 'QDBusPendingCall'? 66 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(dbus.asyncCall(message)); | ^~~~~~~~~~~~~~~~~~~~~~~ | QDBusPendingCall /home/michi/development/git/qt5/qtbase/src/dbus/qdbusconnection.h:35:7: note: 'QDBusPendingCall' declared here 35 | class QDBusPendingCall; | ^ /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:66:48: error: unknown type name 'QDBusPendingCallWatcher'; did you mean 'QDBusPendingCall'? 66 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(dbus.asyncCall(message)); | ^~~~~~~~~~~~~~~~~~~~~~~ | QDBusPendingCall /home/michi/development/git/qt5/qtbase/src/dbus/qdbusconnection.h:35:7: note: 'QDBusPendingCall' declared here 35 | class QDBusPendingCall; | ^ /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qgnometheme.cpp:66:48: error: allocation of incomplete type 'QDBusPendingCall' 66 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(dbus.asyncCall(message)); | ^~~~~~~~~~~~~~~~~~~~~~~ /home/michi/development/git/qt5/qtbase/src/dbus/qdbusconnection.h:35:7: note: forward declaration of 'QDBusPendingCall' 35 | class QDBusPendingCall; ... Change-Id: I40bc994f7af3dd5a314d051018991d81087844b4 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* GnomeTheme: read the initial color-scheme value from dbusOliver Eftevaag2025-03-281-18/+39
|||||||||||||| The initial color-scheme value was never initialized, and would thus, always be 'Unknown', until the user changes the color scheme in the system settings. The xdg settings portal method ReadAll is currently omitting the contrast setting from the reply. Because of this, two separate dbus calls are necessary to get both the initial color-scheme and contrast setting. Change-Id: Ie32371efd830e19727922efd2c9c32595395d11a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add virtual member QPlatformTheme::contrastPreference()Oliver Eftevaag2025-03-285-12/+70
||||||||||||||||| This function can be overridden by individual platform themes, in order to read contrast settings from the platform's system settings, and report the result back to Qt. This information is relevant for our styles, and can be used to determine color palette values, and additional elements like outline thickness for controls/widgets. Currently only the Windows, macOS, Gnome and Flatpak themes support this feature. Task-number: QTBUG-133595 Change-Id: I3aff519aa7f07c8b2fdcc1e7fb35ec719ab8efcc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QDesktopUnixServices: don't leak the QDBusPendingCallWatcherMarc Mutz2025-03-282-3/+6
||||||||||||||||||||| When, like in tst_QApplication::qtbug_103611(), a QApplication object is destroyed without calling exec(), then QDesktopUnixServices leaked its QDBusPendingCallWatcher, because the connection to the slot that would deleteLater() the watcher was disconnected, and the watcher had no QObject parent that would otherwise reap it. Fix by actually deleting the watcher in ~QDesktopUnixServices(), if it still exists (which implies disconnecting, of course). This makes tst_QApplication asan-clean on Linux/X11 (was: "75466 bytes leaked in 965 allocations"). Amends de609d84b9cee4a481d1718c00b09105d8c2ae69. Pick-to: 6.9 6.8 6.5 Change-Id: I28a08abdb1be65a8746702ad304282de4e1100d7 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QGenericUnixTheme: Fix build w/o xcb and waylandAxel Spoerl2025-03-271-3/+4
||||||||| Add ifdef condition to consider QKdeTheme only if Qt is built either with wayland or xcb. Fixes: QTBUG-135204 Change-Id: I27941bf6bd576c1532ac23992c1c94f9ace53683 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Correctly name pragma macro in qgenericunixtheme_p.hAxel Spoerl2025-03-251-3/+3
||||||||||| It was forgotten to rename the macro from plural to singular. Fix it. Amends 53fb13456fffe8bfd192f9197c6d1703854b49a2. Task-number: QTBUG-132929 Change-Id: I76def400324ae47e61528e62f8589c05c5b3e4e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QKdeTheme: de-inline dtor; make ctor explicitMarc Mutz2025-03-242-1/+5
|||||||||||||||||||| 1/ A QStringList and an int are not a faithful representation of a KDE Theme, so the ctor should be explicit. Make it so™. 2/ As a polymorphic class, the (undeclared, therefore inline) dtor may cause weak vtables to be emitted, with all the bad side-effects described in the docs of -Wweak-vtable and QTBUG-45582. Mark the dtor out-of-line in the usual way (= default'ing, but in the .cpp file). Amends 53fb13456fffe8bfd192f9197c6d1703854b49a2. Task-number: QTBUG-45582 Task-number: QTBUG-132929 Task-number: QTBUG-135037 Change-Id: Ie0c14e60d76d2205c2025598ac31a917dbf870b1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QKdeTheme: Don't leak resources on shutdownFabian Kosmale2025-03-211-0/+1
|||||||||||| The theme stores an array of pointers to allocated QFonts, which need to be freed. While this is not a "hard" leak (the OS will clean up the memory on shutdown, and QKdeTheme lives as long as the application), it creates ASAN warnings, which distract from more severe issues. Change-Id: Iaa57138e5273c300c616ba85340283f18a267b09 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* QDBusListener: remove ChangeSignal's defaut ctorMarc Mutz2025-03-212-3/+3
|||||||||||||||||||||||||||| Coverity complained that the default ctor didn't initialize its two members. This is true, and it even remains true if the user of the type explicitly asks for value-initialization (ChangeSignal s = {}) as opposed to default-construction (ChangeSignal s;). Remove the default ctor as the minimally-possible fix. It was only needed because of a call to QFlatMap::value(1-arg), which, incidentally, constitutes a double-lookup, because it is following a contains() call. Replacing that combo with find() and it.value() avoids the double-lookup and removes the need for the type to be default-constructible. Amends 0328e4297e339de8a2acd84979c667936f6fadf8. Coverity picked this up as a new issue following 53fb13456fffe8bfd192f9197c6d1703854b49a2, so there probably is another CID for this for the same code in the old location, but my Coverity search-foo is insufficient to find the corresponding CID, without undue effort, so I didn't try. Coverity-Id: 478089 Pick-to: 6.9 6.8 6.5 Change-Id: I912bf2af343b98fe62faf2d4bf8a6d1f385593e8 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QGenericUnixTheme: de-pessimise xdgFileIcon()Marc Mutz2025-03-201-1/+1
||||||||||||||||||||||||||||||| Coverity complained about a missing std::move() on the return in L270, but adding that would, of course, not help, because the QIcon object being returned is const. If NRVO would (at least theoretically) kick in, this would be harmless, but NRVO can't kick in, because it's unknown at the time of construction whether this will be the object that end up being returned to the caller, so the compiler will have to copy the object into the return value when that decision is made (post the isNull() check). By not making the object const, we enable it to be moved instead, which is what Coverity originally wanted us to do. Amends 46ea82188e3678c5b7a2338d536da6c621822f2f. Coverity picked this up as a new issue following 53fb13456fffe8bfd192f9197c6d1703854b49a2, so there probably is another CID for this for the same code in the old location, but my Coverity search-foo is insufficient to find the corresponding CID, without undue effort, so I didn't try. Not picking back, as this is a "low impact" issue, according to Coverity (and me). Coverity-Id: 478087 Change-Id: I7f36cdbe83525a23ea0dfa27157091dbdf73a28b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean up QKdeThemeAxel Spoerl2025-03-192-62/+68
|||||||||||||||| QKdeTheme used a ResourceHelper class to implement std::array of QFont and QPalette points. The latter has never been used: Only the first row was polulated with a KDE system palette. All other rows remained nullptr. Remove ResourceHelper. Make the font array a member of QKdeThemePrivate. Use a QPalette pointer member of QKdeThemePrivate instead of the obsolete array a member of QKdeThemePrivate. Task-number: QTBUG-132929 Change-Id: Ia8254182b2b824363253e2bfc71648cdfe55a403 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* Re-implement QPlatformTheme::requestColorScheme() in QKdeThemeAxel Spoerl2025-03-172-13/+46
||||||||||||||||||| QKdeTheme remained unresponsive to programmatic color scheme changes, after QPlatformTheme::requestColorScheme() had been introduced. Add functionality to QKdeTheme. Fall back to qt_fusion_palette, when the requested color scheme isn't supported by the current KDE theme (e.g. Adwaita-dark doesn't support light mode). Functionality has to be manually tested with the widget gallery example. Task-number: QTBUG-132929 Fixes: QTBUG-134023 Change-Id: I37e56cc36803dcb8527a897ddcada29b322a5ada Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* QGenericUnixTheme: Fix build, adding missing #includesThiago Macieira2025-03-123-0/+6
|||||||||||| qdbuslistener.cpp:105:5: error: ‘QJsonParseError’ was not declared in this scope qgenericunixtheme.cpp:247:21: error: invalid use of incomplete type ‘class QDBusConnectionInterface’ qkdetheme.cpp:91:109: error: ‘QSettings’ was not declared in this scope; did you mean ‘QString’? qkdetheme.cpp:712:30: error: ‘QStandardPaths’ has not been declared Probably amends 53fb13456fffe8bfd192f9197c6d1703854b49a2. Change-Id: I673a2fa3f34c162d4d76fffdf160ed8a7af1fc66 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Refactor qgeneericunixthemes_p.h/cppAxel Spoerl2025-03-119-933/+1090
||||||||||||||| Header and implementation file of QGenericUnixTheme contained several helper functions and classes. It also contained the implementation of QGnomeTheme and QKdeTheme, both of which are not generic. Split qgenericunixthemes_p.h/cpp up into separate files. Group all helpers as static member functions in QGenericUnixTheme. Inherit QGnomeTheme and QKdeTheme from QGenericUnixTheme. Task-number: QTBUG-132929 Change-Id: Idfa6198a2b7f669edd009dc165375a9b2960fcad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* QGenericUnixTheme: reduce unnecessary relocationsMarc Mutz2025-03-061-32/+35
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Instead of static constexpr QL1SV objects (which force the compiler to allocate storage for them and therefore cause relocations), use inline functions or mere automatic objects (which don't). We'd normally call the inline functions fooKey() { return "foo"_L1; }, but since one of them "foo"s ends with "Key" already, put them into a namespace instead, the name of which is taken from the comment that used to introduce the static constexpr objects in the old code. For the QL1SVs in the ctor: port them to QStringLiterals, because their only use is to pass them to a function taking const QString&, so this saves allocations. There never was a need to make these objects static, as constexpr would be enough to force the compiler to constant-fold them. Unlike my earlier advice about how to create an empty QString most efficiently, don't keep using ""_L1, use u""_s. This is because there's no shared empty QString in Qt 6 anymore. It might still make sense to add a more light-weight way to create an empty QString, esp. one which is not referencing local data, but QString::_empty, to extend the lifetime of the payload until QtCore unload time, but that is outside the scope of the current patch. Difference: qgenericunixthemes.cpp.o: - 0000000000000000 l O .data.rel.ro.local 0000000000000010 QGenericUnixThemeDBusListener::QGenericUnixThemeDBusListener()::signal - 0000000000000040 l O .data.rel.ro.local 0000000000000010 QGenericUnixThemeDBusListener::QGenericUnixThemeDBusListener()::interface - 0000000000000080 l O .data.rel.ro.local 0000000000000010 QGenericUnixThemeDBusListener::QGenericUnixThemeDBusListener()::path 00000000000000c0 l O .data.rel.ro.local 0000000000000010 QGenericUnixThemeDBusListener::QGenericUnixThemeDBusListener()::service 0000000000000000 l d .data.rel.ro.local._ZTV24QGenericUnixThemePrivate 0000000000000000 .data.rel.ro.local._ZTV24QGenericUnixThemePrivate 0000000000000000 l d .data.rel.ro.local._ZTV16QKdeThemePrivate 0000000000000000 .data.rel.ro.local._ZTV16QKdeThemePrivate 0000000000000000 l d .data.rel.ro.local._ZTV18QGnomeThemePrivate 0000000000000000 .data.rel.ro.local._ZTV18QGnomeThemePrivate 0000000000000000 l d .data.rel.ro.local._ZN13QMetaSequence12MetaSequenceI5QListIN2Qt3KeyEEE5valueE 0000000000000000 .data.rel.ro.local._ZN13QMetaSequence12MetaSequenceI5QListIN2Qt3KeyEEE5valueE 0000000000000000 l d .data.rel.ro.local 0000000000000000 .data.rel.ro.local - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener6s_rootE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener6s_rootE - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_signalsE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_signalsE - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_settingE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_settingE - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener10s_providerE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener10s_providerE - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_dbusKeyE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_dbusKeyE - 0000000000000000 l d .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener14s_dbusLocationE 0000000000000000 .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener14s_dbusLocationE 0000000000000000 l d .data.rel.ro.local._ZN9QtPrivate25QMetaTypeInterfaceWrapperIvE8metaTypeE 0000000000000000 .data.rel.ro.local._ZN9QtPrivate25QMetaTypeInterfaceWrapperIvE8metaTypeE 0000000000000000 u O .data.rel.ro.local._ZN13QMetaSequence12MetaSequenceI5QListIN2Qt3KeyEEE5valueE 00000000000000d8 QMetaSequence::MetaSequence<QList<Qt::Key> >::value 0000000000000000 w O .data.rel.ro.local._ZTV24QGenericUnixThemePrivate 0000000000000020 .hidden vtable for QGenericUnixThemePrivate 0000000000000000 w O .data.rel.ro.local._ZTV18QGnomeThemePrivate 0000000000000020 .hidden vtable for QGnomeThemePrivate 0000000000000000 w O .data.rel.ro.local._ZTV16QKdeThemePrivate 0000000000000020 .hidden vtable for QKdeThemePrivate - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener6s_rootE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_root - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_signalsE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_signals - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener14s_dbusLocationE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_dbusLocation - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_dbusKeyE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_dbusKey - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener10s_providerE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_provider - 0000000000000000 u O .data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_settingE 0000000000000010 .hidden QGenericUnixThemeDBusListener::s_setting - 0000000000000000 u O .data.rel.ro.local._ZN9QtPrivate25QMetaTypeInterfaceWrapperIvE8metaTypeE 0000000000000070 .hidden QtPrivate::QMetaTypeInterfaceWrapper<void>::metaType RELOCATION RECORDS FOR [.data.rel.ro.local._ZTV24QGenericUnixThemePrivate]: RELOCATION RECORDS FOR [.data.rel.ro.local._ZTV16QKdeThemePrivate]: RELOCATION RECORDS FOR [.data.rel.ro.local._ZTV18QGnomeThemePrivate]: RELOCATION RECORDS FOR [.data.rel.ro.local._ZN13QMetaSequence12MetaSequenceI5QListIN2Qt3KeyEEE5valueE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener6s_rootE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_signalsE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_settingE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener10s_providerE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener9s_dbusKeyE]: - RELOCATION RECORDS FOR [.data.rel.ro.local._ZN29QGenericUnixThemeDBusListener14s_dbusLocationE]: RELOCATION RECORDS FOR [.data.rel.ro.local._ZN9QtPrivate25QMetaTypeInterfaceWrapperIvE8metaTypeE]: See https://stackoverflow.com/questions/19067010/finding-where-relocations-originate/19338343#19338343 for the script to generate this output. See https://www.akkadia.org/drepper/dsohowto.pdf Section 1.6 for why we care. Amends 0328e4297e339de8a2acd84979c667936f6fadf8. Pick-to: 6.9 6.8 6.5 Task-number: QTBUG-100536 Change-Id: I1fd65e3ed5bceeb2a49141834dbd12f4bf42cc8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add logging category for platform servicesDavid Redondo2025-02-251-9/+5
||||||| Rather than being hidden behind a compile time flag or uncategorized Change-Id: I3bc1781351220441134fb9815644e905273a1e40 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add Qt::Key_KeyboardKai Uwe Broulik2025-02-171-0/+1
||||||||| Adds a "media key" for the "Keyboard settings" key found on some laptops. Change-Id: Id041a551844f095f1d7d2fd25d37346da30407a3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QDesktopUnixServices: Fix #endif commentDavid Redondo2025-01-301-1/+1
|||||||| So it doesn't confuse me or anyone else again Pick-to: 6.9 Change-Id: I8ad5d4cb1b00e0edaffa90ed67e30246211e1a97 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Platform: unix - avoid modifying the environmentTim Blechmann2025-01-291-7/+16
|||||||||||||| Modifying the process environment can cause crashes in application code that accesses the environment via non-qt functions on worker threads. When launching a process, we can avoid modifying the environment of the caller by using QProcess with setEnvironment. The codepaths without QProcess support is still prone to these issues and could potentially be improved via execve Task-number: QTBUG-129222 Pick-to: 6.8 6.9 Change-Id: I4e2d93abaa0e392b341041faaae0ffd11e225bcb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QDesktopUnixServices: avoid to call virtual function in constructorLiang Qi2025-01-231-1/+1
|||||||| This amends 1969b1a90a79dad049694bd1540f8627d5f26875 . Pick-to: 6.9 6.8 6.5 Change-Id: I1be4e229d531f8a91e1ad3133a5b62784d18bb41 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* platforms: rename QGenericUnixServices to QDesktopUnixServicesLiang Qi2025-01-213-28/+28
|||||||||| The implementation follows XDG Desktop Portal mostly, and is for desktop, not generic unix. Task-number: QTBUG-130884 Pick-to: 6.9 Change-Id: I88456abb37b8b23cfec00ee8eac8ffee9a65ed9f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QGenericUnixServices: avoid dbus calls on non xdg envsLiang Qi2025-01-211-0/+3
||||||| Fixes: QTBUG-130884 Pick-to: 6.9 6.8 6.5 Change-Id: I2525293f776676cda63e61c3c5093045dbafcf38 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix the unsupported Q_UNREACHABLE_RETURN statement in constexpr functionsAlexey Edelev2025-01-171-3/+18
||||||||||||||| GCC 8.x does not treat __builtin_unreachable() as constexpr and disallows using the Q_UNREACHABLE_RETURN macro. Guard the statements with the respective checks. Amends b0b34c56a99130bfc9c82cb006653ce6b8f0516e Pick-to: 6.8 6.9 Task-number: QTBUG-125285 Fixes: QTBUG-132804 Change-Id: I88cdbe3bae1a336edc255e3e93e8d948bde253da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Replace qgetenv() calls converted to QString with qEnvironmentVariable()Thiago Macieira2025-01-012-5/+5
|||||||| It's slightly more efficient. Pick-to: 6.9 Change-Id: Id5ac04fc27eee108c8e5fffd786c3d5f793a0a9d Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Guard the usages of QPlatformIntegration::services()Liang Qi2024-11-251-1/+2
||||||| Task-number: QTBUG-130884 Pick-to: 6.8 6.5 Change-Id: I6c8060ce8b7a4e525c46e2e1fec227f46fe8c4d6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce VxKeyboard input pluginMichał Łoś2024-10-301-0/+15
|||||||||||||||||| Introduce VxKeyboard plugin which is responsible for handling keyboard on VxWorks OS. Due to the fact that VxWorks is using its own, not fully compatible with Unix/Linux implementation of libevdev, it requires it's own plugin. This way, changes in evdev plugins will not be blocked/complicated by VxWorks stalled implementation. Implement VxKeyboard plugin and its backend, adding support for it in eglfs. This is a preparatory change, as there is no keyboard detection for VxWorks yet. Task-number: QTBUG-115777 Change-Id: I4ca5729c6f210fb7477bc31371a137071e12fdad Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: Report location of DBus menubar on window propertiesDavid Edmundson2024-10-104-7/+36
||||||||||||||| KDE extended the DBus menubar protocol to report the DBus service and path on the window itself, this makes looking it up easier than going through a broker. On Qt5 this worked because we handled the entire DBus menu from scratch in KDE's own platformtheme, but given Qt now has direct dbusmenu bar support it makes sense to have the remaining reporting side all in one place. Change-Id: I78044992fa1840c40a66384033ed790ce0cd7f96 Task-number: QTBUG-116352 Reviewed-by: Liang Qi <liang.qi@qt.io>
* De-inline dtors of QAbstractEventDispatcherPrivate subclassesMarc Mutz2024-10-082-0/+4
||||||||||| ... pinning the vtables to a single TU each, instead of duplicating them for every user. Pick-to: 6.8 Task-number: QTBUG-45582 Change-Id: I3b7bce14567dc8be89795a48f6871eb24fe908aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
* QGenericUnixServices: properly disconnect signals in dtorChristian Ehrlicher2024-08-302-1/+14
|||||||||||| Since QGenericUnixServices does not derive from QObject, the connection to QDBusPendingCallWatcher made in the ctor might outlive the lifetime of QGenericUnixServices. Fix it by explicitly disconnecting it in the dtor. Fixes: QTBUG-125239 Pick-to: 6.8 6.7 6.5 Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGUTheme: add Pantheon to the list of GTK based desktop environmentsLiang Qi2024-07-121-0/+1
|||||||||| Pantheon is the desktop environment of elementary OS. It is written in Vala, using GTK 3 and Granite. Fixes: QTBUG-52292 Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: I01140d8a2f3b0f2736515c1279e5d3150a0c313d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QKdeTheme: Fix default value for ItemViewActivateItemOnSingleClickNicolas Fella2024-06-241-0/+4
||||||||||| Plasma 6 defaults to double click. When the default value is read we get an invalid QVariant. Use the proper default value in that case Pick-to: 6.8 6.7 6.5 Fixes: QTBUG-124481 Change-Id: I4cdbb04ee8f56b48bb6ab66ec6b3cd42bcf1b187 Reviewed-by: David Redondo <qt@david-redondo.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Gui: Make more logging categories staticUlf Hermann2024-06-241-1/+1
||||||| Non-static, non-forward-declared logging categories are deprecated. Change-Id: I818ab0b192bed72e6a0ecdda2bb288bce1110a4c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Straighten out various logging categoriesUlf Hermann2024-06-191-2/+0
|||||||||||| Either make them static or declare them in a header. We want them to be static wherever possible, in order to reduce the number of visible symbols. If they can't be static, however, they should at least be declared in only one place. Task-number: QTBUG-67692 Change-Id: I6f3b596ed4f0adc9873dd0a5f54f055a991a6207 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFileSystemModel: only use theme icons if a theme is setVolker Hilsheimer2024-06-171-0/+6
||||||||||||||||||||||||| The old code checked themes first, and only went through the platform's file-based icon resolving code if the theme didn't provide an icon. With the added support for theme icons on macOS and Windows, this broke standard file icons on macOS and Windows: the icon theme provides the font-based icons, but they are significantly different from what users expect a folder, drive, or generic file icon to look like in a file explorer-like UI. To fix this, we cannot simply turn the priorities around, as we get a standard, default file icon for any file that doesn't have a specific icon configured. The behavior needs to be different on each platform: on Linux desktop we respect the icon theme, on other platforms we prefer the file-type based icon. Add a theme hint that tells the icon provider which one to prefer. Implemented in on Linux desktop to return true, otherwise returns false. Adapt the logic in QAbstractFileIconProvider accordingly. Pick-to: 6.8 6.7 Fixes: QTBUG-124829 Change-Id: I9ff3f543c000aec8238bdf36b18be5c7a2349098 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Check D-Bus tray availability every timeIlya Fedin2024-06-011-9/+4
||||||||||| It could appear in runtime, this allows applications to watch for it themselves and re-create QSystemTrayIcon as needed. Task-number: QTBUG-94871 Pick-to: 6.7 6.5 Change-Id: I10678cca4238ec0212c69155c9f22c07755ab1a8 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Don't fallback to X11 tray backend on non-X11Ilya Fedin2024-06-011-11/+13
||||||||||||| This allows to have system tray support on the fly on Wayland at least where only QDBusTrayIcon is possible and no need to fallback to QSystemTrayIconSys Fixes: QTBUG-114439 Task-number: QTBUG-94871 Pick-to: 6.7 6.5 Change-Id: Ic927cde585ef02f9b9ef03f3b6338f35072bef70 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QKdeTheme: update color scheme with unknown desktop themeAxel Spoerl2024-05-211-4/+1
|||||||||||||||||| When a KDE theme name doesn't contain the keywords "dark" or "light", QKdeThemePrivate::updateColorScheme() falls back to heuristics. It compares text and base color. It sets the color scheme to dark, if text is lighter than base and otherwise to light. When the theme name can't be read from KDE settings, because it is stored on a different location or not yet set, the heuristics fallback doesn't happen. The color scheme always becomes "Unknown". Remove this limitation to the benefit of currently unsupported Linuxes. Fixes: QTBUG-125285 Pick-to: 6.7 Change-Id: I120dd23eee71b14ea8ce3735c3f53bda2caa403e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QKdeThemePrivate: refactor reading of KDE settingsAxel Spoerl2024-05-201-36/+215
||||||||||||||||||||||||||||||| KDE settings locations and keys were hardcoded in QKdeThemePrivate. readKdeSetting() was implemented as a static method, because it was called from the static readKdeSystemPalette(). It expects a QStringList argument with the KDE settings directories, an int representing the KDE version, as well as a QHash with settings passed as a reference. Class members exist for settings directories and version. They have to be passed for each call. The hash containing settings objects will be created on the stack of each function making calles to readKdeSetting(). The settings key, including subsections, was passed as a QString. Implement enumerations for all KDE setting types and settings. Derive subsection from the settings type. Change the signature of readKdeSetting() from a string to the new enumeration. Implement a non static override of readKdeSetting, to avoid passing data memebers on each call. Implement a mutable has for KDE settings, to enable caching across functions in the future. This patch does not change any behavior. Task-number: QTBUG-125285 Pick-to: 6.7 Change-Id: Ic0320853e08e82dd83bdba1e7765a1e5c6ffb384 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fix documentation of QKdeThemePrivate::updateColorScheme()Axel Spoerl2024-05-201-5/+5
|||||||||| The method's documentation mentions appearance, instead of color scheme. Update it. Task-number: QTBUG-125285 Pick-to: 6.7 6.5 Change-Id: Iceb2b7d0a51d0ba34f98dd942d7988feb685a4f6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* ColorScheme: clean up code to prepare adding a setterVolker Hilsheimer2024-04-231-1/+1
||||||||||||||||||| The current QStyleHintsPrivate::setColorScheme is called when the system theme changes, handling the change and informing the application. It is not a setter. When we add a public setter, that setter will have to go through the QPlatformTheme to request an override for the application. That will then result in a call back to the QStyleHints to update the theme with the effective color scheme (or ignore the request for the override, on some platforms). Rename it (and similar misleading APIs in platform plugins) to updateColorScheme, and adjust outdated comments in some of the platform plugins. Task-number: QTBUG-124490 Change-Id: I6a852211254993df86acf2e2d42cf345e7401f4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* QDbusTrayIcon: handle open() failureGiuseppe D'Angelo2024-03-261-1/+4
|||||||||| QDbusTrayIcon has a convoluted workaround/hack that consists in putting an icon file in /tmp/ and then using that path as the icon. Opening the icon file may fail, so handle it. Change-Id: I5d1c681e2fe3cfb23e93fd20f6758d4c83fe1578 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qxkbcommon: fix isKeypadYifan Zhu2024-03-191-1/+40
|||||||||||| This amends a34e81ab8be6445877e040b1afb85deeaa725f86 . The previous range comparison doesn't work since XKB_KEY_KP_9 is 0xffb9 while XKB_KEY_KP_Equal is 0xffbd. Change to an explicit switch. Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I3a340bac61fb074eef505ef9b06300a6468877f1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QGenericUnixServices: make sure the picker returns a colorLiang Qi2024-02-031-3/+7
|||||||| This amends b646c7b76c7787cff57bca0fde04d9f58abdfbb8 . Pick-to: 6.7 6.6 6.5 Change-Id: Ic7183c06a93085d65b31c86380889b78c714548b Reviewed-by: David Edmundson <davidedmundson@kde.org>
* qxkbcommon: map XKB_KEY_XF86Calculator to Qt::Key_CalculatorYifan Zhu2024-01-311-0/+1
||||||||||||| cfd935fe6c26800befc10889afc0aebde311acca removed the erroneous mapping from XKB_KEY_XF86Calculator to Qt::Key_Launch1, leaving it unmapped. It should be mapped to Qt::Key_Calculator, just like XKB_KEY_XF86Calculater. Fixes: QTBUG-121713 Pick-to: 6.7 6.6 6.5 Change-Id: Iaa28e38792f43a7950a3c38397869a6ffed332d1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QGenericUnixTheme: Rename ColorTheme enum value to ColorSchemeAxel Spoerl2023-12-291-3/+3
|||||||||||| ColorScheme is used in Qt as a name for dark/light desktop mode properties. The enum value was named incorrectly. => Fix it. Pick-to: 6.7 6.6 6.5 Change-Id: I2aa72f81e36c0997127dd6de0e23d4773509ba40 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
close