diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index d458c6bd7f8..160b0cb65eb 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -807,11 +807,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er mfileContextMenu->appendGroup(Constants::G_PROJECT_TREE); // Open Terminal submenu +#if !defined(Q_OS_UNIX) || QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) ActionContainer * const openTerminal = ActionManager::createMenu(ProjectExplorer::Constants::M_OPENTERMINALCONTEXT); openTerminal->setOnAllDisabledBehavior(ActionContainer::Show); dd->m_openTerminalMenu = openTerminal->menu(); dd->m_openTerminalMenu->setTitle(FileUtils::msgTerminalAction()); +#endif // "open with" submenu ActionContainer * const openWith = @@ -879,6 +881,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); +#if !defined(Q_OS_UNIX) || QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) // Open Terminal Here menu mfileContextMenu->addMenu(openTerminal, Constants::G_FILE_OPEN); mfolderContextMenu->addMenu(openTerminal, Constants::G_FOLDER_FILES); @@ -887,6 +890,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE, projecTreeContext); dd->m_openTerminalMenu->addAction(dd->m_openTerminalHere); +#else + dd->m_openTerminalHere = new QAction(FileUtils::msgTerminalAction(), this); + cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE, + projecTreeContext); + + mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); + mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); +#endif dd->m_openTerminalHereBuildEnv = new QAction(tr("Build Environment"), this); dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this);