diff --git a/org.kde.Sdk.json b/org.kde.Sdk.json index 109d5d2..7c62661 100644 --- a/org.kde.Sdk.json +++ b/org.kde.Sdk.json @@ -1,879 +1,879 @@ { "build-runtime": true, "id": "org.kde.Sdk", "id-platform": "org.kde.Platform", - "branch": "5.10", + "branch": "5.11", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", "runtime-version": "1.6", "sdk-extensions": ["org.freedesktop.Sdk.Debug", "org.freedesktop.Sdk.Locale", "org.freedesktop.Sdk.Docs"], "platform-extensions": ["org.freedesktop.Platform.Locale"], "inherit-extensions": [ "org.freedesktop.Platform.GL", "org.freedesktop.Platform.Timezones", "org.freedesktop.Platform.GStreamer", "org.freedesktop.Platform.Icontheme", "org.freedesktop.Sdk.Extension", "org.freedesktop.Platform.VAAPI.Intel", "org.freedesktop.Platform.ffmpeg", "org.gtk.Gtk3theme" ], "add-extensions": { "org.kde.Sdk.Docs" : { "directory": "share/runtime/docs", "bundle": true, "autodelete": true, "no-autodownload": true }, "org.kde.KStyle" : { "directory": "share/runtime/lib/plugins/", "subdirectories": true, "no-autodownload": true, - "version": "5.10", + "version": "5.11", "merge-dirs": "styles", "download-if": "active-gtk-theme" }, "org.kde.PlatformTheme" : { "directory": "share/runtime/lib/plugins/", "subdirectories": true, "no-autodownload": true, - "version": "5.10", + "version": "5.11", "merge-dirs": "platformthemes", "download-if": "on-gnome-platform" } }, "finish-args": [ "--env=GI_TYPELIB_PATH=/app/lib/girepository-1.0", "--env=GST_PLUGIN_SYSTEM_PATH=/app/lib/gstreamer-1.0:/usr/lib/extensions/gstreamer-1.0:/usr/lib/gstreamer-1.0", "--env=XDG_DATA_DIRS=/app/share:/usr/share:/usr/share/runtime/share:/run/host/share", "--env=QT_PLUGIN_PATH=/app/lib64/plugins:/app/lib/plugins:/usr/share/runtime/lib/plugins", "--env=QML2_IMPORT_PATH=/app/lib64/qml:/app/lib/qml", "--env=KDE_FORK_SLAVES=1", "--env=DCONF_USER_CONFIG_DIR=.config/dconf", "--filesystem=xdg-config/kdeglobals:ro", "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro", "--talk-name=com.canonical.AppMenu.Registrar", - "--sdk=org.kde.Sdk//5.10", - "--runtime=org.kde.Platform//5.10" + "--sdk=org.kde.Sdk//5.11", + "--runtime=org.kde.Platform//5.11" ], "cleanup": [ "/man", "/share/man", "/lib/systemd", "*.la"], "cleanup-commands": [ "/usr/libexec/freedesktop-post.sh" ], "cleanup-platform": [ "/share/runtime/docs", "/include", "/share/aclocal", "/share/pkgconfig", "/lib/pkgconfig", "*.a" ], "cleanup-platform-commands": [ "/usr/libexec/freedesktop-post.sh" ], "build-options" : { "cflags": "-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2", "cxxflags": "-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2", "ldflags": "-fstack-protector-strong -Wl,-z,relro,-z,now", "env": { "V": "1" } }, "modules": [ + { + "name": "harfbuzz", + "config-opts": ["--disable-static", + "--with-gobject", + "--with-graphite2" + ], + "sources": [ + { + "type": "archive", + "url": "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.7.6.tar.bz2", + "sha256": "da7bed39134826cd51e57c29f1dfbe342ccedb4f4773b1c951ff05ff383e2e9b" + } + ] + }, { "name": "qt5-qtbase", "cleanup-platform": [ "/bin", "/mkspecs" ], "build-options" : { "arch" : { "x86_64" : { "config-opts" : [ "-debug", "-reduce-relocations" ] }, "arm" : { "config-opts" : [ "-no-reduce-relocations", "-no-use-gold-linker", "-optimize-size" ] } } }, "config-opts": [ "-confirm-license", "-opensource", "-shared", "-platform", "linux-g++", "-optimized-qmake", "-nomake", "examples", "-nomake", "tests", "-system-harfbuzz", "-system-sqlite", "-accessibility", "-dbus-linked", "-fontconfig", "-glib", "-icu", "-openssl-linked", "-no-pch", "-no-rpath", "-no-directfb", "-no-linuxfb", "-no-kms", "-no-cups", "-system-proxies", "-gtk", "-archdatadir", "/usr/lib/" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtbase-everywhere-src-5.10.1.tar.xz", - "sha256": "d8660e189caa5da5142d5894d328b61a4d3ee9750b76d61ad74e4eee8765a969" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtbase-everywhere-src-5.11.0.tar.xz", + "sha256": "ed6e46db84f7d34923ab4eae165c63e05ab3cfa9d19a73d3f57b4e7bfd41de66" }, { "type": "shell", "commands": [ "mv configure configure.qt" ] }, - { - "type": "patch", - "path": "patch/qtbase-flatpak-portals-filechooser.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-flatpak-portals-services.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-flatpak-portals-filechooser-avoid-multiple-connections.patch" - }, { "type": "patch", "path": "patch/qtbase-portal-openuri.patch" }, { "type": "script", "commands": [ "processed=`sed -e 's/--/-/g ; s/=/ /g' <<< $@`", "./configure.qt $processed" ], "dest-filename": "configure" } ] }, { "name": "qt5-qtdeclarative", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtdeclarative-everywhere-src-5.10.1.tar.xz", - "sha256": "3af9ed51bce5b5c6f04c4a67a6008f98765ccde897c43fff670621ab70789553" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtdeclarative-everywhere-src-5.11.0.tar.xz", + "sha256": "eea9378b17b1c16d3b5235629b9128349bf98cba7d9c61122653d976b25f57c0" } ] }, { "name": "qt5-qttools", "buildsystem": "qmake", "cleanup-platform": [ "/mkspecs", "/bin/assistant", "/bin/qhelpgenerator", "/bin/qcollectiongenerator", "/bin/qhelpconverter", "/bin/pixeltool", "/bin/designer", "/bin/lrelease", "/bin/lupdate", "/bin/lconvert", "/bin/linguist", "/bin/qdoc", "/bin/qtattributionsscanner", "/bin/qtplugininfo", "/bin/qtdiag", "/bin/qdbusviewer" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qttools-everywhere-src-5.10.1.tar.xz", - "sha256": "f1ea441e5fe138756e6de3b60ab7d8d3051799eabe85a9408c995dfd4d048a53" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qttools-everywhere-src-5.11.0.tar.xz", + "sha256": "9d93ca84272cdf9031913cb3a6876716aa8a174e91693839f0de0ea3dd3a67d9" } ] }, { "name": "qt5-qtscript", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtscript-everywhere-src-5.10.1.tar.xz", - "sha256": "e0618af7cb1f1f30d292c04cf484e3507cf6f4815f79870e35d2b0ce7ac9532d" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtscript-everywhere-src-5.11.0.tar.xz", + "sha256": "25926ae733b31baac7af51f489ad26570d4f4f02ad4892a4a82babae5f5168c5" } ] }, { "name": "qt5-webchannel", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtwebchannel-everywhere-src-5.10.1.tar.xz", - "sha256": "c22c449fecb052597d12f8dd59498db39767037f9098123f3defc04eb20a3764" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtwebchannel-everywhere-src-5.11.0.tar.xz", + "sha256": "b0761a3b8260bae7f76bf26626ccd1d4ee92541d7c5d53d1958c88b9f92dca15" } ] }, { - "name": "pciutils", - "no-autogen": true, - "make-args": ["SHARED=no", "ZLIB=no", "PREFIX=/usr"], - "post-install": [ - "make install-pcilib", - "make install-lib" - ], + "name": "qt5-qtlocation", + "buildsystem": "qmake", + "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils", "branch": "v3.5.6" }, { - "type": "shell", - "commands": [ - "sed -i 's@PREFIX=/usr/local@PREFIX=/usr@' Makefile" - ] + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtlocation-everywhere-src-5.11.0.tar.xz", + "sha256": "28f6911e3f00173005c0348c0b59f45e59ccda7feae724b1a6b8929021968c1c" } ] }, { "name": "qt5-qtwebengine", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "modules": [ + { + "name": "pciutils", + "no-autogen": true, + "make-args": ["SHARED=no", "ZLIB=no", "PREFIX=/usr"], + "post-install": [ + "make install-pcilib", + "make install-lib" + ], + "sources": [ + { "type": "git", "url": "https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils", "branch": "v3.5.6" }, + { + "type": "shell", + "commands": [ + "sed -i 's@PREFIX=/usr/local@PREFIX=/usr@' Makefile" + ] + } + ] + }, { "name": "opus", "sources": [ { "type": "git", "url": "https://github.com/xiph/opus.git", "branch": "v1.2.1" } ] } ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtwebengine-everywhere-src-5.10.1.tar.xz", - "sha256": "12644f8d2ba8354a2a533d5a7f3f5139c6ff168c2f51aa3e21b701db6dbc01de" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtwebengine-everywhere-src-5.11.0.tar.xz", + "sha256": "5dd754d603c66d36e93b96b4f7c24a6e6269ae6a1682a524b8baa664d5c44b45" }, { "type": "patch", "path": "patch/qtwebengine-no-udev.patch" } ] }, { "name": "qt5-qtsvg", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtsvg-everywhere-src-5.10.1.tar.xz", - "sha256": "00e00c04abcc8363cf7d94ca8b16af61840995a4af23685d49fa4ccafa1c7f5a" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtsvg-everywhere-src-5.11.0.tar.xz", + "sha256": "4b8efe60678a37c731356cc146886360e5852a1cd4a8ba6339fb950a2e7d1f54" } ] }, { "name": "qt5-qtx11extras", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtx11extras-everywhere-src-5.10.1.tar.xz", - "sha256": "c38a371fd50b2da976ed809230678284f029cefb02d240253dcbb3d575dc97b4" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtx11extras-everywhere-src-5.11.0.tar.xz", + "sha256": "116690a9b4e14267d8be0a252dae3c7a807a8b31b9c831dfb51735c683e96b8f" } ] }, { "name": "qt5-qtmultimedia", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtmultimedia-everywhere-src-5.10.1.tar.xz", - "sha256": "a1fa98015ee5a6b81f2d337abc98d8b297c6718f7714a1f13fccfd2934c23649" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtmultimedia-everywhere-src-5.11.0.tar.xz", + "sha256": "ef5328f111ed2d27eff16e50febb66d1480e99f6a6df703f2ab8c650040f9d3c" } ] }, { "name": "qt5-qtsensors", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtsensors-everywhere-src-5.10.1.tar.xz", - "sha256": "bb0df76c0e53cf2b39d10dbf0964706a264413aae74a4596119143ab4d165c96" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtsensors-everywhere-src-5.11.0.tar.xz", + "sha256": "0fc4e6d6b3281610551226cb6ffd9ef4e61b2f3bd0b7b1302135b03b5b16e2ab" } ] }, { "name": "qt5-qtquickcontrols", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtquickcontrols-everywhere-src-5.10.1.tar.xz", - "sha256": "d231a1993dc6a3f0dbc60a21d01fc0be15b0c26e881bd0631573952ea61682b7" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtquickcontrols-everywhere-src-5.11.0.tar.xz", + "sha256": "26627d592193094c65f842d5dd20c771d77c554591b9375659b03945dc8af107" } ] }, { "name": "qt5-qtquickcontrols2", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtquickcontrols2-everywhere-src-5.10.1.tar.xz", - "sha256": "5dc64a1b901e418b76fd3bf65dfa87a0cb11338741fb8970211c1df6df0e604a" - } - ] - }, - { - "name": "qt5-qtlocation", - "buildsystem": "qmake", - "cleanup-platform": [ "/bin", "/mkspecs" ], - "sources": [ - { - "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtlocation-everywhere-src-5.10.1.tar.xz", - "sha256": "5e5cc05517c701a2c8ebba1fbe3ddff2b6b90d5aa554d307b1c477fe0cfd72c9" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtquickcontrols2-everywhere-src-5.11.0.tar.xz", + "sha256": "feac87e9a6ecff47bd8c18baffb93f4cea9ebb86014f817bfafe62da88454ac3" } ] }, { "name": "qt5-qtgraphicaleffects", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtgraphicaleffects-everywhere-src-5.10.1.tar.xz", - "sha256": "3f3b0631b579630bf58e99f3ca0d8dfdb6a44153c63cf90ac9e07041b4b1847f" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtgraphicaleffects-everywhere-src-5.11.0.tar.xz", + "sha256": "727846c9d8985be402f573ea28995f4a2bc13847a6d9deeca32d1e1e0421f977" } ] }, { "name": "qt5-qtxmlpatterns", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtxmlpatterns-everywhere-src-5.10.1.tar.xz", - "sha256": "3cdef59ce96a796606e5adc5756c63c8607fb29b281fddb38acee3e674d5e9fe" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtxmlpatterns-everywhere-src-5.11.0.tar.xz", + "sha256": "19a378cba26e243ebb97c29a9ec02499c5eb49f2672fbcc8415e1b70d415d28e" } ] }, { "name": "qt5-qtimageformats", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtimageformats-everywhere-src-5.10.1.tar.xz", - "sha256": "2804baa2779eae015096820e233d7f86bb7fde9853b7c9150a321a453422a283" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtimageformats-everywhere-src-5.11.0.tar.xz", + "sha256": "58406fef507a9f1e1cd97c0834b94d0a6484e19f5dea796a3b7b58fafff11e70" } ] }, { "name": "qt5-connectivity", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtconnectivity-everywhere-src-5.10.1.tar.xz", - "sha256": "652821dc6819658ec4bc1a6bf149fd7a61008748ff4745b54f038ccf276d3ec9" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtconnectivity-everywhere-src-5.11.0.tar.xz", + "sha256": "cd2e53b1a7bee098b651cbedcecf0717036ae4bec5de0daf3a0038a50b2e1873" } ] }, { "name": "qt5-wayland", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtwayland-everywhere-src-5.10.1.tar.xz", - "sha256": "f5a7643a5ebcdc50d02b293191e675f387f67dc360c27bf6f94345372fba6356" - }, - { "type": "patch", "path": "patch/qtwayland-compose.patch" }, - { "type": "patch", "path": "patch/qtwayland-connectscreen.patch" } + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtwayland-everywhere-src-5.11.0.tar.xz", + "sha256": "68814e8f207f3a90cae29ae49ce2c1f4bf9d06709a7a7962adf23120f1644127" + } ] }, { "name": "qt5-virtualkeyboard", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtvirtualkeyboard-everywhere-src-5.10.1.tar.xz", - "sha256": "4319f90e68a571974d03f39507dde548971412e31f971081ca7eaf388187d52e" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtvirtualkeyboard-everywhere-src-5.11.0.tar.xz", + "sha256": "914de601a81b32acdddc572d3ade41129b018f3693d9cecdc5dad32424913cbd" } ] }, { "name": "qt5-qtserialport", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtserialport-everywhere-src-5.10.1.tar.xz", - "sha256": "08e4cb13bbf165eb99857301f3cffe280a4946ff58a34ccc542ad1f790194a9e" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtserialport-everywhere-src-5.11.0.tar.xz", + "sha256": "85eef7533a18fce59551fe26bb0055dd290d5d33cbb313fcb8e5daf8b40c6eb1" } ] }, { "name": "qt5-qtwebsockets", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtwebsockets-everywhere-src-5.10.1.tar.xz", - "sha256": "6ecf790955ffe42dce731e10557f4ba625e359e867953d73f7fb453c0bad53ea" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtwebsockets-everywhere-src-5.11.0.tar.xz", + "sha256": "7d5845805bec42de121ecc063ee40ac1438975adcec395c6af97cfd5bb3539b7" } ] }, { "name": "qt5-qtcharts", "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.10/5.10.1/submodules/qtcharts-everywhere-src-5.10.1.tar.xz", - "sha256": "4f0d577bf73dd2bbb2765c2cfb493a2d68790fc2c64f42544d31dba806321ec9" + "url": "http://download.qt.io/archive/qt/5.11/5.11.0/submodules/qtcharts-everywhere-src-5.11.0.tar.xz", + "sha256": "c46e12beeaabf731ce918c7508d8ab62ae3b675870992faf36878268da4ee351" } ] }, ////////////////////////////////// { "name": "libdbusmenuqt", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DWITH_DOC=OFF"], "sources": [ { "type": "bzr", "url": "http://bazaar.launchpad.net/~dbusmenu-team/libdbusmenu-qt/trunk/", "revision": "0.9.3+16.04.20160218-0ubuntu1" } ] }, ////////////////////////////////// { "name": "extra-cmake-modules", "cleanup-platform": ["*"], "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/extra-cmake-modules.git", "branch": "v5.46.0" } ] }, { "name": "kwidgetsaddons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kwidgetsaddons.git", "branch": "v5.46.0" } ] }, { "name": "ki18n", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/ki18n.git", "branch": "v5.46.0" } ] }, { "name": "kconfig", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kconfig.git", "branch": "v5.46.0" } ] }, { "name": "attica", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/attica.git", "branch": "v5.46.0" } ] }, { "name": "kguiaddons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kguiaddons.git", "branch": "v5.46.0" } ] }, { "name": "kcoreaddons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcoreaddons.git", "branch": "v5.46.0" } ] }, { "name": "kauth", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kauth.git", "branch": "v5.46.0" } ] }, { "name": "karchive", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=TRUE"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/karchive.git", "branch": "v5.46.0" } ] }, { "name": "kcodecs", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcodecs.git", "branch": "v5.46.0" } ] }, { "name": "kconfigwidgets", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kconfigwidgets.git", "branch": "v5.46.0" } ] }, { "name": "kitemviews", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kitemviews.git", "branch": "v5.46.0" } ] }, { "name": "kiconthemes", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kiconthemes.git", "branch": "v5.46.0" } ] }, { "name": "kwindowsystem", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kwindowsystem.git", "branch": "v5.46.0" } ] }, { "name": "kcrash", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcrash.git", "branch": "v5.46.0" } ] }, { "name": "kdbusaddons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdbusaddons.git", "branch": "v5.46.0" } ] }, { "name": "kservice", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "builddir": true, "sources": [ { "type": "git", "url": "git://anongit.kde.org/kservice.git", "branch": "v5.46.0" } ] }, { "name": "kglobalaccel", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kglobalaccel.git", "branch": "v5.46.0" } ] }, { "name": "sonnet", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/sonnet.git", "branch": "v5.46.0" } ] }, { "name": "kcompletion", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcompletion.git", "branch": "v5.46.0" } ] }, { "name": "ktextwidgets", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/ktextwidgets.git", "branch": "v5.46.0" } ] }, { "name": "kxmlgui", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kxmlgui.git", "branch": "v5.46.0" } ] }, { "name": "perl-uri-escape", "cleanup-platform": ["*"], "sources": [{ "type": "archive", "url": "http://cpan.metacpan.org/authors/id/E/ET/ETHER/URI-1.71.tar.gz", "sha256": "9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115" }, { "type": "script", "commands": [ "perl Makefile.PL INSTALLDIRS=vendor"], "dest-filename": "configure" } ] }, { "name": "kdoctools", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdoctools.git", "branch": "v5.46.0" } ] }, { "name": "kpackage", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kpackage.git", "branch": "v5.46.0" } ] }, { "name": "kbookmarks", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kbookmarks.git", "branch": "v5.46.0" } ] }, { "name": "phonon", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DPHONON_BUILD_PHONON4QT5=ON"], "buildsystem": "cmake-ninja", - "sources": [ { "type": "git", "url": "git://anongit.kde.org/phonon.git", "branch": "4.9" } ] + "sources": [ { "type": "git", "url": "git://anongit.kde.org/phonon.git", "branch": "v4.10.1" } ] }, { "name": "knotifications", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/knotifications.git", "branch": "v5.46.0" } ] }, { "name": "kwallet", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kwallet.git", "branch": "v5.46.0" } ] }, { "name": "kjobwidgets", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kjobwidgets.git", "branch": "v5.46.0" } ] }, { "name": "solid", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/solid.git", "branch": "v5.46.0" }, { "type": "patch", "path": "patch/solid-no-udev.patch" } ] }, { "name": "kio", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kio.git", "branch": "v5.46.0" } ] }, { "name": "kparts", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kparts.git", "branch": "v5.46.0" } ] }, { "name": "kplotting", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kplotting.git", "branch": "v5.46.0" } ] }, { "name": "kdesignerplugin", "buildsystem": "cmake-ninja", "builddir": true, "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdesignerplugin.git", "branch": "v5.46.0" } ] }, { "name": "kinit", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kinit.git", "branch": "v5.46.0" } ] }, { "name": "kded", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kded.git", "branch": "v5.46.0" } ] }, { "name": "kunitconversion", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kunitconversion.git", "branch": "v5.46.0" } ] }, { "name": "kdeclarative", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdeclarative.git", "branch": "v5.46.0" } ] }, { "name": "kcmutils", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcmutils.git", "branch": "v5.46.0" } ] }, { "name": "knotifyconfig", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "builddir": true, "sources": [ { "type": "git", "url": "git://anongit.kde.org/knotifyconfig.git", "branch": "v5.46.0" } ] }, { "name": "knewstuff", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/knewstuff.git", "branch": "v5.46.0" } ] }, { "name": "kidletime", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kidletime.git", "branch": "v5.46.0" } ] }, { "name": "threadweaver", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/threadweaver.git", "branch": "v5.46.0" } ] }, { "name": "kitemmodels", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kitemmodels.git", "branch": "v5.46.0" } ] }, { "name": "kxmlrpcclient", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kxmlrpcclient.git", "branch": "v5.46.0" } ] }, { "name": "kdnssd", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdnssd.git", "branch": "v5.46.0" } ] }, { "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "name": "syntax-highlighting", "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/syntax-highlighting.git", "branch": "v5.46.0" } ] }, { "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "name": "ktexteditor", "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/ktexteditor.git", "branch": "v5.46.0" } ] }, { "name": "frameworkintegration", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "builddir": true, "sources": [ { "type": "git", "url": "git://anongit.kde.org/frameworkintegration.git", "branch": "v5.46.0" } ] }, { "name": "kemoticons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kemoticons.git", "branch": "v5.46.0" } ] }, { "name": "kpty", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kpty.git", "branch": "v5.46.0" } ] }, { "name": "kwayland", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib" ], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kwayland.git", "branch": "v5.46.0" } ] }, { "name": "kirigami", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DPLASMA_ENABLED=OFF"], "buildsystem": "cmake-ninja", "builddir": true, "sources": [ { "type": "git", "url": "git://anongit.kde.org/kirigami.git", "branch": "v5.46.0" } ] }, { "name": "qqc2-desktop-style", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "builddir": true, "sources": [ { "type": "git", "url": "git://anongit.kde.org/qqc2-desktop-style.git", "branch": "v5.46.0" } ] }, { "name": "breeze-icons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/breeze-icons.git", "branch": "v5.46.0" } ] }, ////////////////////////////////// { "name": "breeze", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DWITH_DECORATIONS=OFF" ], "sources": [ { "type": "git", "url": "git://anongit.kde.org/breeze.git", "branch": "Plasma/5.12" } ] }, { "name": "plasma-integration", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/plasma-integration.git", "branch": "Plasma/5.12" } ] }, { "name": "kwayland-integration", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/kwayland-integration.git", "branch": "Plasma/5.12" } ] }, { "name": "phonon-gstreamer", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DPHONON_BUILD_PHONON4QT5=ON"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/phonon-gstreamer.git", "branch": "4.9" } ] }, { "name": "fcitx-platforminputcontext", "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_LIBRARY=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "https://github.com/fcitx/fcitx-qt5", "branch": "1.2.1" } ] }, { "name": "os-release", "post-install": [ "mkdir -p /usr/share/runtime/lib/plugins/" ], "sources": [ { "type": "file", "path": "os-release" }, { "type": "file", "path": "issue" }, { "type": "file", "path": "issue.net" }, { "type": "file", "path": "org.kde.Sdk.appdata.xml" }, { "type": "file", "path": "org.kde.Platform.appdata.xml" }, { "type": "file", "path": "os-release-configure", "dest-filename": "configure" } ] } ] } diff --git a/patch/qtbase-flatpak-portals-filechooser-avoid-multiple-connections.patch b/patch/qtbase-flatpak-portals-filechooser-avoid-multiple-connections.patch deleted file mode 100644 index d2b880c..0000000 --- a/patch/qtbase-flatpak-portals-filechooser-avoid-multiple-connections.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bd94548f5185a98395c8935ce1edd377ac723743 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Thu, 5 Apr 2018 10:47:14 +0200 -Subject: Avoid multiple connections to same response in FileChooser portal - -When not specified, xdg-desktop-portal keeps using same Request object -over and over when returning response, causing multiple connections -to same slot on same DBus object. While this is not problem when using -FileDialog just once, it is a problem for QML FileDialog which is -usually reused. For this purpose x-d-p provides handle_token option -where you can specify token to be used when creating Request objects. - -Change-Id: Ie6569700c48e05fcefa4d5c22c921410f87ea7ae - -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -index 1a24015ce5..186084abd4 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -@@ -51,6 +51,7 @@ - #include - #include - #include -+#include - #include - - QT_BEGIN_NAMESPACE -@@ -231,6 +232,8 @@ void QFlatpakFileDialog::openPortal() - if (!filterList.isEmpty()) - options.insert(QLatin1String("filters"), QVariant::fromValue(filterList)); - -+ options.insert(QLatin1String("handle_token"), QStringLiteral("qt%1").arg(QRandomGenerator::global()->generate())); -+ - // TODO choices a(ssa(ss)s) - // List of serialized combo boxes to add to the file chooser. - diff --git a/patch/qtbase-flatpak-portals-filechooser.patch b/patch/qtbase-flatpak-portals-filechooser.patch deleted file mode 100644 index c1731a5..0000000 --- a/patch/qtbase-flatpak-portals-filechooser.patch +++ /dev/null @@ -1,1026 +0,0 @@ -From 84731fbb2bafe4d92bec6cc60db5115279bc6e38 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Mon, 11 Dec 2017 09:53:49 +0100 -Subject: Add support for FileChooser flatpak portal - -Adds support for FileChooser Flatpak portal. To support them we just do -specific DBus calls, which are then caught and forwarded by xdg-desktop- -portal daemon/service. This is needed for Qt applications running in -sandbox. - -[ChangeLog][Platform Specific Changes][Linux] Added support for flatpak -portals. Flatpak is a software utility for software deployment and -package management. It provides a sandbox environment in which users -can run applications in isolation from the rest of the system. To -communicate with the system flatpak uses portals, which are designed to -be a bridge between sandboxed applications and desktop/system running on -user's computer. Flatpak runs this service (called xdg-desktop-portal) -automatically. It exports the portals via DBus and they are visible by -default to all applications running under Flatpak. - -Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5 -Reviewed-by: Thiago Macieira - -diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp -index b26567a..762e0d3 100644 ---- a/src/gui/kernel/qguiapplication.cpp -+++ b/src/gui/kernel/qguiapplication.cpp -@@ -53,6 +53,7 @@ - #include - - #include -+#include - #include - #include - #include -@@ -244,6 +245,15 @@ static inline void clearFontUnlocked() - QGuiApplicationPrivate::app_font = 0; - } - -+static bool checkRunningUnderFlatpak() -+{ -+#if QT_CONFIG(dbus) -+ return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty(); -+#else -+ return false; -+#endif // QT_CONFIG(dbus) -+} -+ - // Using aggregate initialization instead of ctor so we can have a POD global static - #define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER { Qt::TopLeftCorner, -1, -1, -1, -1 } - -@@ -1173,16 +1183,21 @@ static void init_platform(const QString &pluginArgument, const QString &platform - if (!platformThemeName.isEmpty()) - themeNames.append(platformThemeName); - -- // 2) Ask the platform integration for a list of theme names -+ // 2) Special case - check whether we are in sandbox to use flatpak platform theme for portals support -+ if (checkRunningUnderFlatpak()) { -+ themeNames.append(QStringLiteral("flatpak")); -+ } -+ -+ // 3) Ask the platform integration for a list of theme names - themeNames += QGuiApplicationPrivate::platform_integration->themeNames(); -- // 3) Look for a theme plugin. -+ // 4) Look for a theme plugin. - for (const QString &themeName : qAsConst(themeNames)) { - QGuiApplicationPrivate::platform_theme = QPlatformThemeFactory::create(themeName, platformPluginPath); - if (QGuiApplicationPrivate::platform_theme) - break; - } - -- // 4) If no theme plugin was found ask the platform integration to -+ // 5) If no theme plugin was found ask the platform integration to - // create a theme - if (!QGuiApplicationPrivate::platform_theme) { - for (const QString &themeName : qAsConst(themeNames)) { -@@ -1193,7 +1208,7 @@ static void init_platform(const QString &pluginArgument, const QString &platform - // No error message; not having a theme plugin is allowed. - } - -- // 5) Fall back on the built-in "null" platform theme. -+ // 6) Fall back on the built-in "null" platform theme. - if (!QGuiApplicationPrivate::platform_theme) - QGuiApplicationPrivate::platform_theme = new QPlatformTheme; - -diff --git a/src/plugins/platformthemes/flatpak/flatpak.json b/src/plugins/platformthemes/flatpak/flatpak.json -new file mode 100644 -index 0000000..71f834f ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/flatpak.json -@@ -0,0 +1,3 @@ -+{ -+ "Keys": [ "flatpak" ] -+} -diff --git a/src/plugins/platformthemes/flatpak/flatpak.pro b/src/plugins/platformthemes/flatpak/flatpak.pro -new file mode 100644 -index 0000000..1e5dbb7 ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/flatpak.pro -@@ -0,0 +1,17 @@ -+TARGET = qflatpak -+ -+PLUGIN_TYPE = platformthemes -+PLUGIN_EXTENDS = - -+PLUGIN_CLASS_NAME = QFlatpakThemePlugin -+load(qt_plugin) -+ -+QT += core-private dbus gui-private theme_support-private -+ -+HEADERS += \ -+ qflatpaktheme.h \ -+ qflatpakfiledialog_p.h -+ -+SOURCES += \ -+ main.cpp \ -+ qflatpaktheme.cpp \ -+ qflatpakfiledialog.cpp -diff --git a/src/plugins/platformthemes/flatpak/main.cpp b/src/plugins/platformthemes/flatpak/main.cpp -new file mode 100644 -index 0000000..7888eed ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/main.cpp -@@ -0,0 +1,65 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2017 Red Hat, Inc -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include -+#include "qflatpaktheme.h" -+ -+QT_BEGIN_NAMESPACE -+ -+class QFlatpakThemePlugin : public QPlatformThemePlugin -+{ -+ Q_OBJECT -+ Q_PLUGIN_METADATA(IID QPlatformThemeFactoryInterface_iid FILE "flatpak.json") -+ -+public: -+ QPlatformTheme *create(const QString &key, const QStringList ¶ms) override; -+}; -+ -+QPlatformTheme *QFlatpakThemePlugin::create(const QString &key, const QStringList ¶ms) -+{ -+ Q_UNUSED(params); -+ if (!key.compare(QLatin1String("flatpak"), Qt::CaseInsensitive)) -+ return new QFlatpakTheme; -+ -+ return nullptr; -+} -+ -+QT_END_NAMESPACE -+ -+#include "main.moc" -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -new file mode 100644 -index 0000000..1a24015 ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -@@ -0,0 +1,352 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2017 Red Hat, Inc -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "qflatpakfiledialog_p.h" -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+QDBusArgument &operator <<(QDBusArgument &arg, const QFlatpakFileDialog::FilterCondition &filterCondition) -+{ -+ arg.beginStructure(); -+ arg << filterCondition.type << filterCondition.pattern; -+ arg.endStructure(); -+ return arg; -+} -+ -+const QDBusArgument &operator >>(const QDBusArgument &arg, QFlatpakFileDialog::FilterCondition &filterCondition) -+{ -+ uint type; -+ QString filterPattern; -+ arg.beginStructure(); -+ arg >> type >> filterPattern; -+ filterCondition.type = (QFlatpakFileDialog::ConditionType)type; -+ filterCondition.pattern = filterPattern; -+ arg.endStructure(); -+ -+ return arg; -+} -+ -+QDBusArgument &operator <<(QDBusArgument &arg, const QFlatpakFileDialog::Filter filter) -+{ -+ arg.beginStructure(); -+ arg << filter.name << filter.filterConditions; -+ arg.endStructure(); -+ return arg; -+} -+ -+const QDBusArgument &operator >>(const QDBusArgument &arg, QFlatpakFileDialog::Filter &filter) -+{ -+ QString name; -+ QFlatpakFileDialog::FilterConditionList filterConditions; -+ arg.beginStructure(); -+ arg >> name >> filterConditions; -+ filter.name = name; -+ filter.filterConditions = filterConditions; -+ arg.endStructure(); -+ -+ return arg; -+} -+ -+class QFlatpakFileDialogPrivate -+{ -+public: -+ WId winId = 0; -+ bool modal = false; -+ bool multipleFiles = false; -+ bool saveFile = false; -+ QString acceptLabel; -+ QString directory; -+ QString title; -+ QStringList nameFilters; -+ QStringList mimeTypesFilters; -+ QStringList selectedFiles; -+}; -+ -+QFlatpakFileDialog::QFlatpakFileDialog() -+ : QPlatformFileDialogHelper() -+ , d_ptr(new QFlatpakFileDialogPrivate) -+{ -+} -+ -+QFlatpakFileDialog::~QFlatpakFileDialog() -+{ -+} -+ -+void QFlatpakFileDialog::initializeDialog() -+{ -+ Q_D(QFlatpakFileDialog); -+ -+ if (options()->fileMode() == QFileDialogOptions::ExistingFiles) -+ d->multipleFiles = true; -+ -+ if (options()->isLabelExplicitlySet(QFileDialogOptions::Accept)) -+ d->acceptLabel = options()->labelText(QFileDialogOptions::Accept); -+ -+ if (!options()->windowTitle().isEmpty()) -+ d->title = options()->windowTitle(); -+ -+ if (options()->acceptMode() == QFileDialogOptions::AcceptSave) -+ d->saveFile = true; -+ -+ if (!options()->nameFilters().isEmpty()) -+ d->nameFilters = options()->nameFilters(); -+ -+ if (!options()->mimeTypeFilters().isEmpty()) -+ d->mimeTypesFilters = options()->mimeTypeFilters(); -+ -+ setDirectory(options()->initialDirectory()); -+} -+ -+void QFlatpakFileDialog::openPortal() -+{ -+ Q_D(const QFlatpakFileDialog); -+ -+ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), -+ QLatin1String("/org/freedesktop/portal/desktop"), -+ QLatin1String("org.freedesktop.portal.FileChooser"), -+ d->saveFile ? QLatin1String("SaveFile") : QLatin1String("OpenFile")); -+ QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId); -+ -+ QVariantMap options; -+ if (!d->acceptLabel.isEmpty()) -+ options.insert(QLatin1String("accept_label"), d->acceptLabel); -+ -+ options.insert(QLatin1String("modal"), d->modal); -+ options.insert(QLatin1String("multiple"), d->multipleFiles); -+ -+ if (d->saveFile) { -+ if (!d->directory.isEmpty()) -+ options.insert(QLatin1String("current_folder"), d->directory.toLatin1()); -+ -+ if (!d->selectedFiles.isEmpty()) -+ options.insert(QLatin1String("current_file"), d->selectedFiles.first().toLatin1()); -+ } -+ -+ // Insert filters -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ -+ FilterList filterList; -+ -+ if (!d->mimeTypesFilters.isEmpty()) { -+ for (const QString &mimeTypefilter : d->mimeTypesFilters) { -+ QMimeDatabase mimeDatabase; -+ QMimeType mimeType = mimeDatabase.mimeTypeForName(mimeTypefilter); -+ -+ // Creates e.g. (1, "image/png") -+ FilterCondition filterCondition; -+ filterCondition.type = MimeType; -+ filterCondition.pattern = mimeTypefilter; -+ -+ // Creates e.g. [((1, "image/png"))] -+ FilterConditionList filterConditions; -+ filterConditions << filterCondition; -+ -+ // Creates e.g. [("Images", [((1, "image/png"))])] -+ Filter filter; -+ filter.name = mimeType.comment(); -+ filter.filterConditions = filterConditions; -+ -+ filterList << filter; -+ } -+ } else if (!d->nameFilters.isEmpty()) { -+ for (const QString &filter : d->nameFilters) { -+ // Do parsing: -+ // Supported format is ("Images (*.png *.jpg)") -+ QRegularExpression regexp(QPlatformFileDialogHelper::filterRegExp); -+ QRegularExpressionMatch match = regexp.match(filter); -+ if (match.hasMatch()) { -+ QString userVisibleName = match.captured(1); -+ QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), QString::SkipEmptyParts); -+ -+ FilterConditionList filterConditions; -+ for (const QString &filterString : filterStrings) { -+ FilterCondition filterCondition; -+ filterCondition.type = GlobalPattern; -+ filterCondition.pattern = filterString; -+ filterConditions << filterCondition; -+ } -+ -+ Filter filter; -+ filter.name = userVisibleName; -+ filter.filterConditions = filterConditions; -+ -+ filterList << filter; -+ } -+ } -+ } -+ -+ if (!filterList.isEmpty()) -+ options.insert(QLatin1String("filters"), QVariant::fromValue(filterList)); -+ -+ // TODO choices a(ssa(ss)s) -+ // List of serialized combo boxes to add to the file chooser. -+ -+ message << parentWindowId << d->title << options; -+ -+ QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message); -+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall); -+ connect(watcher, &QDBusPendingCallWatcher::finished, this, [this] (QDBusPendingCallWatcher *watcher) { -+ QDBusPendingReply reply = *watcher; -+ if (reply.isError()) { -+ Q_EMIT reject(); -+ } else { -+ QDBusConnection::sessionBus().connect(nullptr, -+ reply.value().path(), -+ QLatin1String("org.freedesktop.portal.Request"), -+ QLatin1String("Response"), -+ this, -+ SLOT(gotResponse(uint,QVariantMap))); -+ } -+ }); -+} -+ -+bool QFlatpakFileDialog::defaultNameFilterDisables() const -+{ -+ return false; -+} -+ -+void QFlatpakFileDialog::setDirectory(const QUrl &directory) -+{ -+ Q_D(QFlatpakFileDialog); -+ -+ d->directory = directory.path(); -+} -+ -+QUrl QFlatpakFileDialog::directory() const -+{ -+ Q_D(const QFlatpakFileDialog); -+ -+ return d->directory; -+} -+ -+void QFlatpakFileDialog::selectFile(const QUrl &filename) -+{ -+ Q_D(QFlatpakFileDialog); -+ -+ d->selectedFiles << filename.path(); -+} -+ -+QList QFlatpakFileDialog::selectedFiles() const -+{ -+ Q_D(const QFlatpakFileDialog); -+ -+ QList files; -+ for (const QString &file : d->selectedFiles) { -+ files << QUrl(file); -+ } -+ return files; -+} -+ -+void QFlatpakFileDialog::setFilter() -+{ -+ // TODO -+} -+ -+void QFlatpakFileDialog::selectNameFilter(const QString &filter) -+{ -+ Q_UNUSED(filter); -+ // TODO -+} -+ -+QString QFlatpakFileDialog::selectedNameFilter() const -+{ -+ // TODO -+ return QString(); -+} -+ -+void QFlatpakFileDialog::exec() -+{ -+ // HACK we have to avoid returning until we emit that the dialog was accepted or rejected -+ QEventLoop loop; -+ loop.connect(this, SIGNAL(accept()), SLOT(quit())); -+ loop.connect(this, SIGNAL(reject()), SLOT(quit())); -+ loop.exec(); -+} -+ -+void QFlatpakFileDialog::hide() -+{ -+} -+ -+bool QFlatpakFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) -+{ -+ Q_D(QFlatpakFileDialog); -+ Q_UNUSED(windowFlags); -+ -+ initializeDialog(); -+ -+ d->modal = windowModality != Qt::NonModal; -+ d->winId = parent ? parent->winId() : 0; -+ -+ openPortal(); -+ -+ return true; -+} -+ -+void QFlatpakFileDialog::gotResponse(uint response, const QVariantMap &results) -+{ -+ Q_D(QFlatpakFileDialog); -+ -+ if (!response) { -+ if (results.contains(QLatin1String("uris"))) -+ d->selectedFiles = results.value(QLatin1String("uris")).toStringList(); -+ -+ Q_EMIT accept(); -+ } else { -+ Q_EMIT reject(); -+ } -+} -+ -+QT_END_NAMESPACE -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h -new file mode 100644 -index 0000000..f3e195f ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h -@@ -0,0 +1,106 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2017 Red Hat, Inc -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+#ifndef QFLATPAKFILEDIALOG_P_H -+#define QFLATPAKFILEDIALOG_P_H -+ -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+class QFlatpakFileDialogPrivate; -+ -+class QFlatpakFileDialog : public QPlatformFileDialogHelper -+{ -+ Q_OBJECT -+ Q_DECLARE_PRIVATE(QFlatpakFileDialog) -+public: -+ enum ConditionType : uint { -+ GlobalPattern = 0, -+ MimeType = 1 -+ }; -+ // Filters a(sa(us)) -+ // Example: [('Images', [(0, '*.ico'), (1, 'image/png')]), ('Text', [(0, '*.txt')])] -+ struct FilterCondition { -+ ConditionType type; -+ QString pattern; // E.g. '*ico' or 'image/png' -+ }; -+ typedef QVector FilterConditionList; -+ -+ struct Filter { -+ QString name; // E.g. 'Images' or 'Text -+ FilterConditionList filterConditions;; // E.g. [(0, '*.ico'), (1, 'image/png')] or [(0, '*.txt')] -+ }; -+ typedef QVector FilterList; -+ -+ QFlatpakFileDialog(); -+ ~QFlatpakFileDialog(); -+ -+ bool defaultNameFilterDisables() const override; -+ QUrl directory() const override; -+ void setDirectory(const QUrl &directory) override; -+ void selectFile(const QUrl &filename) override; -+ QList selectedFiles() const override; -+ void setFilter() override; -+ void selectNameFilter(const QString &filter) override; -+ QString selectedNameFilter() const override; -+ -+ void exec() override; -+ bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; -+ void hide() override; -+ -+private Q_SLOTS: -+ void gotResponse(uint response, const QVariantMap &results); -+ -+private: -+ void initializeDialog(); -+ void openPortal(); -+ -+ QScopedPointer d_ptr; -+}; -+ -+QT_END_NAMESPACE -+ -+Q_DECLARE_METATYPE(QFlatpakFileDialog::FilterCondition); -+Q_DECLARE_METATYPE(QFlatpakFileDialog::FilterConditionList); -+Q_DECLARE_METATYPE(QFlatpakFileDialog::Filter); -+Q_DECLARE_METATYPE(QFlatpakFileDialog::FilterList); -+ -+#endif // QFLATPAKFILEDIALOG_P_H -+ -diff --git a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp -new file mode 100644 -index 0000000..04abd70 ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp -@@ -0,0 +1,254 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2017 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "qflatpaktheme.h" -+#include "qflatpakfiledialog_p.h" -+ -+#include -+#include -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+class QFlatpakThemePrivate : public QPlatformThemePrivate -+{ -+public: -+ QFlatpakThemePrivate() -+ : QPlatformThemePrivate() -+ { } -+ -+ ~QFlatpakThemePrivate() -+ { -+ delete baseTheme; -+ } -+ -+ QPlatformTheme *baseTheme; -+}; -+ -+QFlatpakTheme::QFlatpakTheme() -+ : d_ptr(new QFlatpakThemePrivate) -+{ -+ Q_D(QFlatpakTheme); -+ -+ QStringList themeNames; -+ themeNames += QGuiApplicationPrivate::platform_integration->themeNames(); -+ // 1) Look for a theme plugin. -+ for (const QString &themeName : qAsConst(themeNames)) { -+ d->baseTheme = QPlatformThemeFactory::create(themeName, nullptr); -+ if (d->baseTheme) -+ break; -+ } -+ -+ // 2) If no theme plugin was found ask the platform integration to -+ // create a theme -+ if (!d->baseTheme) { -+ for (const QString &themeName : qAsConst(themeNames)) { -+ d->baseTheme = QGuiApplicationPrivate::platform_integration->createPlatformTheme(themeName); -+ if (d->baseTheme) -+ break; -+ } -+ // No error message; not having a theme plugin is allowed. -+ } -+ -+ // 3) Fall back on the built-in "null" platform theme. -+ if (!d->baseTheme) -+ d->baseTheme = new QPlatformTheme; -+} -+ -+QPlatformMenuItem* QFlatpakTheme::createPlatformMenuItem() const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->createPlatformMenuItem(); -+ -+ return QPlatformTheme::createPlatformMenuItem(); -+} -+ -+QPlatformMenu* QFlatpakTheme::createPlatformMenu() const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->createPlatformMenu(); -+ -+ return QPlatformTheme::createPlatformMenu(); -+} -+ -+QPlatformMenuBar* QFlatpakTheme::createPlatformMenuBar() const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->createPlatformMenuBar(); -+ -+ return QFlatpakTheme::createPlatformMenuBar(); -+} -+ -+void QFlatpakTheme::showPlatformMenuBar() -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->showPlatformMenuBar(); -+ -+ return QFlatpakTheme::showPlatformMenuBar(); -+} -+ -+bool QFlatpakTheme::usePlatformNativeDialog(DialogType type) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (type == FileDialog) -+ return true; -+ -+ if (d->baseTheme) -+ return d->baseTheme->usePlatformNativeDialog(type); -+ -+ return QFlatpakTheme::usePlatformNativeDialog(type); -+} -+ -+QPlatformDialogHelper* QFlatpakTheme::createPlatformDialogHelper(DialogType type) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (type == FileDialog) -+ return new QFlatpakFileDialog; -+ -+ if (d->baseTheme) -+ return d->baseTheme->createPlatformDialogHelper(type); -+ -+ return QFlatpakTheme::createPlatformDialogHelper(type); -+} -+ -+#ifndef QT_NO_SYSTEMTRAYICON -+QPlatformSystemTrayIcon* QFlatpakTheme::createPlatformSystemTrayIcon() const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->createPlatformSystemTrayIcon(); -+ -+ return QPlatformTheme::createPlatformSystemTrayIcon(); -+} -+#endif -+ -+const QPalette *QFlatpakTheme::palette(Palette type) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->palette(type); -+ -+ return QPlatformTheme::palette(type); -+} -+ -+const QFont* QFlatpakTheme::font(Font type) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->font(type); -+ -+ return QPlatformTheme::font(type); -+} -+ -+QVariant QFlatpakTheme::themeHint(ThemeHint hint) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->themeHint(hint); -+ -+ return QPlatformTheme::themeHint(hint); -+} -+ -+QPixmap QFlatpakTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->standardPixmap(sp, size); -+ -+ return QPlatformTheme::standardPixmap(sp, size); -+} -+ -+QIcon QFlatpakTheme::fileIcon(const QFileInfo &fileInfo, -+ QPlatformTheme::IconOptions iconOptions) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->fileIcon(fileInfo, iconOptions); -+ -+ return QPlatformTheme::fileIcon(fileInfo, iconOptions); -+} -+ -+QIconEngine * QFlatpakTheme::createIconEngine(const QString &iconName) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->createIconEngine(iconName); -+ -+ return QPlatformTheme::createIconEngine(iconName); -+} -+ -+QList QFlatpakTheme::keyBindings(QKeySequence::StandardKey key) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->keyBindings(key); -+ -+ return QPlatformTheme::keyBindings(key); -+} -+ -+QString QFlatpakTheme::standardButtonText(int button) const -+{ -+ Q_D(const QFlatpakTheme); -+ -+ if (d->baseTheme) -+ return d->baseTheme->standardButtonText(button); -+ -+ return QPlatformTheme::standardButtonText(button); -+} -+ -+QT_END_NAMESPACE -diff --git a/src/plugins/platformthemes/flatpak/qflatpaktheme.h b/src/plugins/platformthemes/flatpak/qflatpaktheme.h -new file mode 100644 -index 0000000..fcaac5b ---- /dev/null -+++ b/src/plugins/platformthemes/flatpak/qflatpaktheme.h -@@ -0,0 +1,90 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2017 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#ifndef QFLATPAKTHEME_H -+#define QFLATPAKTHEME_H -+ -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+class QFlatpakThemePrivate; -+ -+class QFlatpakTheme : public QPlatformTheme -+{ -+ Q_DECLARE_PRIVATE(QFlatpakTheme) -+public: -+ QFlatpakTheme(); -+ -+ QPlatformMenuItem *createPlatformMenuItem() const override; -+ QPlatformMenu *createPlatformMenu() const override; -+ QPlatformMenuBar *createPlatformMenuBar() const override; -+ void showPlatformMenuBar() override; -+ -+ bool usePlatformNativeDialog(DialogType type) const override; -+ QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override; -+ -+#ifndef QT_NO_SYSTEMTRAYICON -+ QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override; -+#endif -+ -+ const QPalette *palette(Palette type = SystemPalette) const override; -+ -+ const QFont *font(Font type = SystemFont) const override; -+ -+ QVariant themeHint(ThemeHint hint) const override; -+ -+ QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override; -+ QIcon fileIcon(const QFileInfo &fileInfo, -+ QPlatformTheme::IconOptions iconOptions = 0) const; -+ -+ QIconEngine *createIconEngine(const QString &iconName) const override; -+ -+ QList keyBindings(QKeySequence::StandardKey key) const override; -+ -+ QString standardButtonText(int button) const override; -+ -+private: -+ QScopedPointer d_ptr; -+ Q_DISABLE_COPY(QFlatpakTheme) -+}; -+ -+QT_END_NAMESPACE -+ -+#endif // QFLATPAKTHEME_H -diff --git a/src/plugins/platformthemes/platformthemes.pro b/src/plugins/platformthemes/platformthemes.pro -index 0e2812b..ebf92ba 100644 ---- a/src/plugins/platformthemes/platformthemes.pro -+++ b/src/plugins/platformthemes/platformthemes.pro -@@ -1,4 +1,6 @@ - TEMPLATE = subdirs - QT_FOR_CONFIG += widgets-private - -+qtConfig(dbus): SUBDIRS += flatpak -+ - qtHaveModule(widgets):qtConfig(gtk3): SUBDIRS += gtk3 - diff --git a/patch/qtbase-flatpak-portals-services.patch b/patch/qtbase-flatpak-portals-services.patch deleted file mode 100644 index a4a3b4d..0000000 --- a/patch/qtbase-flatpak-portals-services.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 20abba60dae11e56f502215bd2f9c65486a26ab7 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Thu, 26 Oct 2017 13:33:12 +0200 -Subject: Add support for flatpak portals - -Adds support for OpenURI and Email Flatpak portals. To support them we -just do specific DBus calls, which are then caught and forwarded by -xdg-desktop-portal daemon/service. This is needed for Qt applications -running in sandbox, otherwise they cannot open links or email clients -inside sandbox. Other portal support, like for opening files can be -added into a platform theme, but adding support for OpenURI and Email -portal requires writing custom platform services plugin and this is only -possible when you write complete platform plugin, thus we want to have -this support directly in Qt. Support for other portals will most likely -follow soon, but at this moment we have to get rid of creating our -custom platform plugin to just have our own platform services for -flatpak support. - -[ChangeLog][Platform Specific Changes][Linux] Added support for flatpak -portals. Flatpak is a software utility for software deployment and -package management. It provides a sandbox environment in which users -can run applications in isolation from the rest of the system. To -communicate with the system flatpak uses portals, which are designed to -be a bridge between sandboxed applications and desktop/system running on -user's computer. Flatpak runs automatically this as service, called -xdg-desktop-portal, which exports portals on DBus and which are by -default visible to all applications running under Flatpak. - -Change-Id: Ice57ad120d30a3154b133172c79d8e9d6e61bd4c - -diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp -index cdb5d33859..cb1e367b9f 100644 ---- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp -+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp -@@ -49,6 +49,24 @@ - #include - #include - -+#if QT_CONFIG(dbus) -+// These QtCore includes are needed for flatpak support -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#endif // QT_CONFIG(dbus) -+ - #include - - QT_BEGIN_NAMESPACE -@@ -153,6 +171,83 @@ static inline bool launch(const QString &launcher, const QUrl &url) - return ok; - } - -+#if QT_CONFIG(dbus) -+static inline bool checkRunningUnderFlatpak() -+{ -+ return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty(); -+} -+ -+static inline bool flatpakOpenUrl(const QUrl &url) -+{ -+ // DBus signature: -+ // OpenURI (IN s parent_window, -+ // IN s uri, -+ // IN a{sv} options, -+ // OUT o handle) -+ // Options: -+ // writable (b) - Whether to allow the chosen application to write to the file. -+ // This key only takes effect the uri points to a local file that is exported in the document portal, -+ // and the chosen application is sandboxed itself. -+ -+ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), -+ QLatin1String("/org/freedesktop/portal/desktop"), -+ QLatin1String("org.freedesktop.portal.OpenURI"), -+ QLatin1String("OpenURI")); -+ // FIXME parent_window_id and handle writable option -+ message << QString() << url.toString() << QVariantMap(); -+ -+ QDBusPendingReply reply = QDBusConnection::sessionBus().call(message); -+ return !reply.isError(); -+} -+ -+static inline bool flatpakSendEmail(const QUrl &url) -+{ -+ // DBus signature: -+ // ComposeEmail (IN s parent_window, -+ // IN a{sv} options, -+ // OUT o handle) -+ // Options: -+ // address (s) - The email address to send to. -+ // subject (s) - The subject for the email. -+ // body (s) - The body for the email. -+ // attachment_fds (ah) - File descriptors for files to attach. -+ -+ QUrlQuery urlQuery(url); -+ QVariantMap options; -+ options.insert(QLatin1String("address"), url.path()); -+ options.insert(QLatin1String("subject"), urlQuery.queryItemValue(QLatin1String("subject"))); -+ options.insert(QLatin1String("body"), urlQuery.queryItemValue(QLatin1String("body"))); -+ -+ // O_PATH seems to be present since Linux 2.6.39, which is not case of RHEL 6 -+#ifdef O_PATH -+ QList attachments; -+ const QStringList attachmentUris = urlQuery.allQueryItemValues(QLatin1String("attachment")); -+ -+ for (const QString &attachmentUri : attachmentUris) { -+ const int fd = qt_safe_open(QFile::encodeName(attachmentUri), O_PATH); -+ if (fd != -1) { -+ QDBusUnixFileDescriptor descriptor(fd); -+ attachments << descriptor; -+ qt_safe_close(fd); -+ } -+ } -+ -+ options.insert(QLatin1String("attachment_fds"), QVariant::fromValue(attachments)); -+#endif -+ -+ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), -+ QLatin1String("/org/freedesktop/portal/desktop"), -+ QLatin1String("org.freedesktop.portal.Email"), -+ QLatin1String("ComposeEmail")); -+ -+ // FIXME parent_window_id -+ message << QString() << options; -+ -+ QDBusPendingReply reply = QDBusConnection::sessionBus().call(message); -+ return !reply.isError(); -+} -+#endif // QT_CONFIG(dbus) -+ - QByteArray QGenericUnixServices::desktopEnvironment() const - { - static const QByteArray result = detectDesktopEnvironment(); -@@ -161,8 +256,18 @@ QByteArray QGenericUnixServices::desktopEnvironment() const - - bool QGenericUnixServices::openUrl(const QUrl &url) - { -- if (url.scheme() == QLatin1String("mailto")) -+ if (url.scheme() == QLatin1String("mailto")) { -+#if QT_CONFIG(dbus) -+ if (checkRunningUnderFlatpak()) -+ return flatpakSendEmail(url); -+#endif - return openDocument(url); -+ } -+ -+#if QT_CONFIG(dbus) -+ if (checkRunningUnderFlatpak()) -+ return flatpakOpenUrl(url); -+#endif - - if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { - qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); -diff --git a/src/platformsupport/services/services.pro b/src/platformsupport/services/services.pro -index 91957a0a78..2027c7b5be 100644 ---- a/src/platformsupport/services/services.pro -+++ b/src/platformsupport/services/services.pro -@@ -2,6 +2,8 @@ TARGET = QtServiceSupport - MODULE = service_support - - QT = core-private gui-private -+qtConfig(dbus): QT += dbus -+ - CONFIG += static internal_module - - DEFINES += QT_NO_CAST_FROM_ASCII diff --git a/patch/qtwayland-compose.patch b/patch/qtwayland-compose.patch deleted file mode 100644 index 42f7be9..0000000 --- a/patch/qtwayland-compose.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp -index 4def0de8..90b27769 100644 ---- a/src/client/qwaylandinputdevice.cpp -+++ b/src/client/qwaylandinputdevice.cpp -@@ -70,6 +70,10 @@ - - #include - -+#if QT_CONFIG(xkbcommon_evdev) -+#include -+#endif -+ - QT_BEGIN_NAMESPACE - - namespace QtWaylandClient { -@@ -113,6 +117,7 @@ bool QWaylandInputDevice::Keyboard::createDefaultKeyMap() - qWarning() << "xkb_map_new_from_names failed, no key input"; - return false; - } -+ createComposeState(); - return true; - } - -@@ -125,11 +130,41 @@ void QWaylandInputDevice::Keyboard::releaseKeyMap() - if (mXkbContext) - xkb_context_unref(mXkbContext); - } -+ -+void QWaylandInputDevice::Keyboard::createComposeState() -+{ -+ static const char *locale = nullptr; -+ if (!locale) { -+ locale = getenv("LC_ALL"); -+ if (!locale) -+ locale = getenv("LC_CTYPE"); -+ if (!locale) -+ locale = getenv("LANG"); -+ if (!locale) -+ locale = "C"; -+ } -+ -+ mXkbComposeTable = xkb_compose_table_new_from_locale(mXkbContext, locale, XKB_COMPOSE_COMPILE_NO_FLAGS); -+ if (mXkbComposeTable) -+ mXkbComposeState = xkb_compose_state_new(mXkbComposeTable, XKB_COMPOSE_STATE_NO_FLAGS); -+} -+ -+void QWaylandInputDevice::Keyboard::releaseComposeState() -+{ -+ if (mXkbComposeState) -+ xkb_compose_state_unref(mXkbComposeState); -+ if (mXkbComposeTable) -+ xkb_compose_table_unref(mXkbComposeTable); -+ mXkbComposeState = nullptr; -+ mXkbComposeTable = nullptr; -+} -+ - #endif - - QWaylandInputDevice::Keyboard::~Keyboard() - { - #if QT_CONFIG(xkbcommon_evdev) -+ releaseComposeState(); - releaseKeyMap(); - #endif - if (mFocus) -@@ -632,6 +667,7 @@ void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd, - - // Release the old keymap resources in the case they were already created in - // the key event or when the compositor issues a new map -+ releaseComposeState(); - releaseKeyMap(); - - mXkbContext = xkb_context_new(xkb_context_flags(0)); -@@ -640,6 +676,8 @@ void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd, - close(fd); - - mXkbState = xkb_state_new(mXkbMap); -+ createComposeState(); -+ - #else - Q_UNUSED(format); - Q_UNUSED(fd); -@@ -723,12 +761,37 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, - return; - } - -- const xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState, code); -+ QString composedText; -+ xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState, code); -+ if (mXkbComposeState) { -+ if (isDown) -+ xkb_compose_state_feed(mXkbComposeState, sym); -+ xkb_compose_status status = xkb_compose_state_get_status(mXkbComposeState); -+ -+ switch (status) { -+ case XKB_COMPOSE_COMPOSED: { -+ int size = xkb_compose_state_get_utf8(mXkbComposeState, nullptr, 0); -+ QVarLengthArray buffer(size + 1); -+ xkb_compose_state_get_utf8(mXkbComposeState, buffer.data(), buffer.size()); -+ composedText = QString::fromUtf8(buffer.constData()); -+ sym = xkb_compose_state_get_one_sym(mXkbComposeState); -+ xkb_compose_state_reset(mXkbComposeState); -+ } break; -+ case XKB_COMPOSE_COMPOSING: -+ case XKB_COMPOSE_CANCELLED: -+ return; -+ case XKB_COMPOSE_NOTHING: -+ break; -+ } -+ } - - Qt::KeyboardModifiers modifiers = mParent->modifiers(); - - std::tie(qtkey, text) = QWaylandXkb::keysymToQtKey(sym, modifiers); - -+ if (!composedText.isNull()) -+ text = composedText; -+ - sendKey(window->window(), time, type, qtkey, modifiers, code, sym, mNativeModifiers, text); - #else - // Generic fallback for single hard keys: Assume 'key' is a Qt key code. -diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h -index 9e3d1d1f..b1424981 100644 ---- a/src/client/qwaylandinputdevice_p.h -+++ b/src/client/qwaylandinputdevice_p.h -@@ -76,6 +76,11 @@ - struct wl_cursor_image; - #endif - -+#if QT_CONFIG(xkbcommon_evdev) -+struct xkb_compose_state; -+struct xkb_compose_table; -+#endif -+ - QT_BEGIN_NAMESPACE - - namespace QtWaylandClient { -@@ -207,6 +212,8 @@ public: - xkb_context *mXkbContext; - xkb_keymap *mXkbMap; - xkb_state *mXkbState; -+ xkb_compose_table *mXkbComposeTable = nullptr; -+ xkb_compose_state *mXkbComposeState = nullptr; - #endif - uint32_t mNativeModifiers; - -@@ -228,6 +235,8 @@ private: - #if QT_CONFIG(xkbcommon_evdev) - bool createDefaultKeyMap(); - void releaseKeyMap(); -+ void createComposeState(); -+ void releaseComposeState(); - #endif - - }; diff --git a/patch/qtwayland-connectscreen.patch b/patch/qtwayland-connectscreen.patch deleted file mode 100644 index 0dee90e..0000000 --- a/patch/qtwayland-connectscreen.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp -index 5b43428d..680ebb71 100644 ---- a/src/client/qwaylandscreen.cpp -+++ b/src/client/qwaylandscreen.cpp -@@ -139,7 +139,8 @@ QList QWaylandScreen::virtualSiblings() const - const QList screens = mWaylandDisplay->screens(); - list.reserve(screens.count()); - foreach (QWaylandScreen *screen, screens) -- list << screen; -+ if (screen->screen()) -+ list << screen; - return list; - } -