Merge lp:~sil2100/kubuntu-packaging/qtbase-opensource-src_appmenu-qt5_support into lp:~kubuntu-packagers/kubuntu-packaging/qtbase-opensource-src

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 138
Proposed branch: lp:~sil2100/kubuntu-packaging/qtbase-opensource-src_appmenu-qt5_support
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qtbase-opensource-src
Diff against target: 119 lines (+102/-0)
3 files modified
debian/patches/make_qkdetheme_constructor_public.diff (+19/-0)
debian/patches/platformtheme_env.diff (+80/-0)
debian/patches/series (+3/-0)
To merge this branch: bzr merge lp:~sil2100/kubuntu-packaging/qtbase-opensource-src_appmenu-qt5_support
Reviewer Review Type Date Requested Status
Timo Jyrinki Approve
Review via email: mp+199642@code.launchpad.net

Commit message

Add two patches needed by appmenu-qt5 which are submitted and approved upstream

Description of the change

The following proposed patches are proposed upstream and approved:

https://codereview.qt-project.org/#change,73942
https://codereview.qt-project.org/#change,73829

Since the release of Qt5.2 is near, these are required for working appmenu-qt5 support (that's using the QPlatformThemePlugin QPA approach)

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Looks good, amd64 and i386 practically finished: https://launchpad.net/~canonical-qt5-edgers/+archive/qt5-daily/+sourcepub/3741335/+listing-archive-extra and there should be no reason why armhf should be failed.

But I need to do another upload since I forgot to enable the debug flags from the build which is wanted for PPA builds. Merging anyhow. It will reside in qt5-daily for the moment, and will be then copied later to qt5-beta2 again where the rest lies.

review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(because of the another upload that link is not strictly speaking relevant, other than showing the succeeded amd64 build)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/make_qkdetheme_constructor_public.diff'
2--- debian/patches/make_qkdetheme_constructor_public.diff 1970-01-01 00:00:00 +0000
3+++ debian/patches/make_qkdetheme_constructor_public.diff 2013-12-19 11:27:16 +0000
4@@ -0,0 +1,19 @@
5+Author: Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
6+Description: Make QKdeTheme constructor public to enable inheritance
7+ Make QKdeTheme constructor public, allowing for custom inheritance.
8+ There was no particular reason for the constructor being private, and
9+ we need it public for appmenu-qt5.
10+Bug-Upstream: https://bugreports.qt-project.org/browse/QTBUG-35566
11+
12+--- qtbase-opensource-src-5.2.0+dfsg.orig/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h 2013-12-08 18:09:47.000000000 +0100
13++++ qtbase-opensource-src-5.2.0+dfsg/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h 2013-12-19 11:44:33.262248200 +0100
14+@@ -86,8 +86,8 @@
15+ class QKdeTheme : public QPlatformTheme
16+ {
17+ Q_DECLARE_PRIVATE(QKdeTheme)
18+- QKdeTheme(const QString &kdeHome, int kdeVersion);
19+ public:
20++ QKdeTheme(const QString &kdeHome, int kdeVersion);
21+
22+ static QPlatformTheme *createKdeTheme();
23+ virtual QVariant themeHint(ThemeHint hint) const;
24
25=== added file 'debian/patches/platformtheme_env.diff'
26--- debian/patches/platformtheme_env.diff 1970-01-01 00:00:00 +0000
27+++ debian/patches/platformtheme_env.diff 2013-12-19 11:27:16 +0000
28@@ -0,0 +1,80 @@
29+Author: Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
30+Description: Add environment control on which platform theme to use
31+ Introduce a way of explicit selection of the platform theme to be used,
32+ either through a new environment variable - QT_QPA_PLATFORMTHEME, or by
33+ the optional -platformtheme command line argument.
34+Bug-Upstream: https://bugreports.qt-project.org/browse/QTBUG-30091
35+
36+--- qtbase-opensource-src-5.2.0+dfsg.orig/src/gui/kernel/qguiapplication.cpp 2013-12-08 18:09:52.000000000 +0100
37++++ qtbase-opensource-src-5.2.0+dfsg/src/gui/kernel/qguiapplication.cpp 2013-12-19 11:53:36.550232148 +0100
38+@@ -887,7 +887,7 @@
39+ *QGuiApplicationPrivate::platform_name : QString();
40+ }
41+
42+-static void init_platform(const QString &pluginArgument, const QString &platformPluginPath, int &argc, char **argv)
43++static void init_platform(const QString &pluginArgument, const QString &platformPluginPath, const QString &platformThemeName, int &argc, char **argv)
44+ {
45+ // Split into platform name and arguments
46+ QStringList arguments = pluginArgument.split(QLatin1Char(':'));
47+@@ -918,15 +918,21 @@
48+ }
49+
50+ // Create the platform theme:
51+- // 1) Ask the platform integration for a list of names.
52+- const QStringList themeNames = QGuiApplicationPrivate::platform_integration->themeNames();
53++
54++ // 1) Fetch the platform name from the environment if present.
55++ QStringList themeNames;
56++ if (!platformThemeName.isEmpty())
57++ themeNames.append(platformThemeName);
58++
59++ // 2) Ask the platform integration for a list of names and try loading them.
60++ themeNames += QGuiApplicationPrivate::platform_integration->themeNames();
61+ foreach (const QString &themeName, themeNames) {
62+ QGuiApplicationPrivate::platform_theme = QPlatformThemeFactory::create(themeName, platformPluginPath);
63+ if (QGuiApplicationPrivate::platform_theme)
64+ break;
65+ }
66+
67+- // 2) If none found, look for a theme plugin. Theme plugins are located in the
68++ // 3) If none found, look for a theme plugin. Theme plugins are located in the
69+ // same directory as platform plugins.
70+ if (!QGuiApplicationPrivate::platform_theme) {
71+ foreach (const QString &themeName, themeNames) {
72+@@ -937,7 +943,7 @@
73+ // No error message; not having a theme plugin is allowed.
74+ }
75+
76+- // 3) Fall back on the built-in "null" platform theme.
77++ // 4) Fall back on the built-in "null" platform theme.
78+ if (!QGuiApplicationPrivate::platform_theme)
79+ QGuiApplicationPrivate::platform_theme = new QPlatformTheme;
80+
81+@@ -997,6 +1003,8 @@
82+ platformName = platformNameEnv;
83+ }
84+
85++ QString platformThemeName = QString::fromLocal8Bit(qgetenv("QT_QPA_PLATFORMTHEME"));
86++
87+ // Get command line params
88+
89+ int j = argc ? 1 : 0;
90+@@ -1012,6 +1020,9 @@
91+ } else if (arg == "-platform") {
92+ if (++i < argc)
93+ platformName = argv[i];
94++ } else if (arg == "-platformtheme") {
95++ if (++i < argc)
96++ platformThemeName = QString::fromLocal8Bit(argv[i]);
97+ } else if (arg == "-qwindowgeometry" || (platformName == "xcb" && arg == "-geometry")) {
98+ if (++i < argc)
99+ windowGeometrySpecification = QWindowGeometrySpecification::fromArgument(argv[i]);
100+@@ -1025,7 +1036,7 @@
101+ argc = j;
102+ }
103+
104+- init_platform(QLatin1String(platformName), platformPluginPath, argc, argv);
105++ init_platform(QLatin1String(platformName), platformPluginPath, platformThemeName, argc, argv);
106+
107+ }
108+
109
110=== modified file 'debian/patches/series'
111--- debian/patches/series 2013-12-13 08:21:09 +0000
112+++ debian/patches/series 2013-12-19 11:27:16 +0000
113@@ -12,3 +12,6 @@
114 load_testability_from_env_var.patch
115 aarch64.patch
116 aarch64_fix_atomic_set.patch
117+
118+make_qkdetheme_constructor_public.diff
119+platformtheme_env.diff

Subscribers

People subscribed via source and target branches