forked from pool/liblxqt
- Update to 0.12.0:
* Bump minimum qtxdg version to 3.1.0 * Don't export github templates * Bump version and needed versions to the final values * lxqtpower: Allow disabling of lxqt-session provider * Drops Qt5Core_VERSION_STRING * HtmlDelegate: Fix sizeHint() computation * Add some comments about the meaning of versions * Move LXQt version back to liblxqt * Fixes (#118) * lxqtapplication: Avoid wrong signal handling * Removes unneeded semicolon in namespace definition * Fix format conversions [-Wformat-pedantic] warnings * Suppress compiler warnings about unused function parameters * Removes extra semicolons in Qt's Q macros * Translator: Prefer XDG_DATA_DIRS over compiled in path * Help the compiler optimizing loops * Use const variables where possible * Update AUTHORS - Remove liblxqt-0.11.1-allow-disabl-lxqt-session.patch: contained in upstream OBS-URL: https://build.opensuse.org/package/show/X11:LXQt/liblxqt?expand=0&rev=8
This commit is contained in:
@@ -1,126 +0,0 @@
|
||||
From f3f824c85811596bc8886b86f31b5f37c2480736 Mon Sep 17 00:00:00 2001
|
||||
From: Palo Kisa <palo.kisa@gmail.com>
|
||||
Date: Wed, 28 Jun 2017 09:25:43 +0200
|
||||
Subject: [PATCH] lxqtpower: Allow disabling of lxqt-session provider
|
||||
|
||||
To allow usage of LXQt::Power object inside of lxqt-session (handling
|
||||
the called method of LXQtSessionProvider) we need to avoid recurently
|
||||
calling lxqt-session itself.
|
||||
---
|
||||
lxqtpower/lxqtpower.cpp | 10 ++++++++--
|
||||
lxqtpower/lxqtpower.h | 12 ++++++++++--
|
||||
lxqtpower/lxqtpowerproviders.cpp | 36 +++++++++++++++++++++++++-----------
|
||||
3 files changed, 43 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/lxqtpower/lxqtpower.cpp b/lxqtpower/lxqtpower.cpp
|
||||
index 742793b..07cd19e 100644
|
||||
--- a/lxqtpower/lxqtpower.cpp
|
||||
+++ b/lxqtpower/lxqtpower.cpp
|
||||
@@ -33,15 +33,21 @@
|
||||
|
||||
using namespace LXQt;
|
||||
|
||||
-Power::Power(QObject *parent) :
|
||||
+Power::Power(bool useLxqtSessionProvider, QObject * parent /*= nullptr*/) :
|
||||
QObject(parent)
|
||||
{
|
||||
mProviders.append(new CustomProvider(this));
|
||||
+ if (useLxqtSessionProvider)
|
||||
+ mProviders.append(new LXQtProvider(this));
|
||||
mProviders.append(new SystemdProvider(this));
|
||||
mProviders.append(new UPowerProvider(this));
|
||||
mProviders.append(new ConsoleKitProvider(this));
|
||||
mProviders.append(new LxSessionProvider(this));
|
||||
- mProviders.append(new LXQtProvider(this));
|
||||
+}
|
||||
+
|
||||
+Power::Power(QObject * parent /*= nullptr*/)
|
||||
+ : Power(true, parent)
|
||||
+{
|
||||
}
|
||||
|
||||
|
||||
diff --git a/lxqtpower/lxqtpower.h b/lxqtpower/lxqtpower.h
|
||||
index f738b46..98b021e 100644
|
||||
--- a/lxqtpower/lxqtpower.h
|
||||
+++ b/lxqtpower/lxqtpower.h
|
||||
@@ -56,8 +56,16 @@ class LXQT_API Power : public QObject
|
||||
PowerSuspend /// Suspend the computer
|
||||
};
|
||||
|
||||
- /// Constructs a Power with parent.
|
||||
- explicit Power(QObject *parent = 0);
|
||||
+ /*!
|
||||
+ * Constructs the Power object.
|
||||
+ * \param useLxqtSessionProvider indicates if the DBus methods
|
||||
+ * provided by lxqt-session should be considered. This is useful to
|
||||
+ * avoid recursion if the lxqt-session wants to provide some of the
|
||||
+ * methods by itself with internal use of this object.
|
||||
+ */
|
||||
+ explicit Power(bool useLxqtSessionProvider, QObject *parent = nullptr);
|
||||
+ /// Constructs a Power with using the lxqt-session provider.
|
||||
+ explicit Power(QObject *parent = nullptr);
|
||||
|
||||
/// Destroys the object.
|
||||
virtual ~Power();
|
||||
diff --git a/lxqtpower/lxqtpowerproviders.cpp b/lxqtpower/lxqtpowerproviders.cpp
|
||||
index 1304e05..3907cc7 100644
|
||||
--- a/lxqtpower/lxqtpowerproviders.cpp
|
||||
+++ b/lxqtpower/lxqtpowerproviders.cpp
|
||||
@@ -500,31 +500,45 @@ LXQtProvider::~LXQtProvider()
|
||||
|
||||
bool LXQtProvider::canAction(Power::Action action) const
|
||||
{
|
||||
+ QString command;
|
||||
switch (action)
|
||||
{
|
||||
case Power::PowerLogout:
|
||||
- // there can be case when razo-session does not run
|
||||
- return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE,
|
||||
- QDBusConnection::sessionBus(), "canLogout",
|
||||
- PowerProvider::DontCheckDBUS);
|
||||
+ command = "canLogout";
|
||||
+ break;
|
||||
+ case Power::PowerReboot:
|
||||
+ command = "canReboot";
|
||||
+ break;
|
||||
+ case Power::PowerShutdown:
|
||||
+ command = "canPowerOff";
|
||||
+ break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ // there can be case when lxqtsession-session does not run
|
||||
+ return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE,
|
||||
+ QDBusConnection::sessionBus(), command,
|
||||
+ PowerProvider::DontCheckDBUS);
|
||||
}
|
||||
|
||||
|
||||
bool LXQtProvider::doAction(Power::Action action)
|
||||
{
|
||||
QString command;
|
||||
-
|
||||
switch (action)
|
||||
{
|
||||
- case Power::PowerLogout:
|
||||
- command = "logout";
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- return false;
|
||||
+ case Power::PowerLogout:
|
||||
+ command = "logout";
|
||||
+ break;
|
||||
+ case Power::PowerReboot:
|
||||
+ command = "reboot";
|
||||
+ break;
|
||||
+ case Power::PowerShutdown:
|
||||
+ command = "powerOff";
|
||||
+ break;
|
||||
+ default:
|
||||
+ return false;
|
||||
}
|
||||
|
||||
return dbusCall(LXQT_SERVICE,
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:487dc42ceb611f53024c531d5550bd0d4fe8cbfe3dbf3711faba5db6ee6d415d
|
||||
size 50356
|
@@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEfHM7pfWFqtZp5NI6QsnI069epeMFAlhpeWEACgkQQsnI069e
|
||||
peMNHBAAieIcbt4feaHDCQue7bFkJu+W6BmbzISgJgzg4/5vseN7GVZal/yt87Mm
|
||||
8t5S2SzLo8bzqCcOH0r/kHgRZHd/u7rJuuU3Fv9G2oN/7yIz9WzrKc15JlVu1gTs
|
||||
JvQ4oW8h1gB0yYsBfWNp6LnIiUPDCIfDdEdLVA3/r9vrjib37vQj+RApOoGlDvsG
|
||||
gkehsQf5VtkDKKQ99lXYIFKBJpzMxnqwvtvfO9QShrzwvsB+eYWo104bkdMRri51
|
||||
IP6vaF6V0vh8uxjEuEjczGRjbZdJJN/x2r4F+BZMXAiHVBgi8aFo4UdXBjs2mznp
|
||||
NSTa4fcgkOJEKOIXvqAV3mSGIUUtdHha3aGSWDd1HCx9v5q7ty4fQv2HG5OMi/Ce
|
||||
A1sNAgTFYsHdH0LzBZVvz5h2LQ/peaUZs/BrWcuE7BW7v1xqLTNV8X5vhfLiJ+7H
|
||||
QhBQyBduPaiQCd0ozN/5sESuVWAz8CLoEx+vjT0uZeMjdj8UMpulcKvpTmV9hMyP
|
||||
b9iam0ZJ1Pup4ETz4bxx5yttzagz1eamUNBkKzuYFoPlZgY05BNnSAKWj1d8BCnR
|
||||
1nNMjAcqqrw4RAuqf65zLZRwd7OL7KxJAA1d9X/dkNNQu0dATdmKLW1F+/sPkeku
|
||||
27auQcJadI3GPmSd1oNK7ucKhPK2UNUCJZYUxzPEFgqK+TZnotI=
|
||||
=hn+7
|
||||
-----END PGP SIGNATURE-----
|
3
liblxqt-0.12.0.tar.xz
Normal file
3
liblxqt-0.12.0.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:44bba48b073ded5b0ab3de2ea3575a704bb22d23ce5cc5743f76579c1f084f33
|
||||
size 51192
|
16
liblxqt-0.12.0.tar.xz.asc
Normal file
16
liblxqt-0.12.0.tar.xz.asc
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEfHM7pfWFqtZp5NI6QsnI069epeMFAlnrl6kACgkQQsnI069e
|
||||
peOf8g/+O9bI1RYe6PZo4emiDlIjleJ17IvVZ529axrDXLQPCik9Q+fOiLuxzbMU
|
||||
8Nc+DlYAsH3av/L8vFZJDrBssbhMto4vnuugYh16YlEx0ormr0HAP/xhksMtcsFG
|
||||
4sAwjvztlVyIXskeZm9jmc/qkWPUICK3CH/VuBwQEREZUqeIfVQvpjJtKcYcD+SO
|
||||
EJA7B+as6rod6YPQ4JXzp+k1f956mohMkbOTAc7x+hdIm50ZBC8w034u8UyepuFZ
|
||||
h2HIRnSSEUKmMO4vJalZCt3l9ndCI8IGfnw/aUULeS7igLPFboeBXYCd1kKBWyF1
|
||||
kt1EWJTv6NbkBU8k33K2GqRn1YSc92MlsBGkKwqN7veJjkkZaz8qcOi8r1eLrsGV
|
||||
pfjxWADK5dHpmOBx92b/m957IU/UumYt+V0NPrhtmg3eQx6ozgr3oFBpIJ4eVRly
|
||||
XUqGe/fSowh/8xxpdRLazqIoifU/Y47zcEwKoh/1xeRZgbDokwmbjnWJAkqXZZXz
|
||||
Ohy+cO3x5ZGVOciawJsYwUDKvCDd5L1DbJDpNnmSs3kL5y6yr33RPwRrBh9pgX52
|
||||
fHxIeT6wn92WyPlswtyUYDseAkOWyXP5of4mF/chrjayD9SWNca+AWm78yElvejD
|
||||
lH/awfCeuWlKu/bkgnWvR78IKmtT/5BvUof/QHSBp81zBh/a5Ow=
|
||||
=LHzZ
|
||||
-----END PGP SIGNATURE-----
|
@@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 23 10:02:44 UTC 2017 - mvetter@suse.com
|
||||
|
||||
- Update to 0.12.0:
|
||||
* Bump minimum qtxdg version to 3.1.0
|
||||
* Don't export github templates
|
||||
* Bump version and needed versions to the final values
|
||||
* lxqtpower: Allow disabling of lxqt-session provider
|
||||
* Drops Qt5Core_VERSION_STRING
|
||||
* HtmlDelegate: Fix sizeHint() computation
|
||||
* Add some comments about the meaning of versions
|
||||
* Move LXQt version back to liblxqt
|
||||
* Fixes (#118)
|
||||
* lxqtapplication: Avoid wrong signal handling
|
||||
* Removes unneeded semicolon in namespace definition
|
||||
* Fix format conversions [-Wformat-pedantic] warnings
|
||||
* Suppress compiler warnings about unused function parameters
|
||||
* Removes extra semicolons in Qt's Q macros
|
||||
* Translator: Prefer XDG_DATA_DIRS over compiled in path
|
||||
* Help the compiler optimizing loops
|
||||
* Use const variables where possible
|
||||
* Update AUTHORS
|
||||
- Remove liblxqt-0.11.1-allow-disabl-lxqt-session.patch:
|
||||
contained in upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 13 11:47:59 UTC 2017 - mvetter@suse.com
|
||||
|
||||
|
15
liblxqt.spec
15
liblxqt.spec
@@ -17,26 +17,25 @@
|
||||
|
||||
|
||||
Name: liblxqt
|
||||
Version: 0.11.1
|
||||
Version: 0.12.0
|
||||
Release: 0
|
||||
Summary: Core utility library for LXQt
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://www.lxqt.org
|
||||
Source: http://downloads.lxqt.org/lxqt/%{version}/%{name}-%{version}.tar.xz
|
||||
Source1: http://downloads.lxqt.org/lxqt/%{version}/%{name}-%{version}.tar.xz.asc
|
||||
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
|
||||
Source2: %{name}.keyring
|
||||
Patch0: liblxqt-0.11.1-allow-disabl-lxqt-session.patch
|
||||
BuildRequires: cmake >= 3.0.2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: lxqt-build-tools-devel
|
||||
BuildRequires: lxqt-build-tools-devel >= 0.4.0
|
||||
BuildRequires: cmake(KF5WindowSystem)
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(Qt5DBus)
|
||||
BuildRequires: pkgconfig(Qt5UiTools)
|
||||
BuildRequires: pkgconfig(Qt5X11Extras)
|
||||
BuildRequires: pkgconfig(Qt5Xdg) >= 1.3.0
|
||||
BuildRequires: pkgconfig(Qt5Xdg) >= 3.1.0
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xscrnsaver)
|
||||
Obsoletes: liblxqt-qt5 < %{version}
|
||||
@@ -50,6 +49,7 @@ functionality needed by nearly all of its components.
|
||||
%package -n liblxqt0
|
||||
Summary: LXQt core library
|
||||
Group: System/Libraries
|
||||
Provides: liblxqt
|
||||
Recommends: %{name}-lang
|
||||
|
||||
%description -n liblxqt0
|
||||
@@ -72,7 +72,6 @@ applications that want to make use of liblxqt.
|
||||
|
||||
%prep
|
||||
%setup -q -n liblxqt-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake -DPULL_TRANSLATIONS=No
|
||||
@@ -94,7 +93,7 @@ make %{?_smp_mflags}
|
||||
%files devel
|
||||
%defattr (-,root,root)
|
||||
%{_includedir}/lxqt/
|
||||
%{_datadir}/cmake/
|
||||
%{_datadir}/cmake/lxqt/
|
||||
%{_libdir}/pkgconfig/lxqt.pc
|
||||
%{_libdir}/%{name}.so
|
||||
|
||||
|
Reference in New Issue
Block a user