diff options
| author | Elvis Angelaccio <[email protected]> | 2019-01-28 22:38:21 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-01-28 22:38:21 +0100 |
| commit | 8bc93b564c283a677e02dc2ac71b40b63a990e38 (patch) | |
| tree | b0838ad5e265d42dd5da7f8ff58532aac95daca4 /src/dolphinmainwindow.cpp | |
| parent | 52c019c9cbf679af5c24438bbe840ef890ae3f92 (diff) | |
Introduce HAVE_TERMINAL
Source code should check for features detected during configure-time,
rather than checking for a specific OS.
See also commit 87e8d0ba5f.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ea19468f9..076869c1a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -21,6 +21,7 @@ #include "dolphinmainwindow.h" +#include "config-terminal.h" #include "global.h" #include "dolphindockwidget.h" #include "dolphincontextmenu.h" @@ -1213,7 +1214,7 @@ void DolphinMainWindow::setupActions() compareFiles->setEnabled(false); connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles); -#ifndef Q_OS_WIN +#ifdef HAVE_TERMINAL if (KAuthorized::authorize(QStringLiteral("shell_access"))) { QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal")); openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal")); @@ -1332,7 +1333,7 @@ void DolphinMainWindow::setupDockWidgets() this, &DolphinMainWindow::showErrorMessage); // Setup "Terminal" -#ifndef Q_OS_WIN +#ifdef HAVE_TERMINAL if (KAuthorized::authorize(QStringLiteral("shell_access"))) { DolphinDockWidget* terminalDock = new DolphinDockWidget(i18nc("@title:window Shell terminal", "Terminal")); terminalDock->setLocked(lock); |
