Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akregator
Commits
b14a7c7b
Commit
b14a7c7b
authored
Jun 08, 2021
by
Laurent Montel
😁
Browse files
Make sure that it doesn't crash on kontact
parent
b15f25c1
Pipeline
#64783
passed with stage
in 8 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
b14a7c7b
...
...
@@ -60,16 +60,18 @@ MainWindow::MainWindow(QWidget *parent)
KStandardAction
::
quit
(
qApp
,
&
QApplication
::
quit
,
actionCollection
());
mShowMenuBarAction
=
KStandardAction
::
showMenubar
(
menuBar
(),
&
QMenuBar
::
setVisible
,
actionCollection
());
mHamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
mHamburgerMenu
->
setShowMenuBarAction
(
mShowMenuBarAction
);
mHamburgerMenu
->
setMenuBar
(
menuBar
());
connect
(
mHamburgerMenu
,
&
KHamburgerMenu
::
aboutToShowMenu
,
this
,
[
this
]()
{
updateHamburgerMenu
();
// Immediately disconnect. We only need to run this once, but on demand.
// NOTE: The nullptr at the end disconnects all connections between
// q and mHamburgerMenu's aboutToShowMenu signal.
disconnect
(
mHamburgerMenu
,
&
KHamburgerMenu
::
aboutToShowMenu
,
this
,
nullptr
);
});
if
(
menuBar
())
{
mHamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
mHamburgerMenu
->
setShowMenuBarAction
(
mShowMenuBarAction
);
mHamburgerMenu
->
setMenuBar
(
menuBar
());
connect
(
mHamburgerMenu
,
&
KHamburgerMenu
::
aboutToShowMenu
,
this
,
[
this
]()
{
updateHamburgerMenu
();
// Immediately disconnect. We only need to run this once, but on demand.
// NOTE: The nullptr at the end disconnects all connections between
// q and mHamburgerMenu's aboutToShowMenu signal.
disconnect
(
mHamburgerMenu
,
&
KHamburgerMenu
::
aboutToShowMenu
,
this
,
nullptr
);
});
}
setStandardToolBarMenuEnabled
(
true
);
createStandardStatusBarAction
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment