]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
dolphinmainwindow: zoom action is now a KToolBarPopupAction
[dolphin.git] / src / dolphinmainwindow.cpp
index 297ab000e80b8e9c79777889aa01e7dcb0742d8d..78560d820605bad2b91080db25e7246927a3eeef 100644 (file)
@@ -1511,7 +1511,7 @@ void DolphinMainWindow::updateHamburgerMenu()
         menu = new QMenu(this);
         hamburgerMenu->setMenu(menu);
         hamburgerMenu->hideActionsOf(ac->action(QStringLiteral("basic_actions"))->menu());
-        hamburgerMenu->hideActionsOf(ac->action(QStringLiteral("zoom"))->menu());
+        hamburgerMenu->hideActionsOf(qobject_cast<KToolBarPopupAction *>(ac->action(QStringLiteral("zoom")))->popupMenu());
     } else {
         menu->clear();
     }
@@ -1726,7 +1726,11 @@ void DolphinMainWindow::setViewsToHomeIfMountPathOpen(const QString &mountPath)
 {
     const QVector<DolphinViewContainer *> theViewContainers = viewContainers();
     for (DolphinViewContainer *viewContainer : theViewContainers) {
-        if (viewContainer && viewContainer->url().toLocalFile().startsWith(mountPath)) {
+        if (!viewContainer) {
+            continue;
+        }
+        const auto viewPath = viewContainer->url().toLocalFile();
+        if (viewPath.startsWith(mountPath + QLatin1String("/")) || viewPath == mountPath) {
             viewContainer->setUrl(QUrl::fromLocalFile(QDir::homePath()));
         }
     }