mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kdeui: use private member for the KAction isShortcutConfigurable property
much more optimal, no funcitonal change Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4c30a62d40
commit
f2e7f97a62
2 changed files with 4 additions and 3 deletions
|
@ -43,11 +43,11 @@
|
||||||
|
|
||||||
KActionPrivate::KActionPrivate(KAction *q_ptr)
|
KActionPrivate::KActionPrivate(KAction *q_ptr)
|
||||||
: componentData(KGlobal::mainComponent()),
|
: componentData(KGlobal::mainComponent()),
|
||||||
|
isShortcutConfigurable(true),
|
||||||
globalShortcutEnabled(false),
|
globalShortcutEnabled(false),
|
||||||
q(q_ptr)
|
q(q_ptr)
|
||||||
{
|
{
|
||||||
QObject::connect(q, SIGNAL(triggered(bool)), q, SLOT(slotTriggered()));
|
QObject::connect(q, SIGNAL(triggered(bool)), q, SLOT(slotTriggered()));
|
||||||
q->setProperty("isShortcutConfigurable", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KActionPrivate::slotTriggered()
|
void KActionPrivate::slotTriggered()
|
||||||
|
@ -113,12 +113,12 @@ KAction::~KAction()
|
||||||
|
|
||||||
bool KAction::isShortcutConfigurable() const
|
bool KAction::isShortcutConfigurable() const
|
||||||
{
|
{
|
||||||
return property("isShortcutConfigurable").toBool();
|
return d->isShortcutConfigurable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KAction::setShortcutConfigurable(bool b)
|
void KAction::setShortcutConfigurable(bool b)
|
||||||
{
|
{
|
||||||
setProperty("isShortcutConfigurable", b);
|
d->isShortcutConfigurable = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
QKeySequence KAction::shortcut(ShortcutTypes type) const
|
QKeySequence KAction::shortcut(ShortcutTypes type) const
|
||||||
|
|
|
@ -42,6 +42,7 @@ public:
|
||||||
QKeySequence globalShortcut;
|
QKeySequence globalShortcut;
|
||||||
QKeySequence defaultGlobalShortcut;
|
QKeySequence defaultGlobalShortcut;
|
||||||
|
|
||||||
|
bool isShortcutConfigurable;
|
||||||
bool globalShortcutEnabled;
|
bool globalShortcutEnabled;
|
||||||
KAction *q;
|
KAction *q;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue