mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
tell QObject to give the desired children right away
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
parent
2e59196e6b
commit
d19cfec457
1 changed files with 6 additions and 11 deletions
|
@ -129,18 +129,13 @@ void UserManual::linkClickedSlot(const QUrl& url)
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
void UserManual::showEvent(QShowEvent *e) {
|
void UserManual::showEvent(QShowEvent *e) {
|
||||||
filterAction = NULL;
|
|
||||||
closeAction = NULL;
|
|
||||||
MainWindow *m = MainWindow::instance();
|
MainWindow *m = MainWindow::instance();
|
||||||
Q_FOREACH (QObject *o, m->children()) {
|
filterAction = m->findChild<QAction *>(QLatin1String("actionFilterTags"), Qt::FindDirectChildrenOnly);
|
||||||
if (o->objectName() == "actionFilterTags") {
|
if (filterAction != nullptr)
|
||||||
filterAction = qobject_cast<QAction*>(o);
|
|
||||||
filterAction->setShortcut(QKeySequence());
|
filterAction->setShortcut(QKeySequence());
|
||||||
} else if (o->objectName() == "actionClose") {
|
closeAction = m->findChild<QAction *>(QLatin1String("actionClose"), Qt::FindDirectChildrenOnly);
|
||||||
closeAction = qobject_cast<QAction*>(o);
|
if (closeAction != nullptr)
|
||||||
closeAction->setShortcut(QKeySequence());
|
closeAction->setShortcut(QKeySequence());
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void UserManual::hideEvent(QHideEvent *e) {
|
void UserManual::hideEvent(QHideEvent *e) {
|
||||||
if (closeAction != NULL)
|
if (closeAction != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue