X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fdf854bd81d9e42df2d8672d49a0b7fcdb7443a5..e893ceebb5a7295268ecf0ae2be5fb3fe07dfdbd:/src/settings/viewmodes/generalviewsettingspage.cpp diff --git a/src/settings/viewmodes/generalviewsettingspage.cpp b/src/settings/viewmodes/generalviewsettingspage.cpp index c518147dd..00bbae296 100644 --- a/src/settings/viewmodes/generalviewsettingspage.cpp +++ b/src/settings/viewmodes/generalviewsettingspage.cpp @@ -126,7 +126,8 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(const QUrl &url, QWidget *paren m_doubleClickViewComboBox->addItem(QIcon::fromTheme("list-add"), i18nc("@item:inlistbox", "Custom Command"), customCommand); m_doubleClickViewComboBox->insertSeparator(2); - DolphinMainWindow *mainWindow = static_cast(QApplication::activeWindow()); + DolphinMainWindow *mainWindow = qobject_cast(QApplication::activeWindow()); + if (mainWindow != nullptr) { KActionCollection *actions = mainWindow->actionCollection(); // get the allowed actions from actionCollection and add them to the combobox