Qt5 Platform Abstraction for Ubuntu appmenu

Registered by Łukasz Zemczak on 2013-03-26

With the release of Qt5 our appmenu changes upstream have been dropped in favor of the QPA theme QPlatformMenuBar interface. Now QPA is the recommended way of implementing platform-specific menu bars. The API for such platform menu bars is very different from the one we have used in Qt4, therefore we need to redesign appmenu-qt to fit the new QPA model and submit it upstream.

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Łukasz Zemczak
Direction:
Needs approval
Assignee:
Łukasz Zemczak
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Łukasz Zemczak on 2013-05-28
Completed by
Łukasz Zemczak on 2014-03-27

Related branches

Sprints

Whiteboard

Current idea:

Creating a Ubuntu QPlatformTheme plugin to be loaded from plugins/platformthemes by QPlatformThemeFactory.

Rationale:
The first idea was to sub-class the xcb QPA platform and add a QPlatformTheme to it for our needs. Samuel Rødal pointed out that this is not necessary, as qguiapplication.cpp first attempts to create the QPlatformTheme by using QPlatformThemeFactory::create(), which loads custom platform themes from a selected plugin directory. This way we could implement only the QPlatformTheme outside of Qt5 source-tree in the appmenu-qt5 package.
This is a very clean solution. We would basically have the existing plugin architecture, just using the QPA framework. Some work-items have been added related to the analysis of this approach.

(?)

Work Items

Work items:
[sil2100] Prepare the temporary back-ported from Qt4 support: DONE
[sil2100] Check the accessibility of existing platforms during a outside-of-Qt5 build: DONE
[sil2100] Check the QPlatformThemeFactory::create() framework: DONE
[sil2100] Analyze the QGnomeTheme and QKdeTheme implementations, check if we'll need to reimplement any of their code: DONE
[sil2100] Design the QPA appmenu architecture: DONE
[sil2100] Implement the QPA appmenu: DONE
Testing: INPROGRESS

This blueprint contains Public information 
Everyone can see this information.