Core: Minimize directly accessible SettingsDialog interface

Only the getSettingsDialog + exec combination was ever used. Make
that accessible by a free function, move everything else to
settingdialog.cpp.

Take the opportunity for some code cosmetics and remove a few
indirections by using direct members instead of pointers where
appropriate.

Change-Id: I14bc47395a85045ab439d418da0bc459add844bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2018-02-01 15:20:16 +01:00
parent 29a4419c07
commit 892546bd6a
3 changed files with 112 additions and 156 deletions

View File

@@ -358,13 +358,7 @@ void ICore::showNewItemDialog(const QString &title,
bool ICore::showOptionsDialog(const Id page, QWidget *parent)
{
// Make sure all wizards are there when the user might access the keyboard shortcuts:
(void) IWizardFactory::allWizardFactories();
if (!parent)
parent = dialogParent();
SettingsDialog *dialog = SettingsDialog::getSettingsDialog(parent, page);
return dialog->execDialog();
return executeSettingsDialog(parent ? parent : dialogParent(), page);
}
QString ICore::msgShowOptionsDialog()