1
0

Accepting request 797605 from home:gmbr3:branches:X11:LXQt

- Removed lxqt-globalkeys-0.14.1-fix-qt.5.14.patch: contained in upstream
- Update to version 0.15.0
  * Just some code cleanups are done.

OBS-URL: https://build.opensuse.org/request/show/797605
OBS-URL: https://build.opensuse.org/package/show/X11:LXQt/lxqt-globalkeys?expand=0&rev=17
This commit is contained in:
Michael Vetter 2020-04-25 13:45:23 +00:00 committed by Git OBS Bridge
parent 55679ada12
commit ed57e61d09
7 changed files with 32 additions and 150 deletions

View File

@ -1,124 +0,0 @@
From c9ec69850428e599fba282c32e51868b815e3019 Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <yan12125@gmail.com>
Date: Sun, 15 Dec 2019 09:33:12 +0800
Subject: [PATCH] Fix building with Qt 5.14
---
daemon/core.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemon/core.cpp b/daemon/core.cpp
index 1be64ec..53bdf7b 100644
--- a/daemon/core.cpp
+++ b/daemon/core.cpp
@@ -33,6 +33,7 @@
#include <QTimer>
#include <QDBusConnectionInterface>
#include <QDBusServiceWatcher>
+#include <QFile>
#include <cstddef>
#include <cstdlib>
From 4169bbc9a8d64683fb028b1e87253379afc14cff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= <luis.artur.pereira@gmail.com>
Date: Thu, 12 Dec 2019 16:04:38 +0000
Subject: [PATCH] Remove obsolete qBinaryFind
Use std::lower_bound instead.
---
config/default_model.cpp | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/config/default_model.cpp b/config/default_model.cpp
index 852971e..360d708 100644
--- a/config/default_model.cpp
+++ b/config/default_model.cpp
@@ -29,6 +29,8 @@
#include "default_model.h"
#include "actions.h"
+#include <algorithm>
+
DefaultModel::DefaultModel(Actions *actions, const QColor &grayedOutColour, const QFont &highlightedFont, const QFont &italicFont, const QFont &highlightedItalicFont, QObject *parent)
: QAbstractTableModel(parent)
@@ -223,7 +225,7 @@ void DefaultModel::actionAdded(qulonglong id)
if (result.first)
{
QList<qulonglong> keys = mContent.keys();
- int row = qBinaryFind(keys, mContent.lowerBound(id).key()) - keys.constBegin();
+ int row = std::lower_bound(keys.constBegin(), keys.constEnd(), mContent.lowerBound(id).key()) - keys.constBegin();
beginInsertRows(QModelIndex(), row, row);
@@ -237,7 +239,7 @@ void DefaultModel::actionAdded(qulonglong id)
{
if (id != siblingId)
{
- int siblingRow = qBinaryFind(keys, siblingId) - keys.constBegin();
+ int siblingRow = std::lower_bound(keys.constBegin(), keys.constEnd(), siblingId) - keys.constBegin();
emit dataChanged(index(siblingRow, 1), index(siblingRow, 1));
}
}
@@ -250,7 +252,7 @@ void DefaultModel::actionEnabled(qulonglong id, bool enabled)
if (mContent.contains(id))
{
QList<qulonglong> keys = mContent.keys();
- int row = qBinaryFind(keys, id) - keys.constBegin();
+ int row = std::lower_bound(keys.constBegin(), keys.constEnd(), id) - keys.constBegin();
mContent[id].enabled = enabled;
@@ -266,7 +268,7 @@ void DefaultModel::actionModified(qulonglong id)
if (result.first)
{
QList<qulonglong> keys = mContent.keys();
- int row = qBinaryFind(keys, id) - keys.constBegin();
+ int row = std::lower_bound(keys.constBegin(), keys.constEnd(), id) - keys.constBegin();
if (mContent[id].shortcut != result.second.shortcut)
{
@@ -274,12 +276,12 @@ void DefaultModel::actionModified(qulonglong id)
mShortcuts[mContent[id].shortcut].remove(id);
for(qulonglong siblingId : qAsConst(mShortcuts[mContent[id].shortcut]))
{
- int siblingRow = qBinaryFind(keys, siblingId) - keys.constBegin();
+ int siblingRow = std::lower_bound(keys.constBegin(), keys.constEnd(), siblingId) - keys.constBegin();
emit dataChanged(index(siblingRow, 1), index(siblingRow, 1));
}
for(qulonglong siblingId : qAsConst(mShortcuts[result.second.shortcut]))
{
- int siblingRow = qBinaryFind(keys, siblingId) - keys.constBegin();
+ int siblingRow = std::lower_bound(keys.constBegin(), keys.constEnd(), siblingId) - keys.constBegin();
emit dataChanged(index(siblingRow, 1), index(siblingRow, 1));
}
}
@@ -296,8 +298,8 @@ void DefaultModel::actionsSwapped(qulonglong id1, qulonglong id2)
if (mContent.contains(id1) && mContent.contains(id2))
{
QList<qulonglong> keys = mContent.keys();
- int row1 = qBinaryFind(keys, id1) - keys.constBegin();
- int row2 = qBinaryFind(keys, id2) - keys.constBegin();
+ int row1 = std::lower_bound(keys.constBegin(), keys.constEnd(), id1) - keys.constBegin();
+ int row2 = std::lower_bound(keys.constBegin(), keys.constEnd(), id2) - keys.constBegin();
// swap
GeneralActionInfo tmp = mContent[id1];
@@ -314,7 +316,7 @@ void DefaultModel::actionRemoved(qulonglong id)
if (mContent.contains(id))
{
QList<qulonglong> keys = mContent.keys();
- int row = qBinaryFind(keys, id) - keys.constBegin();
+ int row = std::lower_bound(keys.constBegin(), keys.constEnd(), id) - keys.constBegin();
beginRemoveRows(QModelIndex(), row, row);
@@ -327,7 +329,7 @@ void DefaultModel::actionRemoved(qulonglong id)
for(qulonglong siblingId : qAsConst(mShortcuts[shortcut]))
{
- int siblingRow = qBinaryFind(keys, siblingId) - keys.constBegin();
+ int siblingRow = std::lower_bound(keys.constBegin(), keys.constEnd(), siblingId) - keys.constBegin();
emit dataChanged(index(siblingRow, 1), index(siblingRow, 1));
}
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e6b92c5d9b61ad95ab30d70ecf0b30fd20ef1713910cce366e97e0dd7101f455
size 67928

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEfHM7pfWFqtZp5NI6QsnI069epeMFAl2nQlUACgkQQsnI069e
peMaOQ/9Giwd6k48kSArEYXr3qDwoaTy1cxBFFF1qMfOGUqjkiWx//9kjKF0ddAB
QgAKtx+TXyNLBpyoGIKzx1ITXpyi8WZQVfdNjuBQu/oGn528gO26JQvXg2J/9d6U
jtk63zbWV88vrkzEDgiMfMoJs2G2iAAFcmbUh67wlmFstgbyjLpF66FTgGHVqthp
Cxg5vqMxKwBAg0yk9dNKhqBQtxn5CiPji5VytoXeazq79XfB2XfwY7roDFJYUuuj
sXAexKiNsWywX+wLbEDE9SaCSaJRfa7pAx7wxXHB7NGswtcuP6jI3+V1IoToe+gU
yKOD6DqNcgHHp5swwEVeNkLy65ZiLX7Dzlyvht/tKizWFlCoD247xjBL6+UBV0kz
2+7fB52byva/5Gg+Br5CoDWO/236Hd/3wybuyj4b5qWEazyrk15m52rsEMPEYbJ4
gQrHJpmcPrUcjgYwwaDH3p2pDlISOBVomYkr6ZviW/3geWnd9UfMFRyYg+ztJu61
H5iebKbvXRqwYd62Wi5iPGBuC0NTQaNLDH6fpEDDUSuM8r0CvmcNPGx3FIqRW7gq
h7Ep4qff1LQ8CxkqB8SKvURF3MbPiV7e4KsvZ//V49iAsFofhU7pYbP5foqzK1bO
pCO51TDcZBIWah/9wIc4pGUq8DUETIpBz4TBjgx3DX9G7n+hmKA=
=ev50
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce54a1f62a3ec8a5ae0db5639df14141f4fea70643b915fb91c05c31fcbedbf1
size 68932

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJJBAABCAAzFiEEGd/fOleb1QnbtXLYvnkwB60i334FAl6jDegVHHRzdWphbjIw
MDBAZ21haWwuY29tAAoJEL55MAetIt9+9wYP/RjQ+BMZPgXBKc3ai11WXsMrntGx
xC1szz4lXUuKaCOtYZGENgg1fJ19gXdEREv1UVu+Gw8BylAJoHQujdCkiqIBZLys
h9rrPZ1wvtrmF4CGGIncOwi6XJ7sfHg3w46UWXAnCEnCtm0c+WOWjIjUYVfFogV4
m0D5ZPz7TLJPMezJgd+rAv2rHYvAMmfQa+Vaeg1HQz/yuBXziRW1Um4vSAxCevFf
HmmHCQrfPpPk0jchB+NLpYwjJc1W71q50FEfTtM8SIGwTEvDLoi17prRMdNUsC/2
rQHiCWgwOqMAtEvwWEHy90WDF0KSkVE0RgexsXhDLg43svLaxdaryKuvGrtzpGn7
V3kor/s5a5ky+5Rfs7VPjEcYcrlCFswdQ36zMqgOBoQZIZAQWwlt9ZTKwI4JdhOR
sw1GOZdEkGq4ti2LSfXwjoYuuMX0LnulMvpWQAfZBb3Wp8GKpbhTp+8bi8m9c1QE
ppID0f1pxhQ6JiHR18A6n6WptYGGA42SnW8A6ZWQSJ1pR/mXyVkcnxf98WkSOP8D
IQC0DzoDNNdCwYILdDfQO8kETvNLXAi3Dpib22ebMlUvJ1tMEXELtCScVq2d8nME
CSd17cP4Y1cQm418DSMQRV8LPbTtP9cBv0CfzplgTw7aqqfrug2bS+KYbaTcJE/G
/oigQiPVLd29GdQo
=EQsI
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Apr 24 20:54:24 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Removed lxqt-globalkeys-0.14.1-fix-qt.5.14.patch: contained in upstream
- Update to version 0.15.0
* Just some code cleanups are done.
-------------------------------------------------------------------
Mon Jan 27 10:19:54 UTC 2020 - Michael Vetter <mvetter@suse.com>

View File

@ -17,24 +17,23 @@
Name: lxqt-globalkeys
Version: 0.14.3
Version: 0.15.0
Release: 0
Summary: Global keyboard shortcuts registration
License: LGPL-2.1-or-later
URL: https://www.lxqt.org
Source: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc
Patch0: lxqt-globalkeys-0.14.1-fix-qt.5.14.patch
Source: https://github.com/lxqt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/lxqt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring
BuildRequires: cmake >= 3.1.0
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: lxqt-build-tools-devel >= 0.6.0
BuildRequires: lxqt-build-tools-devel >= 0.7.0
BuildRequires: pkgconfig
BuildRequires: cmake(KF5WindowSystem)
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(lxqt) >= 0.14.1
BuildRequires: pkgconfig(lxqt) >= 0.15.0
Requires(post): desktop-file-utils
Requires(pre): desktop-file-utils
Obsoletes: lxqt-globalkeys-qt5 < %{version}
@ -70,7 +69,6 @@ UI system libraries for lxqt-globalkeys
%prep
%setup -q
%patch0 -p1
# Changing LXQt into X-LXQt in desktop files to be freedesktop compliant and shut rpmlint warnings
#find -name '*desktop.in*' -exec sed -ri 's/(LXQt;)/X-\1/' {} +