diff --git a/docbook-install.sh b/docbook-install.sh new file mode 100644 --- /dev/null +++ b/docbook-install.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +mkdir docbook-xml +cd docbook-xml + +unzip ../docbook-xml-4.5.zip + +install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5 && +install -v -d -m755 /etc/xml && +cp -v -af docbook.cat *.dtd ent/ *.mod \ + /usr/share/xml/docbook/xml-dtd-4.5 + +cd .. + +tar xf docbook-xsl-1.79.2.tar.bz2 + +cd docbook-xsl-1.79.2 + +install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.79.2 && + +cp -v -R VERSION assembly common eclipse epub epub3 extensions fo \ + highlighting html htmlhelp images javahelp lib manpages params \ + profiling roundtrip slides template tests tools webhelp website \ + xhtml xhtml-1_1 xhtml5 \ + /usr/share/xml/docbook/xsl-stylesheets-1.79.2 && + +ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.79.2/VERSION.xsl && + +install -v -m644 -D README \ + /usr/share/doc/docbook-xsl-1.79.2/README.txt && +install -v -m644 RELEASE-NOTES* NEWS* \ + /usr/share/doc/docbook-xsl-1.79.2 diff --git a/org.kde.Sdk.json b/org.kde.Sdk.json --- a/org.kde.Sdk.json +++ b/org.kde.Sdk.json @@ -2,10 +2,10 @@ "build-runtime": true, "id": "org.kde.Sdk", "id-platform": "org.kde.Platform", - "branch": "5.11", + "branch": "5.12", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", - "runtime-version": "1.6", + "runtime-version": "18.08", "sdk-extensions": ["org.freedesktop.Sdk.Debug", "org.freedesktop.Sdk.Locale", "org.freedesktop.Sdk.Docs"], "platform-extensions": ["org.freedesktop.Platform.Locale"], "inherit-extensions": [ @@ -15,7 +15,7 @@ "org.freedesktop.Platform.Icontheme", "org.freedesktop.Sdk.Extension", "org.freedesktop.Platform.VAAPI.Intel", - "org.freedesktop.Platform.ffmpeg", + "org.freedesktop.Platform.html5-codecs", "org.gtk.Gtk3theme" ], "add-extensions": { @@ -29,7 +29,7 @@ "directory": "share/runtime/lib/plugins/", "subdirectories": true, "no-autodownload": true, - "version": "5.11", + "version": "5.12", "merge-dirs": "styles", "download-if": "active-gtk-theme" }, @@ -37,7 +37,7 @@ "directory": "share/runtime/lib/plugins/", "subdirectories": true, "no-autodownload": true, - "version": "5.11", + "version": "5.12", "merge-dirs": "platformthemes", "download-if": "on-gnome-platform" } @@ -55,8 +55,8 @@ "--filesystem=~/.config/dconf:ro", "--talk-name=com.canonical.AppMenu.Registrar", "--talk-name=com.canonical.AppMenu.Registrar.*", - "--sdk=org.kde.Sdk//5.11", - "--runtime=org.kde.Platform//5.11" + "--sdk=org.kde.Sdk//5.12", + "--runtime=org.kde.Platform//5.12" ], "cleanup": [ "/man", "/share/man", @@ -144,33 +144,13 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtbase-everywhere-src-5.11.3.tar.xz", - "sha256": "c6bf887732b83ce072eb72eddb7497bedcdf9ca794e7ed91261a93f063623e1c" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtbase-everywhere-src-5.12.0.tar.xz", + "sha256": "5e03221d780e121aabd734896aab8f331e5d8c9d9b54f1eb04907d0818eaeecb" }, { "type": "shell", "commands": [ "mv configure configure.qt" ] }, - { - "type": "patch", - "path": "patch/qtbase-portal-openuri.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-scalefactor.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch" - }, - { - "type": "patch", - "path": "patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch" - }, { "type": "script", "commands": [ @@ -188,8 +168,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtdeclarative-everywhere-src-5.11.3.tar.xz", - "sha256": "8e263621d706f1c4def5d71212a6ae37b0d3c378da89d9e3e5fc0b5557721ae6" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtdeclarative-everywhere-src-5.12.0.tar.xz", + "sha256": "4ffd58102b5714ae058f91cc31511f1c928978f77f01652beb9ce2352a4c227b" } ] }, @@ -205,8 +185,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qttools-everywhere-src-5.11.3.tar.xz", - "sha256": "c205e81bba9b87c6186604a05ab48e4e6cac0cd511525749dfd00b107b6f9f8e" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qttools-everywhere-src-5.12.0.tar.xz", + "sha256": "574ce34b6e5bcd5dce4020a3947730f3c2223eee65d0396a311099223364dac3" } ] }, @@ -217,8 +197,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtscript-everywhere-src-5.11.3.tar.xz", - "sha256": "bb84f3cc581078df4ff76705c5623cd88287f70f7405cbccf99e6fb6dedbec08" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtscript-everywhere-src-5.12.0.tar.xz", + "sha256": "97fe1a22e5d0e89d3850546c0771fe41707d4c40062dc16fae8e21bf6f8cffa8" } ] }, @@ -230,8 +210,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtwebchannel-everywhere-src-5.11.3.tar.xz", - "sha256": "3c254fa41b1af09c1e951131f3a1336dee70a15cbb8a82112488b38d29572df3" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtwebchannel-everywhere-src-5.12.0.tar.xz", + "sha256": "851af30ab951c7543c82640f46686227b244331ebf9235f963edcb7e5a184bf0" } ] }, @@ -242,8 +222,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtlocation-everywhere-src-5.11.3.tar.xz", - "sha256": "58e498a5b496e3a38925398b244bbd57ba68cbb482f2a0d2ae51572e037100eb" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtlocation-everywhere-src-5.12.0.tar.xz", + "sha256": "b0a3134df3a00f6045405d3c12e0ea3ae7e640feaf38e238873df85424674449" } ] }, @@ -280,8 +260,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtwebengine-everywhere-src-5.11.3.tar.xz", - "sha256": "5bb49ead71b851db4dc56f8fd97e0db72a268b22104129a06bac201d55d3b8fe" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtwebengine-everywhere-src-5.12.0.tar.xz", + "sha256": "bd581e390a30e0f74d41b0e3334b3cf612dd4af23de36a3bf5931d5b4453687c" }, { "type": "patch", @@ -296,8 +276,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtsvg-everywhere-src-5.11.3.tar.xz", - "sha256": "21ea2c9c4e78101e98163bc19e463b8d8cdffa20e1ccd523ccc925b9f2cd4491" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtsvg-everywhere-src-5.12.0.tar.xz", + "sha256": "ebe68d8ad73b6b8d8eabac81edcbf395838caf4d498d6b047c74b57341c3fbce" } ] }, @@ -308,8 +288,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtx11extras-everywhere-src-5.11.3.tar.xz", - "sha256": "f99eebe685f7cdbb71cd62903c2b2511548345535841bcc3f6b662205815cd85" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtx11extras-everywhere-src-5.12.0.tar.xz", + "sha256": "06d4b4e9868d206f07ae4e884c46d46a5540172a85ce67d829fdb1fba7228b84" } ] }, @@ -320,8 +300,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtmultimedia-everywhere-src-5.11.3.tar.xz", - "sha256": "728078eff7dc21495d704a7cd17c604d74604604b45a3c58271608f90dea3c41" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtmultimedia-everywhere-src-5.12.0.tar.xz", + "sha256": "5c4b0cb9c08c57ce1aad3aee267c6f6270d254addfb2a6dd363a272e98e926a9" } ] }, @@ -332,8 +312,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtsensors-everywhere-src-5.11.3.tar.xz", - "sha256": "a75753d1d5607d4cb27b1849ea9612a65bb3a5271bb31bf0817edd143b620859" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtsensors-everywhere-src-5.12.0.tar.xz", + "sha256": "c53132847a1f70d5a4c5fe689a9943d8afae3f3648bf5b0d824015093addc5a6" } ] }, @@ -344,8 +324,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtquickcontrols-everywhere-src-5.11.3.tar.xz", - "sha256": "4e4e5da02ab0b06d35b09356170013cfe36a773d15f92281f7e6d085c3f07537" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtquickcontrols-everywhere-src-5.12.0.tar.xz", + "sha256": "2bfb63240beed6926be429310e91b33df836fe38bcaf9de6883d5e781511cd73" } ] }, @@ -356,8 +336,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtquickcontrols2-everywhere-src-5.11.3.tar.xz", - "sha256": "f45630b652585b62204405b28432977e67c148ca5f1789a794654fd6c1bad086" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtquickcontrols2-everywhere-src-5.12.0.tar.xz", + "sha256": "89777e2ee89a08d203e0e394be0c47dc52008ea58506f4b3bdf1a696c5907dc6" } ] }, @@ -368,8 +348,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtgraphicaleffects-everywhere-src-5.11.3.tar.xz", - "sha256": "14d86983fcdd119daefad235ffee7d8ca691e6074ef360cb6347b8aae66f57e2" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtgraphicaleffects-everywhere-src-5.12.0.tar.xz", + "sha256": "81058fb12d4dd019bed6bb196a13ea5d308a390d72a1468da11171f8c3003455" } ] }, @@ -380,8 +360,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtxmlpatterns-everywhere-src-5.11.3.tar.xz", - "sha256": "8bd00be30722570d22382b99679d07787a2d62d4891d1c47d738d634e2db0eee" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtxmlpatterns-everywhere-src-5.12.0.tar.xz", + "sha256": "f36279bcafb8052a0b60edd473e1d341b4733a43eb26239848b4382303679375" } ] }, @@ -392,8 +372,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtimageformats-everywhere-src-5.11.3.tar.xz", - "sha256": "04b261bc3d7a277fbe9ac8619ecd037d7089b356eaee41b2d41d7a2ff58b087f" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtimageformats-everywhere-src-5.12.0.tar.xz", + "sha256": "5f907de96d3db6276816f321b7e11cba7beb1fcc81bcb3f1729cde3b7599732e" } ] }, @@ -404,8 +384,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtconnectivity-everywhere-src-5.11.3.tar.xz", - "sha256": "148cfcbceb3d0a70059f4d92fa069baf56babb627b16a4203b318ca6f0d0b32a" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtconnectivity-everywhere-src-5.12.0.tar.xz", + "sha256": "8ebca1ba859ebb5b0e8e6fffff1f8131dd84f9e44448df6ac58c8be32b5122a4" } ] }, @@ -416,8 +396,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtwayland-everywhere-src-5.11.3.tar.xz", - "sha256": "62c94f29e461c849e479f39d21577b0c72f0f084250e126021edcf0719271fb2" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtwayland-everywhere-src-5.12.0.tar.xz", + "sha256": "555c2d1b31733735d94c228f5f9183ea8216d61f85e30af08044763639d97ed7" } ] }, @@ -428,8 +408,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtvirtualkeyboard-everywhere-src-5.11.3.tar.xz", - "sha256": "8c5c40245a9dd2e9e504ce2d47d45079d8280436146797b24b8115ef163b4b9e" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtvirtualkeyboard-everywhere-src-5.12.0.tar.xz", + "sha256": "db93b89ba13ec1a688850f456be9f10037033cebf7b4deb151ed9f5322d0d6da" } ] }, @@ -440,8 +420,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtserialport-everywhere-src-5.11.3.tar.xz", - "sha256": "96c45e6d0d470626815f82b38ee48bf941e1bbfc10863087b69cc5f7bb766bda" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtserialport-everywhere-src-5.12.0.tar.xz", + "sha256": "59d4005695089c6b50fc5123094125d9224c1715655128640158a2404075a9bb" } ] }, @@ -452,8 +432,20 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtwebsockets-everywhere-src-5.11.3.tar.xz", - "sha256": "021090c1a92f11fcf2914168741c1364235896793685b7fae2bc23e3dd55d5b9" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtwebsockets-everywhere-src-5.12.0.tar.xz", + "sha256": "444da1c1d32910738a01b8251c1ccc3ffe4df148f125bb4af532b247ad74fc3f" + } + ] + }, + { + "name": "qt5-qtwebglplugin", + "buildsystem": "qmake", + "cleanup-platform": [ "/bin", "/mkspecs" ], + "sources": [ + { + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtwebglplugin-everywhere-src-5.12.0.tar.xz", + "sha256": "65223ad13a46e38343a621459a60ea25bc9e74d6549bf62a2d54d839c66b652e" } ] }, @@ -464,8 +456,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtcharts-everywhere-src-5.11.3.tar.xz", - "sha256": "4798f3ebc4d937d1c190db7ff718ad5affa907caa56b5557e593f6b5a60d95dc" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtcharts-everywhere-src-5.12.0.tar.xz", + "sha256": "9cd71c4a4c10611083ce8f16992c59666d51b5275cc1a79f324ee18579ced450" } ] }, @@ -476,8 +468,8 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qt3d-everywhere-src-5.11.3.tar.xz", - "sha256": "04a55c21f365d897ec75042ee83f9ad59a847992c6f55fae0763ad2701d99eab" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qt3d-everywhere-src-5.12.0.tar.xz", + "sha256": "a12adc9c14ffa18ff5c4951efb41914d4840a0c2a88486eb8d39a4833e4631da" } ] }, @@ -488,8 +480,20 @@ "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.11/5.11.3/submodules/qtspeech-everywhere-src-5.11.3.tar.xz", - "sha256": "b92fd9ae33d78b6a080e154c80208c8998e3481bec4b84dc2be56dd0f03f1795" + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtspeech-everywhere-src-5.12.0.tar.xz", + "sha256": "1939a2ece528b115e4682dba7fa7138c132c62bb88db7d1f3552c543a1e2a4fb" + } + ] + }, + { + "name": "qt5-qtremoteobjects", + "buildsystem": "qmake", + "cleanup-platform": [ "/bin", "/mkspecs" ], + "sources": [ + { + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.12/5.12.0/submodules/qtremoteobjects-everywhere-src-5.12.0.tar.xz", + "sha256": "0940d0a4a961b64f38c52a2e5638c2b3341fe46bd6bd88d1c638707f42159d5f" } ] }, @@ -652,6 +656,27 @@ } ] }, + { + "name": "docbook", + "buildsystem": "simple", + "build-commands": [ "chmod a+x docbook-install.sh", "./docbook-install.sh" ], + "sources": [ + { + "type": "file", + "url": "http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip", + "sha256": "4e4e037a2b83c98c6c94818390d4bdd3f6e10f6ec62dd79188594e26190dc7b4" + }, + { + "type": "file", + "url": "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F1.79.2/docbook-xsl-1.79.2.tar.bz2", + "sha256": "316524ea444e53208a2fb90eeb676af755da96e1417835ba5f5eb719c81fa371" + }, + { + "type": "file", + "path": "docbook-install.sh" + } + ] + }, { "name": "kdoctools", "config-opts": [ "-DENABLE_TESTING=OFF" ], @@ -908,6 +933,9 @@ "name": "plasma-integration", "buildsystem": "cmake-ninja", "config-opts": [ "-DENABLE_TESTING=OFF" ], + "build-options" : { + "ldflags": "-fstack-protector-strong -Wl,-z,relro,-z,now -fuse-ld=gold" + }, "sources": [ { "type": "git", "url": "git://anongit.kde.org/plasma-integration.git", "branch": "Plasma/5.14" } ] }, { diff --git a/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch b/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch deleted file mode 100644 --- a/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch +++ /dev/null @@ -1,67 +0,0 @@ -From a72c47c16e18a6625ef2c782bddafd120848459e Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Wed, 6 Jun 2018 17:22:38 +0200 -Subject: Keep native file dialog updated with current options - -When doing calls on native file dialog, we might end up calling an -implementation which will cause crash in case we don't have all options -loaded in the native file dialog. Imagine scenario when you want to save -a file, it sets acceptMode() to QFileDialogOptions::AcceptSave, which is -set to our flatpak file dialog, but not passed through to the native one -loaded inside. Then method calls like selectFile() might crash, like -in case of Gtk3 dialog, because its implementation asks for acceptMode, -but it's not set yet and thus we end up with crash. - -Change-Id: I7a4239cb8b46ff6b08e2cfc1dd6abb9d9600aef8 - -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -index ce835eaa23..6ea8242d8a 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -@@ -279,8 +279,10 @@ void QFlatpakFileDialog::setDirectory(const QUrl &directory) - { - Q_D(QFlatpakFileDialog); - -- if (d->nativeFileDialog) -+ if (d->nativeFileDialog) { -+ d->nativeFileDialog->setOptions(options()); - d->nativeFileDialog->setDirectory(directory); -+ } - - d->directory = directory.path(); - } -@@ -299,8 +301,10 @@ void QFlatpakFileDialog::selectFile(const QUrl &filename) - { - Q_D(QFlatpakFileDialog); - -- if (d->nativeFileDialog) -+ if (d->nativeFileDialog) { -+ d->nativeFileDialog->setOptions(options()); - d->nativeFileDialog->selectFile(filename); -+ } - - d->selectedFiles << filename.path(); - } -@@ -323,16 +327,20 @@ void QFlatpakFileDialog::setFilter() - { - Q_D(QFlatpakFileDialog); - -- if (d->nativeFileDialog) -+ if (d->nativeFileDialog) { -+ d->nativeFileDialog->setOptions(options()); - d->nativeFileDialog->setFilter(); -+ } - } - - void QFlatpakFileDialog::selectNameFilter(const QString &filter) - { - Q_D(QFlatpakFileDialog); - -- if (d->nativeFileDialog) -+ if (d->nativeFileDialog) { -+ d->nativeFileDialog->setOptions(options()); - d->nativeFileDialog->selectNameFilter(filter); -+ } - } - - QString QFlatpakFileDialog::selectedNameFilter() const diff --git a/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch b/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch deleted file mode 100644 --- a/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 528c5a461684d03e59cc01769e24ab115f030c5a Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Wed, 23 May 2018 09:06:46 +0200 -Subject: Open native file dialog inside sandbox when opening directories - -Flatpak FileChooser portal doesn't support opening and exporting -directories to the sandbox as it's not technically possible. Files are -simply exported through document-portal, but directories are a different -story. We have to, in case we want to open a directory, use native file -dialog provided by platform theme we have loaded into flatpak platform -theme. Applications which need to open directories to be able to work, -like IDEs, music players, will have enabled access ho host's filesystem -anyway so it's fine to open a file dialog inside sandbox. - -[ChangeLog][Linux] QFileDialog will use the native dialogs provided by -the platform theme instead of trying to use Flatpak portal to select -directories. - -Change-Id: I0716193bb9878aa621b8ca88506f87c72f690887 - -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -index 186084abd4..d352294972 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -@@ -101,6 +101,10 @@ const QDBusArgument &operator >>(const QDBusArgument &arg, QFlatpakFileDialog::F - class QFlatpakFileDialogPrivate - { - public: -+ QFlatpakFileDialogPrivate(QPlatformFileDialogHelper *nativeFileDialog) -+ : nativeFileDialog(nativeFileDialog) -+ { } -+ - WId winId = 0; - bool modal = false; - bool multipleFiles = false; -@@ -111,12 +115,19 @@ public: - QStringList nameFilters; - QStringList mimeTypesFilters; - QStringList selectedFiles; -+ QPlatformFileDialogHelper *nativeFileDialog = nullptr; - }; - --QFlatpakFileDialog::QFlatpakFileDialog() -+QFlatpakFileDialog::QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog) - : QPlatformFileDialogHelper() -- , d_ptr(new QFlatpakFileDialogPrivate) -+ , d_ptr(new QFlatpakFileDialogPrivate(nativeFileDialog)) - { -+ Q_D(QFlatpakFileDialog); -+ -+ if (d->nativeFileDialog) { -+ connect(d->nativeFileDialog, SIGNAL(accept()), this, SIGNAL(accept())); -+ connect(d->nativeFileDialog, SIGNAL(reject()), this, SIGNAL(reject())); -+ } - } - - QFlatpakFileDialog::~QFlatpakFileDialog() -@@ -127,6 +138,9 @@ void QFlatpakFileDialog::initializeDialog() - { - Q_D(QFlatpakFileDialog); - -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->setOptions(options()); -+ - if (options()->fileMode() == QFileDialogOptions::ExistingFiles) - d->multipleFiles = true; - -@@ -265,6 +279,9 @@ void QFlatpakFileDialog::setDirectory(const QUrl &directory) - { - Q_D(QFlatpakFileDialog); - -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->setDirectory(directory); -+ - d->directory = directory.path(); - } - -@@ -272,6 +289,9 @@ QUrl QFlatpakFileDialog::directory() const - { - Q_D(const QFlatpakFileDialog); - -+ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ return d->nativeFileDialog->directory(); -+ - return d->directory; - } - -@@ -279,6 +299,9 @@ void QFlatpakFileDialog::selectFile(const QUrl &filename) - { - Q_D(QFlatpakFileDialog); - -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->selectFile(filename); -+ - d->selectedFiles << filename.path(); - } - -@@ -286,6 +309,9 @@ QList QFlatpakFileDialog::selectedFiles() const - { - Q_D(const QFlatpakFileDialog); - -+ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ return d->nativeFileDialog->selectedFiles(); -+ - QList files; - for (const QString &file : d->selectedFiles) { - files << QUrl(file); -@@ -295,13 +321,18 @@ QList QFlatpakFileDialog::selectedFiles() const - - void QFlatpakFileDialog::setFilter() - { -- // TODO -+ Q_D(QFlatpakFileDialog); -+ -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->setFilter(); - } - - void QFlatpakFileDialog::selectNameFilter(const QString &filter) - { -- Q_UNUSED(filter); -- // TODO -+ Q_D(QFlatpakFileDialog); -+ -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->selectNameFilter(filter); - } - - QString QFlatpakFileDialog::selectedNameFilter() const -@@ -312,6 +343,13 @@ QString QFlatpakFileDialog::selectedNameFilter() const - - void QFlatpakFileDialog::exec() - { -+ Q_D(QFlatpakFileDialog); -+ -+ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) { -+ d->nativeFileDialog->exec(); -+ return; -+ } -+ - // 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())); -@@ -321,18 +359,24 @@ void QFlatpakFileDialog::exec() - - void QFlatpakFileDialog::hide() - { -+ Q_D(QFlatpakFileDialog); -+ -+ if (d->nativeFileDialog) -+ d->nativeFileDialog->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; - -+ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ return d->nativeFileDialog->show(windowFlags, windowModality, parent); -+ - openPortal(); - - return true; -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h -index f3e195faa0..bd1dae209d 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h -@@ -69,7 +69,7 @@ public: - }; - typedef QVector FilterList; - -- QFlatpakFileDialog(); -+ QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr); - ~QFlatpakFileDialog(); - - bool defaultNameFilterDisables() const override; -diff --git a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp -index 6c5e1389cf..142d91a00b 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp -+++ b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp -@@ -130,8 +130,12 @@ QPlatformDialogHelper* QFlatpakTheme::createPlatformDialogHelper(DialogType type - { - Q_D(const QFlatpakTheme); - -- if (type == FileDialog) -+ if (type == FileDialog) { -+ if (d->baseTheme->usePlatformNativeDialog(type)) -+ return new QFlatpakFileDialog(static_cast(d->baseTheme->createPlatformDialogHelper(type))); -+ - return new QFlatpakFileDialog; -+ } - - return d->baseTheme->createPlatformDialogHelper(type); - } diff --git a/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch b/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch deleted file mode 100644 --- a/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b73f4e82d8381a2a8cb6fa01619789abae6b8ea1 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Mon, 28 May 2018 10:58:27 +0200 -Subject: Make sure we open native dialogs when opening folders inside sandbox - -We have to take obsoleted QFileDialog::DirectoryOnly file mode option -into account, because it is actually used, even internally in Qt when -using static QFileDialog::getExistingDirectory() method. - -Change-Id: I6cdd35ae4724a1d889a0fb1c3555dc3ca4f3bf4d - -diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -index ce835eaa23..b170abbdf6 100644 ---- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp -@@ -289,7 +289,7 @@ QUrl QFlatpakFileDialog::directory() const - { - Q_D(const QFlatpakFileDialog); - -- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) - return d->nativeFileDialog->directory(); - - return d->directory; -@@ -309,7 +309,7 @@ QList QFlatpakFileDialog::selectedFiles() const - { - Q_D(const QFlatpakFileDialog); - -- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) - return d->nativeFileDialog->selectedFiles(); - - QList files; -@@ -345,7 +347,7 @@ void QFlatpakFileDialog::exec() - { - Q_D(QFlatpakFileDialog); - -- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) { -+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) { - d->nativeFileDialog->exec(); - return; - } -@@ -374,7 +376,7 @@ bool QFlatpakFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - d->modal = windowModality != Qt::NonModal; - d->winId = parent ? parent->winId() : 0; - -- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) -+ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) - return d->nativeFileDialog->show(windowFlags, windowModality, parent); - - openPortal(); diff --git a/patch/qtbase-portal-openuri.patch b/patch/qtbase-portal-openuri.patch deleted file mode 100644 --- a/patch/qtbase-portal-openuri.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 369e7572bac94bb5b83ef881012fdc4a86829496 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Thu, 12 Apr 2018 10:56:47 +0200 -Subject: [PATCH] Add support for opening files in OpenURI flatpak portal - -Adds support for opening files in applications outside sandbox. To prove -we have access to given file, we have to pass it as file descriptor. The -user then gets a dialog with list of application which can be used to -open given file. - -Change-Id: Ifb4cf3dece15d0792b8eb1b90a240da2d3f3c89e -Reviewed-by: Thiago Macieira ---- - .../genericunix/qgenericunixservices.cpp | 39 +++++++++++++++++++ - 1 file changed, 39 insertions(+) - -diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp -index cb1e367b9f..adfa3121e0 100644 ---- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp -+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp -@@ -177,6 +177,39 @@ static inline bool checkRunningUnderFlatpak() - return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty(); - } - -+static inline bool flatpakOpenFile(const QUrl &url) -+{ -+ // DBus signature: -+ // OpenFile (IN s parent_window, -+ // IN h fd, -+ // IN a{sv} options, -+ // OUT o handle) -+ // Options: -+ // handle_token (s) - A string that will be used as the last element of the @handle. -+ // writable (b) - Whether to allow the chosen application to write to the file. -+ -+#ifdef O_PATH -+ const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH); -+ if (fd != -1) { -+ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), -+ QLatin1String("/org/freedesktop/portal/desktop"), -+ QLatin1String("org.freedesktop.portal.OpenURI"), -+ QLatin1String("OpenFile")); -+ -+ QDBusUnixFileDescriptor descriptor(fd); -+ qt_safe_close(fd); -+ -+ // FIXME parent_window_id and handle writable option -+ message << QString() << QVariant::fromValue(descriptor) << QVariantMap(); -+ -+ QDBusPendingReply reply = QDBusConnection::sessionBus().call(message); -+ return !reply.isError(); -+ } -+#endif -+ -+ return false; -+} -+ - static inline bool flatpakOpenUrl(const QUrl &url) - { - // DBus signature: -@@ -185,6 +218,7 @@ static inline bool flatpakOpenUrl(const QUrl &url) - // IN a{sv} options, - // OUT o handle) - // Options: -+ // handle_token (s) - A string that will be used as the last element of the @handle. - // 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. -@@ -278,6 +312,11 @@ bool QGenericUnixServices::openUrl(const QUrl &url) - - bool QGenericUnixServices::openDocument(const QUrl &url) - { -+#if QT_CONFIG(dbus) -+ if (checkRunningUnderFlatpak()) -+ return flatpakOpenFile(url); -+#endif -+ - if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { - qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); - return false; --- -2.17.0 - diff --git a/patch/qtbase-scalefactor.patch b/patch/qtbase-scalefactor.patch deleted file mode 100644 --- a/patch/qtbase-scalefactor.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 23b139038a1dc9a769a358ab112453abcdd39290 Mon Sep 17 00:00:00 2001 -From: Mathieu Velten -Date: Sat, 3 Mar 2018 12:23:51 +0100 -Subject: xcb: round down the scale factor for values < 0.8 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This solves huge UI on some (most ?) HD 13 inches that have -a calculated scale factor around 1.75. - -Task-number: QTBUG-53022 QTBUG-57211 -Change-Id: I6cc22d3e47d38cb1d5a0daf5646a936256664e48 -Reviewed-by: MÃ¥rten Nordheim -Reviewed-by: Frederik Gladhorn ---- - src/plugins/platforms/xcb/qxcbscreen.cpp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp -index df458e85d7..e1bd8eb752 100644 ---- a/src/plugins/platforms/xcb/qxcbscreen.cpp -+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp -@@ -750,7 +750,12 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation) - m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi()); - - qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4); -- m_pixelDensity = qMax(1, qRound(dpi/96)); -+ qreal rawFactor = dpi/96; -+ int roundedFactor = qFloor(rawFactor); -+ // Round up for .8 and higher. This favors "small UI" over "large UI". -+ if (rawFactor - roundedFactor >= 0.8) -+ roundedFactor = qCeil(rawFactor); -+ m_pixelDensity = qMax(1, roundedFactor); - m_geometry = geometry; - m_availableGeometry = geometry & m_virtualDesktop->workArea(); - QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); --- -cgit v1.1-6-g87c4 - diff --git a/patch/qtwebengine-no-udev.patch b/patch/qtwebengine-no-udev.patch --- a/patch/qtwebengine-no-udev.patch +++ b/patch/qtwebengine-no-udev.patch @@ -1,12 +1,14 @@ -diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 70f1cf81..1564d271 100644 ---- a/src/core/config/desktop_linux.pri -+++ b/src/core/config/desktop_linux.pri -@@ -5,4 +5,7 @@ gn_args += \ +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -6,7 +6,7 @@ + use_gio=false \ + use_gnome_keyring=false \ + linux_use_bundled_binutils=false \ +- use_udev=true \ ++ use_udev=false \ + use_bundled_fontconfig=false \ + use_sysroot=false \ enable_session_service=false \ - toolkit_views=false - -+# Disable UDev -+gn_args += use_udev=false -+ - !use_gold_linker: gn_args += use_gold=false + diff --git a/patch/qtwebkit-version.patch b/patch/qtwebkit-version.patch deleted file mode 100644 --- a/patch/qtwebkit-version.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/.qmake.conf b/.qmake.conf -index d3a37eb..0be656f 100644 ---- a/.qmake.conf -+++ b/.qmake.conf -@@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake) - QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR - load(qt_build_config) - --MODULE_VERSION = 5.7.1 -+MODULE_VERSION = 5.7.0