[-]
[+]
|
Changed |
kglobalaccel.spec
|
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/CMakeLists.txt
^
|
@@ -14,7 +14,7 @@
include(ECMPoQmTools)
-set(KF5_VERSION "5.10.0") # handled by release scripts
+set(KF5_VERSION "5.9.0") # handled by release scripts
set(KF5_DEP_VERSION "5.9.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KGLOBALACCEL
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/autotests/kglobalshortcuttest.cpp
^
|
@@ -42,15 +42,6 @@
#include <xcb/xtest.h>
#endif
-/*
- * NOTE
- * ----
- * These tests could be better. They don't include actually triggering actions,
- * and we just choose very improbable shortcuts to avoid conflicts with real
- * applications' shortcuts.
- *
-*/
-
const QKeySequence sequenceA = QKeySequence(Qt::SHIFT + Qt::META + Qt::CTRL + Qt::ALT + Qt::Key_F12);
const QKeySequence sequenceB = QKeySequence(Qt::Key_F29);
const QKeySequence sequenceC = QKeySequence(Qt::SHIFT + Qt::META + Qt::CTRL + Qt::Key_F28);
@@ -58,6 +49,10 @@
const QKeySequence sequenceE = QKeySequence(Qt::META + Qt::Key_F29);
const QKeySequence sequenceF = QKeySequence(Qt::META + Qt::Key_F27);
+/* These tests could be better. They don't include actually triggering actions,
+ and we just choose very improbable shortcuts to avoid conflicts with real
+ applications' shortcuts. */
+
//we need a GUI so that the implementation can grab keys
QTEST_MAIN(KGlobalShortcutTest)
@@ -75,24 +70,8 @@
}
}
-/**
- * NOTE: This method alters a KDE config file in your home directory.
- *
- * KDE4: ~/.kde4/share/config/kglobalshortcutsrc
- * KF5: ~/.config/kglobalshortcutsrc
- *
- * At least on KDE4 this file cannot be modified by hand if the Plasma session
- * is running. So in case you have to clean the file of spurious entries
- * (e.g. because of broken or failing test cases)
- * you have to logout from Plasma.
- *
- * The following sections are created and normally removed automatically:
- * [qttest]
- */
-void KGlobalShortcutTest::setupTest(const QString& id)
+void KGlobalShortcutTest::setupTest(QString id)
{
- QString componentName = "qttest";
-
if (m_actionA) {
KGlobalAccel::self()->removeAllShortcuts(m_actionA);
delete m_actionA;
@@ -108,20 +87,20 @@
#ifndef KGLOBALACCEL_NO_DEPRECATED
QList<QStringList> components = kga->allMainComponents();
QStringList componentId;
- componentId << componentName << QString() << "KDE Test Program" << QString();
+ componentId << "qttest" << QString() << "KDE Test Program" << QString();
// QVERIFY(!components.contains(componentId));
#endif
m_actionA = new QAction("Text For Action A", this);
m_actionA->setObjectName("Action A:" + id);
- m_actionA->setProperty("componentName", componentName);
+ m_actionA->setProperty("componentName", "qttest");
m_actionA->setProperty("componentDisplayName", "KDE Test Program");
KGlobalAccel::self()->setShortcut(m_actionA, QList<QKeySequence>() << sequenceA << sequenceB, KGlobalAccel::NoAutoloading);
KGlobalAccel::self()->setDefaultShortcut(m_actionA, QList<QKeySequence>() << sequenceA << sequenceB, KGlobalAccel::NoAutoloading);
m_actionB = new QAction("Text For Action B", this);
m_actionB->setObjectName("Action B:" + id);
- m_actionB->setProperty("componentName", componentName);
+ m_actionB->setProperty("componentName", "qttest");
m_actionA->setProperty("componentDisplayName", "KDE Test Program");
KGlobalAccel::self()->setShortcut(m_actionB, QList<QKeySequence>(), KGlobalAccel::NoAutoloading);
KGlobalAccel::self()->setDefaultShortcut(m_actionB, QList<QKeySequence>(), KGlobalAccel::NoAutoloading);
@@ -138,7 +117,6 @@
// Just ensure that the desired values are set for both actions
QList<QKeySequence> cutA;
cutA << sequenceA << sequenceB;
-
QCOMPARE(KGlobalAccel::self()->shortcut(m_actionA), cutA);
QCOMPARE(KGlobalAccel::self()->defaultShortcut(m_actionA), cutA);
@@ -355,10 +333,8 @@
#ifndef KGLOBALACCEL_NO_DEPRECATED
QList<QStringList> actions = kga->allActionsForComponent(componentId);
QVERIFY(!actions.isEmpty());
- QStringList actionIdA;
- actionIdA << "qttest" << "Action A:testListActions" << "KDE Test Program" << "Text For Action A";
- QStringList actionIdB;
- actionIdB << "qttest" << "Action B:testListActions" << "KDE Test Program" << "Text For Action B";
+ QStringList actionIdA; actionIdA << "qttest" << "Action A:testListActions" << "KDE Test Program" << "Text For Action A";
+ QStringList actionIdB; actionIdB << "qttest" << "Action B:testListActions" << "KDE Test Program" << "Text For Action B";
//qDebug() << actions;
QVERIFY(actions.contains(actionIdA));
QVERIFY(actions.contains(actionIdB));
@@ -474,22 +450,6 @@
KGlobalAccel::self()->removeAllShortcuts(action);
}
-void KGlobalShortcutTest::testGetGlobalShortcut()
-{
- setupTest("testLoadShortcutFromGlobalSettings"); // cleanup see testForgetGlobalShortcut
- if (!m_daemonInstalled) {
- QSKIP("kglobalaccel not installed");
- }
-
- // retrieve shortcut list
- auto shortcutList = KGlobalAccel::self()->globalShortcut("qttest", "Action A:testLoadShortcutFromGlobalSettings");
- QCOMPARE(shortcutList.count(), 2); // see setupTest
-
- // test for a real shortcut:
-// shortcutList = KGlobalAccel::self()->shortcut("kwin", "Kill Window");
-// QCOMPARE(shortcutList.count(), 1);
-}
-
void KGlobalShortcutTest::testForgetGlobalShortcut()
{
setupTest("testForgetGlobalShortcut");
@@ -519,4 +479,3 @@
#endif
}
-
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/autotests/kglobalshortcuttest.h
^
|
@@ -41,13 +41,9 @@
void testComponentAssignment();
void testConfigurationActions();
void testNotification();
-
- void testGetGlobalShortcut();
-
// This has to be the last before forgetGlobalShortcut
void testOverrideMainComponentData();
-
- void testForgetGlobalShortcut(); // clean global config altered by setupTest
+ void testForgetGlobalShortcut();
public:
@@ -55,7 +51,7 @@
{}
private:
- void setupTest(const QString& id);
+ void setupTest(QString id);
QAction *m_actionA;
QAction *m_actionB;
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/kglobalaccel.cpp
^
|
@@ -261,9 +261,9 @@
actionShortcuts.remove(action);
}
-void KGlobalAccelPrivate::updateGlobalShortcut(/*const would be better*/QAction* action,
- ShortcutTypes actionFlags,
- KGlobalAccel::GlobalShortcutLoading globalFlags)
+void KGlobalAccelPrivate::updateGlobalShortcut(QAction *action,
+ ShortcutTypes actionFlags,
+ KGlobalAccel::GlobalShortcutLoading globalFlags)
{
// No action or no objectname -> Do nothing
if (!action || action->objectName().isEmpty()) {
@@ -642,19 +642,6 @@
return d->actionShortcuts.value(action);
}
-QList<QKeySequence> KGlobalAccel::globalShortcut(const QString& componentName, const QString& actionId) const
-{
- // see also d->updateGlobalShortcut(action, KGlobalAccelPrivate::ActiveShortcut, KGlobalAccel::Autoloading);
-
- // how componentName and actionId map to QAction, e.g:
- // action->setProperty("componentName", "kwin");
- // action->setObjectName("Kill Window");
-
- const QList<int> result = self()->d->iface.shortcut({ componentName, actionId, QString(), QString() });
- const QList<QKeySequence> scResult(d->shortcutFromIntList(result));
- return scResult;
-}
-
void KGlobalAccel::removeAllShortcuts(QAction *action)
{
d->remove(action, KGlobalAccelPrivate::UnRegister);
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/kglobalaccel.h
^
|
@@ -258,24 +258,12 @@
* Unlike regular shortcuts, the application's window does not need focus
* for them to be activated.
*
- * @note that this method only works together with setShortcut() because the action pointer
- * is used to retrieve the result. If you would like to retrieve the shortcut as stored
- * in the global settings, use the globalShortcut(componentName, actionId) instead.
- *
* @sa setShortcut()
* @since 5.0
*/
QList<QKeySequence> shortcut(const QAction *action) const;
/**
- * Retrieves the shortcut as defined in global settings by
- * componentName (e.g. "kwin") and actionId (e.g. "Kill Window").
- *
- * @since 5.10
- */
- QList<QKeySequence> globalShortcut(const QString& componentName, const QString& actionId) const;
-
- /**
* Unregister and remove all defined global shortcuts for the given action.
*
* @since 5.0
@@ -361,10 +349,8 @@
* @see setGlobalShortcut
* @see setDefaultShortcut
* @since 5.0
- *
- * @todo KF6: add const to the QAction parameter
*/
- void globalShortcutChanged(/*const would be better*/QAction *action, const QKeySequence &seq);
+ void globalShortcutChanged(QAction *action, const QKeySequence &seq);
private:
/// Creates a new KGlobalAccel object
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/kglobalaccel_p.h
^
|
@@ -57,8 +57,7 @@
///Propagate any shortcut changes to the KDED module that does the bookkeeping
///and the key grabbing.
- ///@todo KF6
- void updateGlobalShortcut(/*const would be better*/QAction* action, KGlobalAccelPrivate::ShortcutTypes actionFlags, KGlobalAccel::GlobalShortcutLoading globalFlags);
+ void updateGlobalShortcut(QAction *action, ShortcutTypes actionFlags, KGlobalAccel::GlobalShortcutLoading globalFlags);
///Register the action in this class and in the KDED module
bool doRegister(QAction *action); //"register" is a C keyword :p
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/CMakeLists.txt
^
|
@@ -9,7 +9,6 @@
main.cpp
kglobalacceld.cpp
component.cpp
- logging.cpp
globalshortcut.cpp
globalshortcutsregistry.cpp
globalshortcutcontext.cpp)
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/component.cpp
^
|
@@ -21,7 +21,6 @@
#include "globalshortcut.h"
#include "globalshortcutcontext.h"
#include "globalshortcutsregistry.h"
-#include "logging_p.h"
#include <config-kglobalaccel.h>
#include <QDebug>
@@ -166,7 +165,7 @@
Q_FOREACH (GlobalShortcut *shortcut, _current->_actions)
{
- qCDebug(KGLOBALACCELD) << _current->_actions.size();
+ qDebug() << _current->_actions.size();
if (!shortcut->isPresent())
{
changed = true;
@@ -190,7 +189,7 @@
{
if (_contexts.value(uniqueName))
{
- qCDebug(KGLOBALACCELD) << "Shortcut Context " << uniqueName << "already exists for component " << _uniqueName;
+ qDebug() << "Shortcut Context " << uniqueName << "already exists for component " << _uniqueName;
return false;
}
_contexts.insert(uniqueName, new GlobalShortcutContext(uniqueName, friendlyName, this));
@@ -328,7 +327,7 @@
const QString &component,
const QString &context) const
{
- qCDebug(KGLOBALACCELD) << QKeySequence(key).toString() << component;
+ qDebug() << QKeySequence(key).toString() << component;
// if this component asks for the key. only check the keys in the same
// context
@@ -383,7 +382,7 @@
// The shortcut is already used. The config file is
// broken. Ignore the request.
keys.removeAll(key);
- qCWarning(KGLOBALACCELD) << "Shortcut found twice in kglobalshortcutsrc.";
+ qWarning() << "Shortcut found twice in kglobalshortcutsrc.";
}
}
}
@@ -467,11 +466,11 @@
contextGroup.writeEntry("_k_friendly_name", context->friendlyName());
}
- // qCDebug(KGLOBALACCELD) << "writing group " << _uniqueName << ":" << context->uniqueName();
+ // qDebug() << "writing group " << _uniqueName << ":" << context->uniqueName();
Q_FOREACH(const GlobalShortcut *shortcut, context->_actions)
{
- // qCDebug(KGLOBALACCELD) << "writing" << shortcut->uniqueName();
+ // qDebug() << "writing" << shortcut->uniqueName();
// We do not write fresh shortcuts.
// We do not write session shortcuts
@@ -479,7 +478,7 @@
{
continue;
}
- // qCDebug(KGLOBALACCELD) << "really writing" << shortcut->uniqueName();
+ // qDebug() << "really writing" << shortcut->uniqueName();
QStringList entry(stringFromKeys(shortcut->keys()));
entry.append(stringFromKeys(shortcut->defaultKeys()));
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/globalshortcut.cpp
^
|
@@ -26,7 +26,7 @@
#include "component.h"
#include "globalshortcutcontext.h"
#include "globalshortcutsregistry.h"
-#include "logging_p.h"
+
#include <QDebug>
@@ -189,7 +189,7 @@
}
else
{
- qCDebug(KGLOBALACCELD) << _uniqueName << "skipping because key" << QKeySequence(key).toString() << "is already taken";
+ qDebug() << _uniqueName << "skipping because key" << QKeySequence(key).toString() << "is already taken";
_keys.append(0);
}
}
@@ -226,7 +226,7 @@
{
if (key != 0 && !GlobalShortcutsRegistry::self()->registerKey(key, this))
{
- qCDebug(KGLOBALACCELD) << uniqueName() << ": Failed to register " << QKeySequence(key).toString();
+ qDebug() << uniqueName() << ": Failed to register " << QKeySequence(key).toString();
}
}
@@ -246,7 +246,7 @@
{
if (key != 0 && !GlobalShortcutsRegistry::self()->unregisterKey(key, this))
{
- qCDebug(KGLOBALACCELD) << uniqueName() << ": Failed to unregister " << QKeySequence(key).toString();
+ qDebug() << uniqueName() << ": Failed to unregister " << QKeySequence(key).toString();
}
}
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/globalshortcutsregistry.cpp
^
|
@@ -21,7 +21,6 @@
#include "globalshortcut.h"
#include "globalshortcutcontext.h"
#include <config-kglobalaccel.h>
-#include "logging_p.h"
#include <QDebug>
#include <KLocalizedString>
@@ -190,20 +189,20 @@
// ALT+PRINT is SYSREQ on my keyboard. So we grab something we think
// is ALT+PRINT but symXToKeyQt and modXToQt make ALT+SYSREQ of it
// when pressed (correctly). We can't match that.
- qCDebug(KGLOBALACCELD) << "Got unknown key" << QKeySequence(keyQt).toString();
+ qDebug() << "Got unknown key" << QKeySequence(keyQt).toString();
// In production mode just do nothing.
return false;
}
else if (!shortcut->isActive())
{
- qCDebug(KGLOBALACCELD) << "Got inactive key" << QKeySequence(keyQt).toString();
+ qDebug() << "Got inactive key" << QKeySequence(keyQt).toString();
// In production mode just do nothing.
return false;
}
- qCDebug(KGLOBALACCELD) << QKeySequence(keyQt).toString() << "=" << shortcut->uniqueName();
+ qDebug() << QKeySequence(keyQt).toString() << "=" << shortcut->uniqueName();
QStringList data(shortcut->context()->component()->uniqueName());
data.append(shortcut->uniqueName());
@@ -229,7 +228,7 @@
{
foreach (const QString &groupName, _config.groupList())
{
- qCDebug(KGLOBALACCELD) << "Loading group " << groupName;
+ qDebug() << "Loading group " << groupName;
Q_ASSERT(groupName.indexOf('\x1d')==-1);
@@ -289,17 +288,17 @@
{
if (key == 0)
{
- qCDebug(KGLOBALACCELD) << shortcut->uniqueName() << ": Key '" << QKeySequence(key).toString()
+ qDebug() << shortcut->uniqueName() << ": Key '" << QKeySequence(key).toString()
<< "' already taken by " << _active_keys.value(key)->uniqueName() << ".";
return false;
}
else if (_active_keys.value(key))
{
- qCDebug(KGLOBALACCELD) << shortcut->uniqueName() << ": Attempt to register key 0.";
+ qDebug() << shortcut->uniqueName() << ": Attempt to register key 0.";
return false;
}
- qCDebug(KGLOBALACCELD) << "Registering key" << QKeySequence(key).toString() << "for"
+ qDebug() << "Registering key" << QKeySequence(key).toString() << "for"
<< shortcut->context()->component()->uniqueName() << ":" << shortcut->uniqueName();
_active_keys.insert(key, shortcut);
@@ -341,7 +340,7 @@
return false;
}
- qCDebug(KGLOBALACCELD) << "Unregistering key" << QKeySequence(key).toString() << "for"
+ qDebug() << "Unregistering key" << QKeySequence(key).toString() << "for"
<< shortcut->context()->component()->uniqueName() << ":" << shortcut->uniqueName();
_manager->grabKey(key, false);
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/kglobalaccel_mac.cpp
^
|
@@ -29,7 +29,6 @@
#include "globalshortcutsregistry.h"
#include "kkeyserver.h"
-#include "logging_p.h"
OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void * inUserData)
{
@@ -37,14 +36,14 @@
if (eventKind == kEventRawKeyDown) {
UInt32 keycode;
if (GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(keycode), NULL, &keycode) != noErr) {
- qCWarning(KGLOBALACCELD) << "Error retrieving keycode parameter from event";
+ qWarning() << "Error retrieving keycode parameter from event";
}
- qCDebug(KGLOBALACCELD) << " key down, keycode = " << keycode;
+ qDebug() << " key down, keycode = " << keycode;
} else if (eventKind == kEventHotKeyPressed) {
KGlobalAccelImpl* impl = static_cast<KGlobalAccelImpl *>(inUserData);
EventHotKeyID hotkey;
if (GetEventParameter(inEvent, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(hotkey), NULL, &hotkey) != noErr) {
- qCWarning(KGLOBALACCELD) << "Error retrieving hotkey parameter from event";
+ qWarning() << "Error retrieving hotkey parameter from event";
return eventNotHandledErr;
}
// Typecasts necesary to prevent a warning from gcc
@@ -73,7 +72,7 @@
CFNotificationCenterAddObserver(CFNotificationCenterGetDistributedCenter(), this, layoutChanged, str, NULL, CFNotificationSuspensionBehaviorHold);
CFRelease(str);
} else {
- qCWarning(KGLOBALACCELD) << "Couldn't create CFString to register for keyboard notifications";
+ qWarning() << "Couldn't create CFString to register for keyboard notifications";
}
}
@@ -87,15 +86,15 @@
bool KGlobalAccelImpl::grabKey( int keyQt, bool grab )
{
if (grab) {
- qCDebug(KGLOBALACCELD) << "Grabbing key " << keyQt;
+ qDebug() << "Grabbing key " << keyQt;
QList<uint> keyCodes;
uint mod;
KKeyServer::keyQtToCodeMac( keyQt, keyCodes );
KKeyServer::keyQtToModMac( keyQt, mod );
- qCDebug(KGLOBALACCELD) << "keyQt: " << keyQt << " mod: " << mod;
+ qDebug() << "keyQt: " << keyQt << " mod: " << mod;
foreach (uint keyCode, keyCodes) {
- qCDebug(KGLOBALACCELD) << " keyCode: " << keyCode;
+ qDebug() << " keyCode: " << keyCode;
}
EventHotKeyID ehkid;
@@ -105,17 +104,17 @@
foreach (uint keyCode, keyCodes) {
EventHotKeyRef ref;
if (RegisterEventHotKey(keyCode, mod, ehkid, m_eventTarget, 0, &ref) != noErr) {
- qCWarning(KGLOBALACCELD) << "RegisterEventHotKey failed!";
+ qWarning() << "RegisterEventHotKey failed!";
}
hotkeys.append(ref);
}
refs->insert(keyQt, hotkeys);
} else {
- qCDebug(KGLOBALACCELD) << "Ungrabbing key " << keyQt;
- if (refs->count(keyQt) == 0) qCWarning(KGLOBALACCELD) << "Trying to ungrab a key thas is not grabbed";
+ qDebug() << "Ungrabbing key " << keyQt;
+ if (refs->count(keyQt) == 0) qWarning() << "Trying to ungrab a key thas is not grabbed";
foreach (const EventHotKeyRef &ref, refs->value(keyQt)) {
if (UnregisterEventHotKey(ref) != noErr) {
- qCWarning(KGLOBALACCELD) << "UnregisterEventHotKey should not fail!";
+ qWarning() << "UnregisterEventHotKey should not fail!";
}
}
refs->remove(keyQt);
@@ -127,10 +126,10 @@
{
if (enable) {
if (InstallEventHandler(m_eventTarget, m_eventHandler, 1, m_eventType, this, &m_curHandler) != noErr)
- qCWarning(KGLOBALACCELD) << "InstallEventHandler failed!";
+ qWarning() << "InstallEventHandler failed!";
} else {
if (RemoveEventHandler(m_curHandler) != noErr)
- qCWarning(KGLOBALACCELD) << "RemoveEventHandler failed!";
+ qWarning() << "RemoveEventHandler failed!";
}
}
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/kglobalaccel_win.cpp
^
|
@@ -26,7 +26,6 @@
#include "kglobalaccel.h"
#include "globalshortcutsregistry.h"
-#include "logging_p.h"
#include <QDebug>
@@ -40,7 +39,7 @@
bool KGlobalAccelImpl::grabKey( int keyQt, bool grab )
{
if( !keyQt ) {
- qCWarning(KGLOBALACCELD) << "Tried to grab key with null code.";
+ qWarning() << "Tried to grab key with null code.";
return false;
}
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/kglobalaccel_x11.cpp
^
|
@@ -20,7 +20,6 @@
#include "kglobalaccel_x11.h"
-#include "logging_p.h"
#include "globalshortcutsregistry.h"
#include "kkeyserver.h"
#include <netwm.h>
@@ -55,7 +54,7 @@
KKeyServer::modXNumLock() |
KKeyServer::modXScrollLock() |
KKeyServer::modXModeSwitch();
- //qCDebug(KGLOBALACCELD) << "g_keyModMaskXAccel = " << g_keyModMaskXAccel
+ //qDebug() << "g_keyModMaskXAccel = " << g_keyModMaskXAccel
// << "g_keyModMaskXOnOrOff = " << g_keyModMaskXOnOrOff << endl;
}
@@ -92,7 +91,7 @@
return false;
}
if( !keyQt ) {
- qCDebug(KGLOBALACCELD) << "Tried to grab key with null code.";
+ qDebug() << "Tried to grab key with null code.";
return false;
}
@@ -101,13 +100,13 @@
// Resolve the modifier
if( !KKeyServer::keyQtToModX(keyQt, &keyModX) ) {
- qCDebug(KGLOBALACCELD) << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 modifier";
+ qDebug() << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 modifier";
return false;
}
// Resolve the X symbol
if( !KKeyServer::keyQtToSymX(keyQt, (int *)&keySymX) ) {
- qCDebug(KGLOBALACCELD) << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 keycode";
+ qDebug() << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 keycode";
return false;
}
@@ -125,14 +124,14 @@
keySymX != xcb_key_symbols_get_keysym(m_keySymbols, keyCodeX, 0) &&
keySymX == xcb_key_symbols_get_keysym(m_keySymbols, keyCodeX, 1) )
{
- qCDebug(KGLOBALACCELD) << "adding shift to the grab";
+ qDebug() << "adding shift to the grab";
keyModX |= KKeyServer::modXShift();
}
keyModX &= g_keyModMaskXAccel; // Get rid of any non-relevant bits in mod
if( !keyCodeX ) {
- qCDebug(KGLOBALACCELD) << "keyQt (0x" << hex << keyQt << ") was resolved to x11 keycode 0";
+ qDebug() << "keyQt (0x" << hex << keyQt << ") was resolved to x11 keycode 0";
return false;
}
@@ -170,7 +169,7 @@
}
}
if( failed ) {
- qCDebug(KGLOBALACCELD) << "grab failed!\n";
+ qDebug() << "grab failed!\n";
for( uint m = 0; m <= 0xff; m++ ) {
if(( m & keyModMaskX ) == 0 )
xcb_ungrab_key(QX11Info::connection(), keyCodeX, QX11Info::appRootWindow(), keyModX | m);
@@ -190,13 +189,13 @@
const uint8_t responseType = event->response_type & ~0x80;
switch (responseType) {
case XCB_MAPPING_NOTIFY:
- qCDebug(KGLOBALACCELD) << "Got XMappingNotify event";
+ qDebug() << "Got XMappingNotify event";
xcb_refresh_keyboard_mapping(m_keySymbols, reinterpret_cast<xcb_mapping_notify_event_t*>(event));
x11MappingNotify();
return true;
case XCB_KEY_PRESS:
- qCDebug(KGLOBALACCELD) << "Got XKeyPress event";
+ qDebug() << "Got XKeyPress event";
return x11KeyPress(reinterpret_cast<xcb_key_press_event_t*>(event));
default:
@@ -229,7 +228,7 @@
bool KGlobalAccelImpl::x11KeyPress(xcb_key_press_event_t *pEvent)
{
if (QWidget::keyboardGrabber() || QApplication::activePopupWidget()) {
- qCWarning(KGLOBALACCELD) << "kglobalacceld should be popup and keyboard grabbing free!";
+ qWarning() << "kglobalacceld should be popup and keyboard grabbing free!";
}
// Keyboard needs to be ungrabed after XGrabKey() activates the grab,
@@ -271,7 +270,7 @@
KKeyServer::modXToQt(keyModX, &keyModQt);
if( keyModQt & Qt::SHIFT && !KKeyServer::isShiftAsModifierAllowed( keyCodeQt ) ) {
- qCDebug(KGLOBALACCELD) << "removing shift modifier";
+ qDebug() << "removing shift modifier";
keyModQt &= ~Qt::SHIFT;
}
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/kglobalacceld.cpp
^
|
@@ -26,7 +26,6 @@
#include "globalshortcut.h"
#include "globalshortcutcontext.h"
#include "globalshortcutsregistry.h"
-#include "logging_p.h"
#include <QtCore/QTimer>
#include <QtCore/QMetaMethod>
@@ -86,7 +85,7 @@
// Check if actionId is valid
if (actionId.size() != 4)
{
- qCDebug(KGLOBALACCELD) << "Invalid! '" << actionId << "'";
+ qDebug() << "Invalid! '" << actionId << "'";
return NULL;
}
@@ -118,7 +117,7 @@
if (!component)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << componentUnique << "not found";
+ qDebug() << componentUnique << "not found";
#endif
return NULL;
}
@@ -130,13 +129,13 @@
#ifdef KDEDGLOBALACCEL_TRACE
if (shortcut)
{
- qCDebug(KGLOBALACCELD) << componentUnique
+ qDebug() << componentUnique
<< contextUnique
<< shortcut->uniqueName();
}
else
{
- qCDebug(KGLOBALACCELD) << "No match for" << shortcutUnique;
+ qDebug() << "No match for" << shortcutUnique;
}
#endif
return shortcut;
@@ -220,7 +219,7 @@
reg, SLOT(writeSettings()));
if (!QDBusConnection::sessionBus().registerService(QLatin1String("org.kde.kglobalaccel"))) {
- qCWarning(KGLOBALACCELD) << "Failed to register service org.kde.kglobalaccel";
+ qWarning() << "Failed to register service org.kde.kglobalaccel";
return false;
}
@@ -228,7 +227,7 @@
QStringLiteral("/kglobalaccel"),
this,
QDBusConnection::ExportScriptableContents)) {
- qCWarning(KGLOBALACCELD) << "Failed to register object kglobalaccel in org.kde.kglobalaccel";
+ qWarning() << "Failed to register object kglobalaccel in org.kde.kglobalaccel";
return false;
}
@@ -337,7 +336,7 @@
void KGlobalAccelD::blockGlobalShortcuts(bool block)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << block;
+ qDebug() << block;
#endif
block
? GlobalShortcutsRegistry::self()->deactivateShortcuts(true)
@@ -368,7 +367,7 @@
void KGlobalAccelD::doRegister(const QStringList &actionId)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << actionId;
+ qDebug() << actionId;
#endif
// Check because we would not want to add a action for an invalid
@@ -398,7 +397,7 @@
QDBusObjectPath KGlobalAccelD::getComponent(const QString &componentUnique) const
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << componentUnique;
+ qDebug() << componentUnique;
#endif
KdeDGlobalAccel::Component *component =
@@ -419,7 +418,7 @@
QList<KGlobalShortcutInfo> KGlobalAccelD::getGlobalShortcutsByKey(int key) const
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << key;
+ qDebug() << key;
#endif
QList<GlobalShortcut*> shortcuts =
GlobalShortcutsRegistry::self()->getShortcutsByKey(key);
@@ -428,7 +427,7 @@
Q_FOREACH(const GlobalShortcut *sc, shortcuts)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << sc->context()->uniqueName() << sc->uniqueName();
+ qDebug() << sc->context()->uniqueName() << sc->uniqueName();
#endif
rc.append(static_cast<KGlobalShortcutInfo>(*sc));
}
@@ -449,7 +448,7 @@
void KGlobalAccelD::setInactive(const QStringList &actionId)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << actionId;
+ qDebug() << actionId;
#endif
GlobalShortcut *shortcut = d->findAction(actionId);
@@ -461,7 +460,7 @@
bool KGlobalAccelD::unregister(const QString &componentUnique, const QString &shortcutUnique)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << componentUnique << shortcutUnique;
+ qDebug() << componentUnique << shortcutUnique;
#endif
// Stop grabbing the key
@@ -479,7 +478,7 @@
void KGlobalAccelD::unRegister(const QStringList &actionId)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << actionId;
+ qDebug() << actionId;
#endif
// Stop grabbing the key
@@ -546,7 +545,7 @@
void KGlobalAccelD::setForeignShortcut(const QStringList &actionId, const QList<int> &keys)
{
#ifdef KDEDGLOBALACCEL_TRACE
- qCDebug(KGLOBALACCELD) << actionId;
+ qDebug() << actionId;
#endif
GlobalShortcut *shortcut = d->findAction(actionId);
|
[-]
[+]
|
Deleted |
kglobalaccel-5.9.0.tar.xz/src/runtime/logging.cpp
^
|
@@ -1,21 +0,0 @@
-/********************************************************************
-Copyright 2015 Martin Gräßlin <mgraesslin@kde.org>
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) version 3, or any
-later version accepted by the membership of KDE e.V. (or its
-successor approved by the membership of KDE e.V.), which shall
-act as a proxy defined in Section 6 of version 3 of the license.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*********************************************************************/
-#include "logging_p.h"
-Q_LOGGING_CATEGORY(KGLOBALACCELD, "kglobalaccel-runtime");
|
[-]
[+]
|
Deleted |
kglobalaccel-5.9.0.tar.xz/src/runtime/logging_p.h
^
|
@@ -1,26 +0,0 @@
-/********************************************************************
-Copyright 2015 Martin Gräßlin <mgraesslin@kde.org>
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) version 3, or any
-later version accepted by the membership of KDE e.V. (or its
-successor approved by the membership of KDE e.V.), which shall
-act as a proxy defined in Section 6 of version 3 of the license.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*********************************************************************/
-#ifndef KGLOBALACCELD_LOGGING_P_H
-#define KGLOBALACCELD_LOGGING_P_H
-#include <QDebug>
-#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(KGLOBALACCELD)
-
-#endif
|
[-]
[+]
|
Changed |
kglobalaccel-5.9.0.tar.xz/src/runtime/main.cpp
^
|
@@ -20,7 +20,6 @@
*/
#include "kglobalacceld.h"
-#include "logging_p.h"
#include <kcrash.h>
#include <KAboutData>
@@ -72,7 +71,7 @@
// check if kglobalaccel is disabled
if (!isEnabled()) {
- qCDebug(KGLOBALACCELD) << "kglobalaccel is disabled!";
+ qDebug() << "kglobalaccel is disabled!";
return 0;
}
|
[-]
[+]
|
Changed |
kglobalaccel.yaml
^
|
@@ -25,6 +25,14 @@
- extra-cmake-modules
- qt5-tools
- qt5-qttools-linguist
+ - qt5-qtx11extras-devel
+ - kconfig
+ - kcrash-devel
+ - kconfig-devel
+ - kcoreaddons-devel
+ - kdbusaddons-devel
+ - ki18n-devel
+ - kwindowsystem-devel
PkgConfigBR:
- Qt5Core
- Qt5DBus
@@ -36,6 +44,7 @@
- Qt5Test
- Qt5X11Extras
- x11
+ - xcb-keysyms
Requires:
- kf5-filesystem
@@ -47,6 +56,9 @@
Files:
- "%doc COPYING.LIB README.md"
- "%{_kf5_libdir}/libKF5GlobalAccel.so.*"
+ - "%{_kf5_bindir}/kglobalaccel5"
+ - "%{_kf5_sharedir}/dbus-1/services/*.service"
+ - "%{_kf5_servicesdir}/*"
FilesInput: kglobalaccel5_qt.lang
SubPackages:
|