Hello community,

here is the log from the commit of package kglobalaccel for openSUSE:Factory 
checked in at 2018-11-14 14:34:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kglobalaccel (Old)
 and      /work/SRC/openSUSE:Factory/.kglobalaccel.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kglobalaccel"

Wed Nov 14 14:34:27 2018 rev:62 rq:648514 version:5.52.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kglobalaccel/kglobalaccel.changes        
2018-11-12 09:48:42.696529103 +0100
+++ /work/SRC/openSUSE:Factory/.kglobalaccel.new/kglobalaccel.changes   
2018-11-14 14:34:28.331263005 +0100
@@ -1,0 +2,14 @@
+Sun Nov 11 19:48:04 UTC 2018 - [email protected]
+
+- Update to 5.52.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.52.0.php
+- Changes since 5.51.0:
+  * Fix keyboard layout change notifications (kde#350816, kde#269403)
+  * Add identifier
+  * Call reserve() on Qt containers if fill size is known before
+- Dropped patches, now upstream:
+  * 0001-Fix-keyboard-layout-change-notifications.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Fix-keyboard-layout-change-notifications.patch
  kglobalaccel-5.51.0.tar.xz

New:
----
  kglobalaccel-5.52.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kglobalaccel.spec ++++++
--- /var/tmp/diff_new_pack.9dxX6m/_old  2018-11-14 14:34:28.763262583 +0100
+++ /var/tmp/diff_new_pack.9dxX6m/_new  2018-11-14 14:34:28.763262583 +0100
@@ -17,14 +17,14 @@
 
 
 %define lname   libKF5GlobalAccel5
-%define _tar_path 5.51
+%define _tar_path 5.52
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           kglobalaccel
-Version:        5.51.0
+Version:        5.52.0
 Release:        0
 Summary:        Global desktop keyboard shortcuts
 License:        LGPL-2.1-or-later
@@ -32,8 +32,6 @@
 URL:            https://www.kde.org
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
-# PATCH-FIX-UPSTREAM
-Patch1:         0001-Fix-keyboard-layout-change-notifications.patch
 BuildRequires:  cmake >= 3.0
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
@@ -111,7 +109,6 @@
 
 %prep
 %setup -q
-%autopatch -p1
 
 %build
   %cmake_kf5 -d build -- -Dlconvert_executable=%{_kf5_libdir}/qt5/bin/lconvert

++++++ kglobalaccel-5.51.0.tar.xz -> kglobalaccel-5.52.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/CMakeLists.txt 
new/kglobalaccel-5.52.0/CMakeLists.txt
--- old/kglobalaccel-5.51.0/CMakeLists.txt      2018-10-08 10:14:24.000000000 
+0200
+++ new/kglobalaccel-5.52.0/CMakeLists.txt      2018-11-03 19:00:56.000000000 
+0100
@@ -1,12 +1,12 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.51.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.51.0") # handled by release scripts
+set(KF5_VERSION "5.52.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.52.0") # handled by release scripts
 project(KGlobalAccel VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.51.0  NO_MODULE)
+find_package(ECM 5.52.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -21,6 +21,7 @@
 include(ECMMarkNonGuiExecutable)
 include(ECMQtDeclareLoggingCategory)
 
+
 include(ECMPoQmTools)
 
 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt 
Assistant, Qt Creator & KDevelop)" OFF)
@@ -48,7 +49,7 @@
 
 # no X11 stuff on mac
 if (NOT APPLE)
-    find_package(XCB MODULE COMPONENTS XCB KEYSYMS XTEST)
+    find_package(XCB MODULE COMPONENTS XCB KEYSYMS XTEST XKB)
     set_package_properties(XCB PROPERTIES DESCRIPTION "X protocol C-language 
Binding"
                        URL "http://xcb.freedesktop.org";
                        TYPE OPTIONAL
@@ -68,11 +69,6 @@
 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
     ecm_install_po_files_as_qm(po)
 endif()
-add_definitions(-DQT_NO_CAST_FROM_ASCII)
-add_definitions(-DQT_NO_CAST_TO_ASCII)
-add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
-add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
-add_definitions(-DQT_USE_QSTRINGBUILDER)
 
 add_subdirectory(src)
 if (BUILD_TESTING)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/kglobalaccel.categories 
new/kglobalaccel-5.52.0/kglobalaccel.categories
--- old/kglobalaccel-5.51.0/kglobalaccel.categories     2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/kglobalaccel.categories     2018-11-03 
19:00:56.000000000 +0100
@@ -1 +1 @@
-kf5.kglobalaccel KGlobalAccel
+kf5.kglobalaccel KGlobalAccel IDENTIFIER [KGLOBALACCEL_LOG]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/po/ast/kglobalaccel5_qt.po 
new/kglobalaccel-5.52.0/po/ast/kglobalaccel5_qt.po
--- old/kglobalaccel-5.51.0/po/ast/kglobalaccel5_qt.po  2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/po/ast/kglobalaccel5_qt.po  1970-01-01 
01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-# enolp <[email protected]>, 2016.
-msgid ""
-msgstr ""
-"Project-Id-Version: \n"
-"PO-Revision-Date: 2016-12-20 22:09+0100\n"
-"Last-Translator: enolp <[email protected]>\n"
-"Language-Team: Asturian <[email protected]>\n"
-"Language: ast\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Qt-Contexts: true\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Lokalize 2.0\n"
-
-#: kglobalaccel.cpp:556
-msgctxt "KGlobalAccel|"
-msgid "Conflict with Global Shortcut"
-msgstr "Conflictu con atayu global"
-
-#: kglobalaccel.cpp:557
-#, qt-format
-msgctxt "KGlobalAccel|"
-msgid ""
-"The '%1' key combination has already been allocated to the global action "
-"\"%2\" in %3.\n"
-"Do you want to reassign it from that action to the current one?"
-msgstr ""
-"Yá s'allugó la combinación de tecles «%1» a l'aición global «%2» en %3.\n"
-"¿Quies reasignala d'esa aición actual?"
-
-#: kglobalaccel.cpp:567 kglobalaccel.cpp:606
-msgctxt "KGlobalAccel|"
-msgid "Reassign"
-msgstr "Reasignar"
-
-#: kglobalaccel.cpp:589
-#, qt-format
-msgctxt "KGlobalAccel|"
-msgid "The '%1' key combination is registered by application %2 for action %3:"
-msgstr ""
-"Rexistróse la combinación de tecles «%1» pola aplicación %2 pa l'aición %3:"
-
-#: kglobalaccel.cpp:594
-#, qt-format
-msgctxt "KGlobalAccel|"
-msgid "In context '%1' for action '%2'\n"
-msgstr "Nel contestu «%1» pa l'aición «%2»\n"
-
-#: kglobalaccel.cpp:597
-#, qt-format
-msgctxt "KGlobalAccel|"
-msgid ""
-"The '%1' key combination is registered by application %2.\n"
-"%3"
-msgstr ""
-"Rexistróse la combinación de tecles «%1» pola aplicación %2.\n"
-"%3"
-
-#: kglobalaccel.cpp:601
-msgctxt "KGlobalAccel|"
-msgid "Conflict With Registered Global Shortcut"
-msgstr "Conflictu col atayu global rexistráu"
-
-#: runtime/main.cpp:52 runtime/main.cpp:54
-msgctxt "QObject|"
-msgid "KDE Global Shortcuts Service"
-msgstr "Serviciu d'atayos globales de KDE"
-
-#: runtime/main.cpp:57 runtime/main.cpp:58
-msgctxt "QObject|"
-msgid "Maintainer"
-msgstr "Caltenedor"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/po/zh_CN/kglobalaccel5_qt.po 
new/kglobalaccel-5.52.0/po/zh_CN/kglobalaccel5_qt.po
--- old/kglobalaccel-5.51.0/po/zh_CN/kglobalaccel5_qt.po        2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/po/zh_CN/kglobalaccel5_qt.po        2018-11-03 
19:00:56.000000000 +0100
@@ -13,8 +13,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
-"PO-Revision-Date: 2018-09-28 19:46\n"
-"Last-Translator: guoyunhe <[email protected]>\n"
+"PO-Revision-Date: 2018-10-09 18:38\n"
+"Last-Translator: guoyunhe <[email protected]>\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/src/runtime/kglobalaccel.desktop 
new/kglobalaccel-5.52.0/src/runtime/kglobalaccel.desktop
--- old/kglobalaccel-5.51.0/src/runtime/kglobalaccel.desktop    2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/kglobalaccel.desktop    2018-11-03 
19:00:56.000000000 +0100
@@ -9,7 +9,6 @@
 
 Name=KDED Global Shortcuts Server
 Name[ar]=خادوم KDED للاختصارات العمومية
-Name[ast]=Sirvidor d'atayos globales KDED
 Name[be@latin]=Słužba paŭsiudnych klavijaturnych skarotaŭ dla „KDE”
 Name[bg]=Сървър KDED Global Shortcuts
 Name[bn]=কে.ডি.ই.ডি গ্লোবাল শর্টকাট সার্ভার
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kglobalaccel-5.51.0/src/runtime/kglobalacceld.cpp 
new/kglobalaccel-5.52.0/src/runtime/kglobalacceld.cpp
--- old/kglobalaccel-5.51.0/src/runtime/kglobalacceld.cpp       2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/kglobalacceld.cpp       2018-11-03 
19:00:56.000000000 +0100
@@ -260,11 +260,14 @@
 {
     QList<QStringList> ret;
     QStringList emptyList;
+    emptyList.reserve(4);
     for (int i = 0; i < 4; i++) {
         emptyList.append(QString());
     }
 
-    foreach (const KdeDGlobalAccel::Component *component, 
GlobalShortcutsRegistry::self()->allMainComponents()) {
+    const auto components = 
GlobalShortcutsRegistry::self()->allMainComponents();
+    ret.reserve(components.size() * 4);
+    for (const KdeDGlobalAccel::Component *component : components) {
         QStringList actionId(emptyList);
         actionId[KGlobalAccel::ComponentUnique] = component->uniqueName();
         actionId[KGlobalAccel::ComponentFriendly] = component->friendlyName();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kglobalaccel-5.51.0/src/runtime/plugins/CMakeLists.txt 
new/kglobalaccel-5.52.0/src/runtime/plugins/CMakeLists.txt
--- old/kglobalaccel-5.51.0/src/runtime/plugins/CMakeLists.txt  2018-10-08 
10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/plugins/CMakeLists.txt  2018-11-03 
19:00:56.000000000 +0100
@@ -1,4 +1,4 @@
-if (${XCB_XCB_FOUND} AND ${XCB_KEYSYMS_FOUND})
+if (${XCB_XCB_FOUND} AND ${XCB_KEYSYMS_FOUND} AND ${XCB_XKB_FOUND})
     add_subdirectory(xcb)
 endif()
 # if (APPLE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/CMakeLists.txt 
new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/CMakeLists.txt
--- old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/CMakeLists.txt      
2018-10-08 10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/CMakeLists.txt      
2018-11-03 19:00:56.000000000 +0100
@@ -8,6 +8,7 @@
     KF5GlobalAccelPrivate
     XCB::XCB
     XCB::KEYSYMS
+    XCB::XKB
 )
 
 install(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/kglobalaccel_x11.cpp 
new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/kglobalaccel_x11.cpp
--- old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/kglobalaccel_x11.cpp        
2018-10-08 10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/kglobalaccel_x11.cpp        
2018-11-03 19:00:56.000000000 +0100
@@ -33,9 +33,13 @@
 #include <X11/keysym.h>
 
 // xcb
+
+// It uses "explicit" as a variable name, which is not allowed in C++
+#define explicit xcb_explicit
 #include <xcb/xcb.h>
 #include <xcb/xcb_keysyms.h>
-
+#include <xcb/xkb.h>
+#undef explicit
 
 // g_keyModMaskXAccel
 //     mask of modifiers which can be used in shortcuts
@@ -63,11 +67,16 @@
 KGlobalAccelImpl::KGlobalAccelImpl(QObject *parent)
     : KGlobalAccelInterface(parent)
     , m_keySymbols(nullptr)
+    , m_xkb_first_event(0)
 {
+       Q_ASSERT(QX11Info::connection());
+
+       const xcb_query_extension_reply_t *reply = 
xcb_get_extension_data(QX11Info::connection(), &xcb_xkb_id);
+       if (reply && reply->present) {
+               m_xkb_first_event = reply->first_event;
+       }
+
        calculateGrabMasks();
-    if (QX11Info::isPlatformX11()) {
-        m_keySymbols = xcb_key_symbols_alloc(QX11Info::connection());
-    }
 }
 
 KGlobalAccelImpl::~KGlobalAccelImpl()
@@ -87,8 +96,12 @@
     }
 
     if (!m_keySymbols) {
-        return false;
+        m_keySymbols = xcb_key_symbols_alloc(QX11Info::connection());
+        if (!m_keySymbols) {
+            return false;
+        }
     }
+
        if( !keyQt ) {
         qCDebug(KGLOBALACCELD) << "Tried to grab key with null code.";
                return false;
@@ -192,30 +205,45 @@
     }
     xcb_generic_event_t *event = 
reinterpret_cast<xcb_generic_event_t*>(message);
     const uint8_t responseType = event->response_type & ~0x80;
-    switch (responseType) {
-        case XCB_MAPPING_NOTIFY:
-            qCDebug(KGLOBALACCELD) << "Got XMappingNotify event";
-            xcb_refresh_keyboard_mapping(m_keySymbols, 
reinterpret_cast<xcb_mapping_notify_event_t*>(event));
-            x11MappingNotify();
-            return true;
+    if (responseType == XCB_MAPPING_NOTIFY) {
+        x11MappingNotify();
 
-        case XCB_KEY_PRESS:
+        // Make sure to let Qt handle it as well
+        return false;
+    } else if (responseType == XCB_KEY_PRESS) {
 #ifdef KDEDGLOBALACCEL_TRACE
-            qCDebug(KGLOBALACCELD) << "Got XKeyPress event";
+        qCDebug(KGLOBALACCELD) << "Got XKeyPress event";
 #endif
-            return 
x11KeyPress(reinterpret_cast<xcb_key_press_event_t*>(event));
+        return x11KeyPress(reinterpret_cast<xcb_key_press_event_t*>(event));
+    } else if (m_xkb_first_event && responseType == m_xkb_first_event) {
+        const uint8_t xkbEvent = event->pad0;
+        switch (xkbEvent) {
+            case XCB_XKB_MAP_NOTIFY:
+                x11MappingNotify();
+                break;
+            case XCB_XKB_NEW_KEYBOARD_NOTIFY: {
+                const xcb_xkb_new_keyboard_notify_event_t *ev =
+                    
reinterpret_cast<xcb_xkb_new_keyboard_notify_event_t*>(event);
+                if (ev->changed & XCB_XKB_NKN_DETAIL_KEYCODES)
+                    x11MappingNotify();
+                break;
+            }
+            default:
+                break;
+        }
 
-        default:
-            // We get all XEvents. Just ignore them.
-            return false;
+        // Make sure to let Qt handle it as well
+        return false;
+    } else {
+        // We get all XEvents. Just ignore them.
+        return false;
     }
-
-    Q_ASSERT(false);
-    return false;
 }
 
 void KGlobalAccelImpl::x11MappingNotify()
 {
+       qCDebug(KGLOBALACCELD) << "Got XMappingNotify event";
+
        // Maybe the X modifier map has been changed.
        // uint oldKeyModMaskXAccel = g_keyModMaskXAccel;
        // uint oldKeyModMaskXOnOrOff = g_keyModMaskXOnOrOff;
@@ -226,6 +254,12 @@
        // different keycodes.
        ungrabKeys();
 
+       if (m_keySymbols) {
+               // Force reloading of the keySym mapping
+               xcb_key_symbols_free(m_keySymbols);
+               m_keySymbols = nullptr;
+       }
+
        KKeyServer::initializeMods();
        calculateGrabMasks();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/kglobalaccel_x11.h 
new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/kglobalaccel_x11.h
--- old/kglobalaccel-5.51.0/src/runtime/plugins/xcb/kglobalaccel_x11.h  
2018-10-08 10:14:24.000000000 +0200
+++ new/kglobalaccel-5.52.0/src/runtime/plugins/xcb/kglobalaccel_x11.h  
2018-11-03 19:00:56.000000000 +0100
@@ -77,6 +77,7 @@
         bool x11KeyPress(xcb_key_press_event_t *event);
        
     xcb_key_symbols_t *m_keySymbols;
+    uint8_t m_xkb_first_event;
 };
 
 #endif // _KGLOBALACCEL_X11_H


Reply via email to