ActionManager: transfer ownership from main window to core plugin

Also make a bit less dependent on main window:
- Menus do not need to start with main window as parent.
- Centering the presentation label on the main window is wrong in the
presence of extra windows anyhow. It should be centered on the active
window.

Unfortunately, actions still must be added to the main window, because
actions that are not children of visible widgets do not trigger.

Change-Id: Ibb99644a3723de476db465ebe6a9cdc0820ea692
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-01-06 14:00:34 +01:00
parent dc86025879
commit e40477cc81
7 changed files with 39 additions and 29 deletions

View File

@@ -167,6 +167,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
ActionManager::initialize(this);
Theme::initialPalette(); // Initialize palette before setting it
qsrand(QDateTime::currentDateTime().toTime_t());
parseArguments(arguments);