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();
}
{
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()));
}
}