Improved context sensitive help

- create utilty function CGuiApplication::triggerShowHelp
- this function also uses "QWhatsThis::leaveWhatsThisMode" which solves the problem that the help was not properly called a 2nd time
- adjusted using classes
This commit is contained in:
Klaus Basan
2018-07-13 18:12:23 +02:00
parent e90eb06f44
commit 1b8e79f77b
11 changed files with 60 additions and 20 deletions

View File

@@ -75,14 +75,8 @@ namespace BlackGui
bool CConfigurationWizard::event(QEvent *event)
{
if (event->type() != QEvent::EnterWhatsThisMode) { return QDialog::event(event); }
const QPointer<CConfigurationWizard> myself(this);
QTimer::singleShot(0, this, [ = ]
{
if (myself.isNull() || !sGui || sGui->isShuttingDown()) { return; }
sGui->showHelp(this);
});
return true;
if (CGuiApplication::triggerShowHelp(this, event)) { return true; }
return QDialog::event(event);
}
void CConfigurationWizard::wizardCurrentIdChanged(int id)