mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: do not log the action pointer when unsafe
generally because KGlobalAccel uses raw pointers it is unsafe to use the KAction pointers for anything but comparison when removing/unregistering from the KGlobalAccel destructor Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4677b62c24
commit
c181a8e25c
1 changed files with 3 additions and 3 deletions
|
@ -212,7 +212,7 @@ bool KGlobalAccelPrivate::doRegister(KAction *action)
|
|||
shortcut.keyModX = keyModX;
|
||||
shortcut.keyCodeX = keyCodeX;
|
||||
filter->shortcuts.append(shortcut);
|
||||
kDebug(s_kglobalaccelarea) << "grabbed shortcut" << shortcut.keyModX << shortcut.keyCodeX << shortcut.action;
|
||||
kDebug(s_kglobalaccelarea) << "grabbed shortcut" << shortcut.keyModX << shortcut.keyCodeX;
|
||||
// grabbed one, that is success
|
||||
result = true;
|
||||
} else {
|
||||
|
@ -232,11 +232,11 @@ bool KGlobalAccelPrivate::remove(KAction *action)
|
|||
if (shortcut.action == action) {
|
||||
found = true;
|
||||
if (kUngrabKey(shortcut.keyModX, shortcut.keyCodeX)) {
|
||||
kDebug(s_kglobalaccelarea) << "ungrabbed shortcut" << shortcut.keyModX << shortcut.keyCodeX << shortcut.action;
|
||||
kDebug(s_kglobalaccelarea) << "ungrabbed shortcut" << shortcut.keyModX << shortcut.keyCodeX;
|
||||
iter.remove();
|
||||
result = true;
|
||||
} else {
|
||||
kWarning(s_kglobalaccelarea) << "could not ungrab shortcut" << shortcut.keyModX << shortcut.keyCodeX << shortcut.action;
|
||||
kWarning(s_kglobalaccelarea) << "could not ungrab shortcut" << shortcut.keyModX << shortcut.keyCodeX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue