Re-Enable detaching actions

(Detaching is still broken atm)
Move out of the CMake the check for crashes in detaching
It's better to check that in the code - I was quite lost
for a while on why there was a DETACHING_ENABLED definition
as it did not made sense
This commit is contained in:
Tomaz Canabrava
2018-07-16 13:59:10 +02:00
parent 39c35c2c98
commit 93982ded1e
3 changed files with 15 additions and 21 deletions

View File

@@ -196,8 +196,9 @@ void ViewManager::setupActions()
multiViewOnlyActions << shrinkActiveAction;
#if defined(ENABLE_DETACHING)
QAction *detachViewAction = collection->addAction(QStringLiteral("detach-view"));
// Crashes on Mac.
detachViewAction->setEnabled(QOperatingSystemVersion::currentType() != QOperatingSystemVersion::MacOS);
detachViewAction->setIcon(QIcon::fromTheme(QStringLiteral("tab-detach")));
detachViewAction->setText(i18nc("@action:inmenu", "D&etach Current Tab"));
// Ctrl+Shift+D is not used as a shortcut by default because it is too close
@@ -207,7 +208,6 @@ void ViewManager::setupActions()
connect(this, &Konsole::ViewManager::splitViewToggle, this,
&Konsole::ViewManager::updateDetachViewState);
connect(detachViewAction, &QAction::triggered, this, &Konsole::ViewManager::detachActiveView);
#endif
// Next / Previous View , Next Container
collection->addAction(QStringLiteral("next-view"), nextViewAction);