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

Port away from deprecated KActionMenu::setDelayed(bool)

parent 153d23a8
......@@ -26,7 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <QMenu>
#include <QVBoxLayout>
// KDE
// KF
#include <kwidgetsaddons_version.h>
#include <KActionCollection>
#include <KActionCategory>
#include <KActionMenu>
......@@ -153,8 +154,12 @@ struct BrowseMainPagePrivate : public Ui_BrowseMainPage
KActionMenu* sortActionMenu = view->add<KActionMenu>("sort_by");
sortActionMenu->setText(i18nc("@action:inmenu", "Sort By"));
sortActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("view-sort")));
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
sortActionMenu->setPopupMode(QToolButton::InstantPopup);
#else
sortActionMenu->setDelayed(false);
#endif
mSortAction = new QActionGroup(actionCollection);
action = new QAction(i18nc("@addAction:inmenu", "Name"), mSortAction);
action->setCheckable(true);
......
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