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

Subscribers

People subscribed via source and target branches