Summary: | "Create New..." button can't appear in the toolbar | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | kde |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugs.kde.org, elvis.angelaccio, kde, matejm98mthw, mikhail.krutov, nate |
Priority: | NOR | ||
Version: | 18.12.3 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/dolphin/48c082767e3124b1ac6575f83bfcdcdc3e3e9b62 | Version Fixed In: | 19.04.1 |
Sentry Crash Report: |
Description
kde
2019-03-23 11:59:23 UTC
Can confirm, I don't have the button either. *** Bug 406635 has been marked as a duplicate of this bug. *** We have a report that this worked in 17.12.3, so it seems to have regressed recently. I'll see if I can figure out how and why. with git bisect, I found that this broke with https://cgit.kde.org/dolphin.git/commit/?id=dec7016c0d52129340a5b47f6de4df8af5115e21 Specifically, this bit: diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3e3803d..a93405f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1066,6 +1066,7 @@ void DolphinMainWindow::setupActions() { // setup 'File' menu m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this); + m_newFileMenu->setObjectName("newFileMenu"); QMenu* menu = m_newFileMenu->menu(); menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New")); menu->setIcon(QIcon::fromTheme(QStringLiteral("document-new"))); Adding an action to KActionCollection sets its objectName to the given name. DolphinNewFileMenu calls KNewFileMenu with "new_menu". I think the line Nate identified as causing the issue can be removed and the unittest adjusted to just look findChild("new_menu") instead of "newFileMenu". Thanks Kai, that makes perfect sense. Patch: https://phabricator.kde.org/D20664 Git commit 48c082767e3124b1ac6575f83bfcdcdc3e3e9b62 by Nate Graham. Committed on 18/04/2019 at 19:17. Pushed by ngraham into branch 'Applications/19.04'. Fix adding "Create New..." menu to toolbar Summary: Access the object by its existing name rather than renaming it. FIXED-IN: 19.04.1 Test Plan: - Add {nav Create New} item to toolbar; it now works - Verify that {nav Create New} menu and toolbar items are disabled when in the trash - All tests still pass Reviewers: elvisangelaccio, broulik, #dolphin, cfeck Reviewed By: cfeck Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20664 M +0 -1 src/dolphinmainwindow.cpp M +1 -1 src/tests/dolphinmainwindowtest.cpp https://commits.kde.org/dolphin/48c082767e3124b1ac6575f83bfcdcdc3e3e9b62 |