/***************************************************************************
- * Copyright (C) 2005-2015 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include <QApplication>
Action::Action(QObject *parent)
-#ifdef HAVE_KDE4
- : KAction(parent)
-#else
: QWidgetAction(parent)
-#endif
{
init();
}
Action::Action(const QString &text, QObject *parent, const QObject *receiver, const char *slot, const QKeySequence &shortcut)
-#ifdef HAVE_KDE4
- : KAction(parent)
-#else
: QWidgetAction(parent)
-#endif
{
init();
setText(text);
Action::Action(const QIcon &icon, const QString &text, QObject *parent, const QObject *receiver, const char *slot, const QKeySequence &shortcut)
-#ifdef HAVE_KDE4
- : KAction(parent)
-#else
: QWidgetAction(parent)
-#endif
{
init();
setIcon(icon);
}
-#ifdef HAVE_KDE4
-void Action::init() {}
-#else
void Action::init()
{
connect(this, SIGNAL(triggered(bool)), this, SLOT(slotTriggered()));
{
Q_ASSERT(type);
- if (type & DefaultShortcut)
+ if (type & DefaultShortcut) {
setProperty("defaultShortcuts", QVariant::fromValue(QList<QKeySequence>() << key));
-
+ }
if (type & ActiveShortcut)
QAction::setShortcut(key);
}
-
-
-#endif /* HAVE_KDE4 */