Qt5 Platform Abstraction for Ubuntu appmenu
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
- Completed by
- Łukasz Zemczak
Whiteboard
Current idea:
Creating a Ubuntu QPlatformTheme plugin to be loaded from plugins/
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 QPlatformThemeF
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 QPlatformThemeF
[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