diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1103,7 +1103,6 @@ { // 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"))); diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -243,7 +243,7 @@ QVERIFY(QTest::qWaitForWindowExposed(m_mainWindow.data())); QVERIFY(m_mainWindow->isVisible()); - auto newFileMenu = m_mainWindow->findChild("newFileMenu"); + auto newFileMenu = m_mainWindow->findChild("new_menu"); QVERIFY(newFileMenu); QFETCH(bool, expectedEnabled);