Commit cb3b77e3 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Port away from deprecated KActionMenu::setDelayed(bool)

GIT_SILENT
parent 2c3076cb
......@@ -29,6 +29,7 @@ Boston, MA 02110-1301, USA.
#include <KDialogJobUiDelegate>
#include <KLocalizedString>
#include <KSelectAction>
#include <kwidgetsaddons_version.h>
#include <interfaces/iproject.h>
#include <interfaces/idocumentcontroller.h>
......@@ -480,7 +481,11 @@ void RunController::setupActions()
Core::self()->uiControllerInternal()->area(0, QStringLiteral("debug"))->addAction(action);
action = d->stopJobsMenu = new KActionMenu( QIcon::fromTheme(QStringLiteral("process-stop")), i18nc("@action", "Stop"), this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
d->stopJobsMenu->setPopupMode(QToolButton::InstantPopup);
#else
d->stopJobsMenu->setDelayed(false);
#endif
action->setIconText(i18nc("@action Short text for 'Stop' used in the toolbar", "Stop"));
action->setToolTip(i18nc("@info:tooltip", "Menu allowing to stop individual jobs"));
action->setWhatsThis(i18nc("@info:whatsthis", "List of jobs that can be stopped individually."));
......
......@@ -30,6 +30,7 @@
#include <KActionMenu>
#include <KActionCollection>
#include <KLocalizedString>
#include <kwidgetsaddons_version.h>
#include "area.h"
#include "view.h"
......@@ -138,7 +139,11 @@ MainWindowPrivate::MainWindowPrivate(MainWindow *w, Controller* controller)
ac->addAction(QStringLiteral("select_previous_dock"), action);
auto* const toolViewsMenu = new KActionMenu(i18nc("@title:menu", "Tool Views"), this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
toolViewsMenu->setPopupMode(QToolButton::InstantPopup);
#else
toolViewsMenu->setDelayed(false);
#endif
ac->addAction(QStringLiteral("docks_submenu"), toolViewsMenu);
idealController = new IdealController(m_mainWindow);
......
......@@ -34,6 +34,7 @@
#include <KActionMenu>
#include <KJobWidgets>
#include <KConfigGroup>
#include <kwidgetsaddons_version.h>
#include <interfaces/icore.h>
#include <interfaces/isession.h>
......@@ -136,7 +137,11 @@ void FileManager::updateNav( const QUrl& url )
void FileManager::setupActions()
{
auto* acmBookmarks = new KActionMenu(QIcon::fromTheme(QStringLiteral("bookmarks")), i18nc("@title:menu", "Bookmarks"), this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
acmBookmarks->setPopupMode(QToolButton::InstantPopup);
#else
acmBookmarks->setDelayed(false);
#endif
m_bookmarkHandler = new BookmarkHandler(this, acmBookmarks->menu());
acmBookmarks->setShortcutContext(Qt::WidgetWithChildrenShortcut);
......
......@@ -21,6 +21,7 @@
#include <KActionMenu>
#include <KLocalizedString>
#include <kwidgetsaddons_version.h>
#include <QAction>
#include <QLineEdit>
......@@ -55,7 +56,11 @@ void ProblemsView::setupActions()
{
m_scopeMenu = new KActionMenu(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
m_scopeMenu->setPopupMode(QToolButton::InstantPopup);
#else
m_scopeMenu->setDelayed(false);
#endif
m_scopeMenu->setToolTip(i18nc("@info:tooltip", "Which files to display the problems for"));
m_scopeMenu->setObjectName(QStringLiteral("scopeMenu"));
......@@ -152,7 +157,11 @@ void ProblemsView::setupActions()
{
m_groupingMenu = new KActionMenu(i18nc("@title:menu", "Grouping"), this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
m_groupingMenu->setPopupMode(QToolButton::InstantPopup);
#else
m_groupingMenu->setDelayed(false);
#endif
auto* groupingActions = new QActionGroup(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment