Hello community,

here is the log from the commit of package liblxqt for openSUSE:Factory checked 
in at 2017-10-24 22:22:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/liblxqt (Old)
 and      /work/SRC/openSUSE:Factory/.liblxqt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "liblxqt"

Tue Oct 24 22:22:43 2017 rev:9 rq:535966 version:0.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/liblxqt/liblxqt.changes  2017-09-13 
22:38:31.638406844 +0200
+++ /work/SRC/openSUSE:Factory/.liblxqt.new/liblxqt.changes     2017-10-24 
22:22:58.765531534 +0200
@@ -1,0 +2,25 @@
+Mon Oct 23 10:02:44 UTC 2017 - [email protected]
+
+- 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
+
+-------------------------------------------------------------------

Old:
----
  liblxqt-0.11.1-allow-disabl-lxqt-session.patch
  liblxqt-0.11.1.tar.xz
  liblxqt-0.11.1.tar.xz.asc

New:
----
  liblxqt-0.12.0.tar.xz
  liblxqt-0.12.0.tar.xz.asc

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

Other differences:
------------------
++++++ liblxqt.spec ++++++
--- /var/tmp/diff_new_pack.5eCckP/_old  2017-10-24 22:22:59.297506667 +0200
+++ /var/tmp/diff_new_pack.5eCckP/_new  2017-10-24 22:22:59.301506480 +0200
@@ -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 @@
 %package -n liblxqt0
 Summary:        LXQt core library
 Group:          System/Libraries
+Provides:       liblxqt
 Recommends:     %{name}-lang
 
 %description -n liblxqt0
@@ -72,7 +72,6 @@
 
 %prep
 %setup -q -n liblxqt-%{version}
-%patch0 -p1
 
 %build
 %cmake -DPULL_TRANSLATIONS=No
@@ -94,7 +93,7 @@
 %files devel
 %defattr (-,root,root)
 %{_includedir}/lxqt/
-%{_datadir}/cmake/
+%{_datadir}/cmake/lxqt/
 %{_libdir}/pkgconfig/lxqt.pc
 %{_libdir}/%{name}.so
 

++++++ liblxqt-0.11.1.tar.xz -> liblxqt-0.12.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/AUTHORS new/liblxqt-0.12.0/AUTHORS
--- old/liblxqt-0.11.1/AUTHORS  2017-01-01 22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/AUTHORS  2017-10-21 20:53:19.000000000 +0200
@@ -4,7 +4,7 @@
 
 Copyright:
     Copyright (c) 2010-2012 Razor team
-    Copyright (c) 2012-2016 LXQt team
+    Copyright (c) 2012-2017 LXQt team
 
 License: LGPL-2.1+ and BSD-3-clause
 The full text of the LGPL-2.1+ licenses can be found in the 'COPYING' file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/CHANGELOG new/liblxqt-0.12.0/CHANGELOG
--- old/liblxqt-0.11.1/CHANGELOG        2017-01-01 22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/CHANGELOG        2017-10-21 20:53:19.000000000 +0200
@@ -1,7 +1,30 @@
 
-liblxqt-0.11.1 / 2017-01-01
+liblxqt-0.12.0 / 2017-10-21
 ===========================
 
+  * 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
+
+0.11.1 / 2017-01-01
+===================
+
+  * Release 0.11.1: Update changelog
   * Bump needed build tools version (#113)
   * build: Enable/disable WITH_XDG_DIRS_FALLBACK based on Qt version (#111)
   * Updates lxqt-build-tools required version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/CMakeLists.txt 
new/liblxqt-0.12.0/CMakeLists.txt
--- old/liblxqt-0.11.1/CMakeLists.txt   2017-01-01 22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/CMakeLists.txt   2017-10-21 20:53:19.000000000 +0200
@@ -2,9 +2,25 @@
 
 project(liblxqt)
 
-set(QT_MINIMUM_VERSION "5.4.2")
-set(QTXDG_MINIMUM_VERSION "2.0.0")
-set(LXQTBT_MINIMUM_VERSION "0.3.1")
+set(QT_MINIMUM_VERSION "5.5.0")
+set(QTXDG_MINIMUM_VERSION "3.1.0")
+set(LXQTBT_MINIMUM_VERSION "0.4.0")
+
+# Major LXQt Version, belong to all components
+set(LXQT_MAJOR_VERSION 0)
+# Minor LXQt Version, belong to all components
+set(LXQT_MINOR_VERSION 12)
+#
+# Patch Version, belong *only* to the component
+# LXQt is 0.11 - liblxqt is at patch version 1
+# The official LXQt version will follow liblxqt.
+#
+# In a perfect world all components would have the same major- and minor- and
+# patch-version as liblxqt - in real life it will be fine if every component
+# has it's own patch version within a major/minor life cyle.
+#
+set(LXQT_PATCH_VERSION 0)
+set(LXQT_VERSION 
${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSION})
 
 include(CMakePackageConfigHelpers)
 include(GNUInstallDirs) # Standard directories for installation
@@ -118,7 +134,7 @@
 find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus X11Extras 
LinguistTools)
 find_package(Qt5Xdg ${QTXDG_MINIMUM_VERSION} REQUIRED)
 find_package(KF5WindowSystem REQUIRED QUIET)
-message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION_STRING}")
+message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
 
 QT5_ADD_DBUS_INTERFACE(SRCS
     dbus/org.freedesktop.Notifications.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/cmake/lxqt-config.cmake.in 
new/liblxqt-0.12.0/cmake/lxqt-config.cmake.in
--- old/liblxqt-0.11.1/cmake/lxqt-config.cmake.in       2017-01-01 
22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/cmake/lxqt-config.cmake.in       2017-10-21 
20:53:19.000000000 +0200
@@ -17,6 +17,18 @@
 find_dependency(lxqt-build-tools @LXQTBT_MINIMUM_VERSION@)
 include(LXQtConfigVars)
 
+
+#  - Set version informations
+set(LXQT_MAJOR_VERSION      "@LXQT_MAJOR_VERSION@")
+set(LXQT_MINOR_VERSION      "@LXQT_MINOR_VERSION@")
+set(LXQT_PATCH_VERSION      "@LXQT_PATCH_VERSION@")
+set(LXQT_VERSION            "@LXQT_VERSION@")
+
+add_definitions("-DLXQT_MAJOR_VERSION=\"${LXQT_MAJOR_VERSION}\"")
+add_definitions("-DLXQT_MINOR_VERSION=\"${LXQT_MINOR_VERSION}\"")
+add_definitions("-DLXQT_PATCH_VERSION=\"${LXQT_PATCH_VERSION}\"")
+add_definitions("-DLXQT_VERSION=\"${LXQT_VERSION}\"")
+
 if (NOT TARGET @LXQT_LIBRARY_NAME@)
     if (POLICY CMP0024)
         cmake_policy(SET CMP0024 NEW)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/configdialog/lxqtconfigdialog.cpp 
new/liblxqt-0.12.0/configdialog/lxqtconfigdialog.cpp
--- old/liblxqt-0.11.1/configdialog/lxqtconfigdialog.cpp        2017-01-01 
22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/configdialog/lxqtconfigdialog.cpp        2017-10-21 
20:53:19.000000000 +0200
@@ -112,6 +112,7 @@
 
 void ConfigDialog::closeEvent(QCloseEvent* event)
 {
+    Q_UNUSED(event)
     emit save();
     mSettings->sync();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtapplication.cpp 
new/liblxqt-0.12.0/lxqtapplication.cpp
--- old/liblxqt-0.11.1/lxqtapplication.cpp      2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtapplication.cpp      2017-10-21 20:53:19.000000000 
+0200
@@ -57,6 +57,7 @@
 */
 void dbgMessageOutput(QtMsgType type, const QMessageLogContext &ctx, const 
QString & msgStr)
 {
+    Q_UNUSED(ctx)
     QByteArray msgBuf = msgStr.toUtf8();
     const char* msg = msgBuf.constData();
     QDir dir(XdgDirs::configHome().toUtf8() + QLatin1String("/lxqt"));
@@ -84,12 +85,12 @@
 
     QByteArray dt = QDateTime::currentDateTime().toString("yyyy-MM-dd 
hh:mm:ss.zzz").toUtf8();
     if (isatty(STDERR_FILENO))
-        fprintf(stderr, "%s %s(%p) %s: %s%s\n", color, QAPP_NAME, qApp, 
typestr, msg, COLOR_RESET);
+        fprintf(stderr, "%s %s(%p) %s: %s%s\n", color, QAPP_NAME, 
static_cast<void *>(qApp), typestr, msg, COLOR_RESET);
     else
-        fprintf(stderr, "%s(%p) %s: %s\n", QAPP_NAME, qApp, typestr, msg);
+        fprintf(stderr, "%s(%p) %s: %s\n", QAPP_NAME, static_cast<void 
*>(qApp), typestr, msg);
 
     FILE *f = fopen(dir.absoluteFilePath("debug.log").toUtf8().constData(), 
"a+");
-    fprintf(f, "%s %s(%p) %s: %s\n", dt.constData(), QAPP_NAME, qApp, typestr, 
msg);
+    fprintf(f, "%s %s(%p) %s: %s\n", dt.constData(), QAPP_NAME, 
static_cast<void *>(qApp), typestr, msg);
     fclose(f);
 
     if (type == QtFatalMsg)
@@ -102,7 +103,7 @@
 #ifdef DEBUG
     qInstallMessageHandler(dbgMessageOutput);
 #else
-    if (!qgetenv("LXQT_DEBUG").isNull())
+    if (!qEnvironmentVariableIsSet("LXQT_DEBUG"))
         qInstallMessageHandler(dbgMessageOutput);
 #endif
 
@@ -128,7 +129,7 @@
 
 void Application::updateTheme()
 {
-    QString styleSheetKey = QFileInfo(applicationFilePath()).fileName();
+    const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName();
     setStyleSheet(lxqtTheme.qss(styleSheetKey));
     emit themeChanged();
 }
@@ -140,14 +141,14 @@
     public:
         static void signalHandler(int signo)
         {
-            int ret = write(instance->mSignalSock[0], &signo, sizeof (int));
+            const int ret = write(instance->mSignalSock[0], &signo, sizeof 
(int));
             if (sizeof (int) != ret)
                 qCritical() << QStringLiteral("unable to write into 
socketpair, %1").arg(strerror(errno));
         } 
 
     public:
         template <class Lambda>
-        SignalHandler(Lambda signalEmitter)
+        SignalHandler(Application * app, Lambda signalEmitter)
             : mSignalSock{-1, -1}
         {
             if (0 != socketpair(AF_UNIX, SOCK_STREAM, 0, mSignalSock))
@@ -157,7 +158,7 @@
             }
 
             mNotifier.reset(new QSocketNotifier(mSignalSock[1], 
QSocketNotifier::Read));
-            QObject::connect(mNotifier.data(), &QSocketNotifier::activated, 
[this, signalEmitter] {
+            QObject::connect(mNotifier.data(), &QSocketNotifier::activated, 
app, [this, signalEmitter] {
                 int signo = 0;
                 int ret = read(mSignalSock[1], &signo, sizeof (int));
                 if (sizeof (int) != ret)
@@ -198,6 +199,6 @@
     static QScopedPointer<QSocketNotifier> signal_notifier;
 
     if (SignalHandler::instance.isNull())
-        SignalHandler::instance.reset(new SignalHandler{[this] (int signo) { 
emit unixSignal(signo); }});
+        SignalHandler::instance.reset(new SignalHandler{this, [this] (int 
signo) { emit unixSignal(signo); }});
     SignalHandler::instance->listenToSignals(signoList);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtautostartentry.cpp 
new/liblxqt-0.12.0/lxqtautostartentry.cpp
--- old/liblxqt-0.11.1/lxqtautostartentry.cpp   2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtautostartentry.cpp   2017-10-21 20:53:19.000000000 
+0200
@@ -38,9 +38,10 @@
 AutostartEntry::AutostartEntry(const QString& name):
     mLocalState(StateNone), mSystem(false)
 {
-    foreach (const QString& dir, XdgDirs::autostartDirs())
+    const QStringList& dirs = XdgDirs::autostartDirs();
+    foreach (const QString& dir, dirs)
     {
-        QString path = QString("%1/%2").arg(dir, name);
+        const QString path = QString("%1/%2").arg(dir, name);
         if (QFile(path).exists())
         {
             mSystemFile.load(path);
@@ -49,7 +50,7 @@
         }
     }
 
-    QString path = QString("%1/%2").arg(XdgDirs::autostartHome(), name);
+    const QString path = QString("%1/%2").arg(XdgDirs::autostartHome(), name);
     if (QFile(path).exists())
     {
         mLocalFile.load(path);
@@ -59,7 +60,7 @@
 
 void AutostartEntry::setFile(const XdgDesktopFile& file)
 {
-    bool local = isLocal();
+    const bool local = isLocal();
     if (mSystem && local && file == mSystemFile)
     {
         removeLocal();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtgridlayout.cpp 
new/liblxqt-0.12.0/lxqtgridlayout.cpp
--- old/liblxqt-0.11.1/lxqtgridlayout.cpp       2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtgridlayout.cpp       2017-10-21 20:53:19.000000000 
+0200
@@ -131,7 +131,8 @@
     mCellMaxSize = QSize(0, 0);
     mVisibleCount = 0;
 
-    for (int i=0; i<mItems.count(); ++i)
+    const int N = mItems.count();
+    for (int i=0; i < N; ++i)
     {
         QLayoutItem *item = mItems.at(i);
         if (!item->widget() || item->widget()->isHidden())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqthtmldelegate.cpp 
new/liblxqt-0.12.0/lxqthtmldelegate.cpp
--- old/liblxqt-0.11.1/lxqthtmldelegate.cpp     2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqthtmldelegate.cpp     2017-10-21 20:53:19.000000000 
+0200
@@ -65,7 +65,7 @@
     options.icon = QIcon();
 
     // icon size
-    QSize iconSize = icon.actualSize(mIconSize);
+    const QSize iconSize = icon.actualSize(mIconSize);
     QRect iconRect = QRect(8, 8, iconSize.width(), iconSize.height());
     if (is_right_to_left)
     {
@@ -86,7 +86,7 @@
         // shift text right to make icon visible
         painter->translate(iconRect.right() + 8, 0);
     }
-    QRect clip(0, 0, options.rect.width() - iconRect.width() - 8, 
options.rect.height());
+    const QRect clip(0, 0, options.rect.width() - iconRect.width() - 8, 
options.rect.height());
     painter->setClipRect(clip);
 
     // set text color to red for selected item
@@ -112,11 +112,16 @@
     QStyleOptionViewItem options = option;
     initStyleOption(&options, index);
 
-    QSize iconSize = options.icon.actualSize(mIconSize);
-    QRect iconRect = QRect(8, 8, iconSize.width(), iconSize.height());
+    const QSize iconSize = options.icon.actualSize(mIconSize);
+    const QRect iconRect = QRect(8, 8, iconSize.width(), iconSize.height());
+    const QSize optSize = options.rect.size();
 
     QTextDocument doc;
     doc.setHtml(options.text);
-    doc.setTextWidth(options.rect.width() - iconRect.right() - 8);
-    return QSize(options.rect.width(), doc.size().height() + 8);
+
+    if (optSize.width() > 0)
+        doc.setTextWidth(optSize.width() - iconRect.right() - 8);
+    doc.adjustSize();
+    return QSize(0 < optSize.width() ? optSize.width() : iconRect.width() + 8 
+ qRound(doc.size().width())
+            , qMax(qRound(doc.size().height()), iconSize.height()) + 8);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtnotification.cpp 
new/liblxqt-0.12.0/lxqtnotification.cpp
--- old/liblxqt-0.11.1/lxqtnotification.cpp     2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtnotification.cpp     2017-10-21 20:53:19.000000000 
+0200
@@ -158,7 +158,8 @@
 {
     mActions.clear();
     mDefaultAction = defaultAction;
-    for (int ix = 0; ix < actions.size(); ix++)
+    const int N = actions.size();
+    for (int ix = 0; ix < N; ix++)
     {
         if (ix == defaultAction)
             mActions.append("default");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtplugininfo.cpp 
new/liblxqt-0.12.0/lxqtplugininfo.cpp
--- old/liblxqt-0.11.1/lxqtplugininfo.cpp       2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtplugininfo.cpp       2017-10-21 20:53:19.000000000 
+0200
@@ -72,12 +72,11 @@
  ************************************************/
 QLibrary* PluginInfo::loadLibrary(const QString& libDir) const
 {
-    QString baseName, path;
-    QFileInfo fi = QFileInfo(fileName());
-    path = fi.canonicalPath();
-    baseName = value("X-LXQt-Library", fi.completeBaseName()).toString();
+    const QFileInfo fi = QFileInfo(fileName());
+    const QString path = fi.canonicalPath();
+    const QString baseName = value("X-LXQt-Library", 
fi.completeBaseName()).toString();
 
-    QString soPath = QDir(libDir).filePath(QString("lib%2.so").arg(baseName));
+    const QString soPath = 
QDir(libDir).filePath(QString("lib%2.so").arg(baseName));
     QLibrary* library = new QLibrary(soPath);
 
     if (!library->load())
@@ -87,7 +86,7 @@
         return 0;
     }
 
-    QString locale = QLocale::system().name();
+    const QString locale = QLocale::system().name();
     QTranslator* translator = new QTranslator(library);
 
     translator->load(QString("%1/%2/%2_%3.qm").arg(path, baseName, locale));
@@ -107,8 +106,8 @@
 
     foreach (const QString &desktopFilesDir, desktopFilesDirs)
     {
-        QDir dir(desktopFilesDir);
-        QFileInfoList files = dir.entryInfoList(QStringList(nameFilter), 
QDir::Files | QDir::Readable);
+        const QDir dir(desktopFilesDir);
+        const QFileInfoList files = dir.entryInfoList(QStringList(nameFilter), 
QDir::Files | QDir::Readable);
         foreach (const QFileInfo &file, files)
         {
             if (processed.contains(file.fileName()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtpower/lxqtpower.cpp 
new/liblxqt-0.12.0/lxqtpower/lxqtpower.cpp
--- old/liblxqt-0.11.1/lxqtpower/lxqtpower.cpp  2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtpower/lxqtpower.cpp  2017-10-21 20:53:19.000000000 
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtpower/lxqtpower.h 
new/liblxqt-0.12.0/lxqtpower/lxqtpower.h
--- old/liblxqt-0.11.1/lxqtpower/lxqtpower.h    2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtpower/lxqtpower.h    2017-10-21 20:53:19.000000000 
+0200
@@ -56,8 +56,16 @@
         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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtpower/lxqtpowerproviders.cpp 
new/liblxqt-0.12.0/lxqtpower/lxqtpowerproviders.cpp
--- old/liblxqt-0.11.1/lxqtpower/lxqtpowerproviders.cpp 2017-01-01 
22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/lxqtpower/lxqtpowerproviders.cpp 2017-10-21 
20:53:19.000000000 +0200
@@ -107,8 +107,8 @@
 
     // If the method no returns value, we believe that it was successful.
     return msg.arguments().isEmpty() ||
-           msg.arguments().first().isNull() ||
-           msg.arguments().first().toBool();
+           msg.arguments().constFirst().isNull() ||
+           msg.arguments().constFirst().toBool();
 }
 
 /************************************************
@@ -156,10 +156,10 @@
     }
 
     // If the method no returns value, we believe that it was successful.
-    if (msg.arguments().isEmpty() || msg.arguments().first().isNull())
+    if (msg.arguments().isEmpty() || msg.arguments().constFirst().isNull())
         return true;
 
-    QString response = msg.arguments().first().toString();
+    QString response = msg.arguments().constFirst().toString();
     qDebug() << "systemd:" << method << "=" << response;
     return response == "yes" || response == "challenge";
 }
@@ -199,7 +199,7 @@
     }
 
     return !msg.arguments().isEmpty() &&
-            msg.arguments().first().value<QDBusVariant>().variant().toBool();
+            
msg.arguments().constFirst().value<QDBusVariant>().variant().toBool();
 }
 
 
@@ -500,31 +500,45 @@
 
 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,
@@ -594,12 +608,14 @@
 
 bool HalProvider::canAction(Power::Action action) const
 {
+    Q_UNUSED(action)
     return false;
 }
 
 
 bool HalProvider::doAction(Power::Action action)
 {
+    Q_UNUSED(action)
     return false;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtpowermanager.cpp 
new/liblxqt-0.12.0/lxqtpowermanager.cpp
--- old/liblxqt-0.11.1/lxqtpowermanager.cpp     2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtpowermanager.cpp     2017-10-21 20:53:19.000000000 
+0200
@@ -41,14 +41,14 @@
 
 class LXQT_API MessageBox: public QMessageBox
 {
-    Q_DECLARE_TR_FUNCTIONS(LXQt::MessageBox);
+    Q_DECLARE_TR_FUNCTIONS(LXQt::MessageBox)
 
 public:
     explicit MessageBox(QWidget *parent = 0): QMessageBox(parent) {}
 
     static QWidget *parentWidget()
     {
-        QWidgetList widgets = QApplication::topLevelWidgets();
+        const QWidgetList widgets = QApplication::topLevelWidgets();
 
         if (widgets.count())
             return widgets.at(0);
@@ -69,6 +69,8 @@
 
     static void warning(const QString& title, const QString& text)
     {
+        Q_UNUSED(title)
+        Q_UNUSED(text)
         QMessageBox::warning(parentWidget(), tr("LXQt Power Manager Error"), 
tr("Hibernate failed."));
     }
 
@@ -76,7 +78,8 @@
 protected:
     virtual void resizeEvent(QResizeEvent* event)
     {
-        QRect screen = QApplication::desktop()->screenGeometry();
+        Q_UNUSED(event)
+        const QRect screen = QApplication::desktop()->screenGeometry();
         move((screen.width()  - this->width()) / 2,
              (screen.height() - this->height()) / 2);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtprogramfinder.cpp 
new/liblxqt-0.12.0/lxqtprogramfinder.cpp
--- old/liblxqt-0.11.1/lxqtprogramfinder.cpp    2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtprogramfinder.cpp    2017-10-21 20:53:19.000000000 
+0200
@@ -31,17 +31,17 @@
 
 LXQT_API bool ProgramFinder::programExists(const QString& command)
 {
-    QString program = programName(command);
+    const QString program = programName(command);
     if (program[0] == QChar('/'))
     {
         QFileInfo fi(program);
         return fi.isExecutable() && fi.isFile();
     }
 
-    QString path = qgetenv("PATH");
+    const QString path = qgetenv("PATH");
     foreach (const QString& dirName, path.split(":", QString::SkipEmptyParts))
     {
-        QFileInfo fi(QDir(dirName), program);
+        const QFileInfo fi(QDir(dirName), program);
         if (fi.isExecutable() && fi.isFile())
             return true;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtrotatedwidget.cpp 
new/liblxqt-0.12.0/lxqtrotatedwidget.cpp
--- old/liblxqt-0.11.1/lxqtrotatedwidget.cpp    2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtrotatedwidget.cpp    2017-10-21 20:53:19.000000000 
+0200
@@ -90,7 +90,7 @@
 {
     mContent->adjustSize();
 
-    QSize before = size();
+    const QSize before = size();
 
     adjustSize();
 
@@ -147,7 +147,7 @@
     if (mOrigin == Qt::TopLeftCorner)
         return;
 
-    QSize sz = mContent->size();
+    const QSize sz = mContent->size();
 
     QPainter painter(this);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtscreensaver.cpp 
new/liblxqt-0.12.0/lxqtscreensaver.cpp
--- old/liblxqt-0.11.1/lxqtscreensaver.cpp      2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtscreensaver.cpp      2017-10-21 20:53:19.000000000 
+0200
@@ -124,7 +124,7 @@
 
 class ScreenSaverPrivate
 {
-    Q_DECLARE_TR_FUNCTIONS(LXQt::ScreenSaver);
+    Q_DECLARE_TR_FUNCTIONS(LXQt::ScreenSaver)
     Q_DECLARE_PUBLIC(ScreenSaver)
     ScreenSaver* const q_ptr;
 
@@ -141,6 +141,7 @@
 {
     // 
http://portland.freedesktop.org/xdg-utils-1.1.0-rc1/scripts/xdg-screensaver
 
+    Q_UNUSED(status)
     Q_Q(ScreenSaver);
     if (err == 0)
         emit q->activated();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtsettings.cpp 
new/liblxqt-0.12.0/lxqtsettings.cpp
--- old/liblxqt-0.11.1/lxqtsettings.cpp 2017-01-01 22:49:10.000000000 +0100
+++ new/liblxqt-0.12.0/lxqtsettings.cpp 2017-10-21 20:53:19.000000000 +0200
@@ -80,7 +80,8 @@
                     if (dir.cd(mParent->organizationName()) && 
dir.exists(file_name))
                     {
                         QSettings 
system_settings{dir.absoluteFilePath(file_name), QSettings::IniFormat};
-                        for (const QString & key : system_settings.allKeys())
+                        const QStringList keys = system_settings.allKeys();
+                        for (const QString & key : keys)
                         {
                             mParent->setValue(key, system_settings.value(key));
                         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqtsingleapplication.h 
new/liblxqt-0.12.0/lxqtsingleapplication.h
--- old/liblxqt-0.11.1/lxqtsingleapplication.h  2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqtsingleapplication.h  2017-10-21 20:53:19.000000000 
+0200
@@ -77,7 +77,6 @@
 
 class LXQT_API SingleApplication : public Application {
     Q_OBJECT
-    Q_ENUMS(StartOptions)
 
 public:
     /*!
@@ -101,6 +100,7 @@
         /** Don't exit if the connection to the D-Bus session bus fails.*/
         NoExitOnDBusFailure
     };
+    Q_ENUM(StartOptions)
 
     /*!
      * \brief Construct a LXQt SingleApplication object.
@@ -153,6 +153,6 @@
 #endif
 #define lxqtSingleApp (static_cast<LXQt::SingleApplication *>(qApp))
 
-}; // namespace LXQt
+} // namespace LXQt
 
 #endif // LXQTSINGLEAPPLICATION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/liblxqt-0.11.1/lxqttranslator.cpp 
new/liblxqt-0.12.0/lxqttranslator.cpp
--- old/liblxqt-0.11.1/lxqttranslator.cpp       2017-01-01 22:49:10.000000000 
+0100
+++ new/liblxqt-0.12.0/lxqttranslator.cpp       2017-10-21 20:53:19.000000000 
+0200
@@ -51,8 +51,8 @@
     if (searchPath == 0)
     {
         searchPath = new QStringList();
-        *searchPath << QString(LXQT_SHARE_TRANSLATIONS_DIR);
         *searchPath << XdgDirs::dataDirs(QLatin1Char('/') % 
LXQT_RELATIVE_SHARE_TRANSLATIONS_DIR);
+        *searchPath << QString(LXQT_SHARE_TRANSLATIONS_DIR);
         searchPath->removeDuplicates();
     }
 
@@ -85,7 +85,7 @@
  ************************************************/
 bool translate(const QString &name, const QString &owner)
 {
-    QString locale = QLocale::system().name();
+    const QString locale = QLocale::system().name();
     QTranslator *appTranslator = new QTranslator(qApp);
 
     QStringList *paths = getSearchPaths();
@@ -132,7 +132,7 @@
  ************************************************/
 bool Translator::translateApplication(const QString &applicationName)
 {
-    QString locale = QLocale::system().name();
+    const QString locale = QLocale::system().name();
     QTranslator *qtTranslator = new QTranslator(qApp);
 
     if (qtTranslator->load("qt_" + locale, 
QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
@@ -170,7 +170,7 @@
 {
     static QSet<QString> loadedPlugins;
 
-    QString fullName = type % QChar('/') % pluginName;
+    const QString fullName = type % QChar('/') % pluginName;
     if (loadedPlugins.contains(fullName))
         return true;
 



Reply via email to