diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 7 | ||||
| -rw-r--r-- | src/tests/dolphinmainwindowtest.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index c514c1f98..12ca26898 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -237,9 +237,8 @@ DolphinMainWindow::DolphinMainWindow() } } - const bool showMenu = !menuBar()->isHidden(); QAction *showMenuBarAction = actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar)); - showMenuBarAction->setChecked(showMenu); // workaround for bug #171080 + menuBar()->setVisible(showMenuBarAction->isChecked()); auto hamburgerMenu = static_cast<KHamburgerMenu *>(actionCollection()->action(KStandardAction::name(KStandardAction::HamburgerMenu))); hamburgerMenu->setMenuBar(menuBar()); @@ -1348,8 +1347,8 @@ void DolphinMainWindow::compareFiles() void DolphinMainWindow::toggleShowMenuBar() { - const bool visible = menuBar()->isVisible(); - menuBar()->setVisible(!visible); + QAction *showMenuBarAction = actionCollection()->action(KStandardAction::name(KStandardAction::ShowMenubar)); + menuBar()->setVisible(showMenuBarAction->isChecked()); } QPointer<QAction> DolphinMainWindow::preferredSearchTool() diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index a1727afdb..21e48f246 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -938,7 +938,7 @@ void DolphinMainWindowTest::testAccessibilityTree() // after going forwards which is probably not intended. } } - QCOMPARE_GE(testedObjectsSizeAfterTraversingForwards, 11); // The test did not reach many objects while using the Tab key to move through Dolphin. Did the + QCOMPARE_GE(testedObjectsSizeAfterTraversingForwards, 10); // The test did not reach many objects while using the Tab key to move through Dolphin. Did the // test run correctly? } |
