summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qt5/Qt5Menu.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 8fee56a9cf70..049d90b7b4da 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -157,15 +157,19 @@ QMenu* Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos)
pAction->setChecked(bChecked);
}
- pAction->setEnabled(pSalMenuItem->mbEnabled);
- pAction->setVisible(pSalMenuItem->mbVisible);
-
connect(pAction, &QAction::triggered, this,
[pSalMenuItem] { slotMenuTriggered(pSalMenuItem); });
}
}
}
+ QAction* pAction = pSalMenuItem->getAction();
+ if (pAction)
+ {
+ pAction->setEnabled(pSalMenuItem->mbEnabled);
+ pAction->setVisible(pSalMenuItem->mbVisible);
+ }
+
return pQMenu;
}