From 2c24520f8a39abbc6c38cb2b5d43059595b505ab Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sun, 22 Oct 2017 14:28:57 +0200 Subject: [PATCH 1/3] Cherry-picking upstream version 0.12.0. * Switched to experimental * Bumped Standards to 4.1.1 * Bumped dependencies * Fixed symbols * Added override for dh_missing in rules --- AUTHORS | 2 +- CHANGELOG | 25 +++++++++- CMakeLists.txt | 24 +++++++-- cmake/lxqt-config.cmake.in | 12 +++++ configdialog/lxqtconfigdialog.cpp | 1 + debian/changelog | 11 +++++ debian/control | 12 ++--- debian/liblxqt0.symbols | 81 ++++++++++++++++--------------- debian/rules | 6 ++- lxqtapplication.cpp | 19 ++++---- lxqtautostartentry.cpp | 9 ++-- lxqtgridlayout.cpp | 3 +- lxqthtmldelegate.cpp | 17 ++++--- lxqtnotification.cpp | 3 +- lxqtplugininfo.cpp | 15 +++--- lxqtpower/lxqtpower.cpp | 10 +++- lxqtpower/lxqtpower.h | 12 ++++- lxqtpower/lxqtpowerproviders.cpp | 48 ++++++++++++------ lxqtpowermanager.cpp | 9 ++-- lxqtprogramfinder.cpp | 6 +-- lxqtrotatedwidget.cpp | 4 +- lxqtscreensaver.cpp | 3 +- lxqtsettings.cpp | 3 +- lxqtsingleapplication.h | 4 +- lxqttranslator.cpp | 8 +-- 25 files changed, 228 insertions(+), 119 deletions(-) diff --git a/AUTHORS b/AUTHORS index fbb968f..5fec64d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,7 +4,7 @@ Upstream Authors: 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 --git a/CHANGELOG b/CHANGELOG index c825c8a..a2e87a6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/CMakeLists.txt b/CMakeLists.txt index d421319..44eddc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,25 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) 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(X11 REQUIRED QUIET) 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 --git a/cmake/lxqt-config.cmake.in b/cmake/lxqt-config.cmake.in index 227d789..5cb6dc5 100644 --- a/cmake/lxqt-config.cmake.in +++ b/cmake/lxqt-config.cmake.in @@ -17,6 +17,18 @@ find_dependency(KF5WindowSystem) 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 --git a/configdialog/lxqtconfigdialog.cpp b/configdialog/lxqtconfigdialog.cpp index 8eea57b..947a578 100644 --- a/configdialog/lxqtconfigdialog.cpp +++ b/configdialog/lxqtconfigdialog.cpp @@ -112,6 +112,7 @@ bool ConfigDialog::event(QEvent * event) void ConfigDialog::closeEvent(QCloseEvent* event) { + Q_UNUSED(event) emit save(); mSettings->sync(); } diff --git a/debian/changelog b/debian/changelog index a52feee..b761afd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +liblxqt (0.12.0-1) experimental; urgency=medium + + * Cherry-picking upstream version 0.12.0. + * Switched to experimental + * Bumped Standards to 4.1.1 + * Bumped dependencies + * Fixed symbols + * Added override for dh_missing in rules + + -- Alf Gaida Sun, 22 Oct 2017 14:28:46 +0200 + liblxqt (0.11.1-2) unstable; urgency=medium * Bumped Standards to 4.0.0 diff --git a/debian/control b/debian/control index 2783a70..df78005 100644 --- a/debian/control +++ b/debian/control @@ -11,10 +11,10 @@ Build-Depends: debhelper (>= 10), libqt5x11extras5-dev, libx11-dev, libxss-dev, - lxqt-build-tools (>= 0.3.1) -Standards-Version: 4.0.0 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/liblxqt.git/?h=debian/sid -Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/liblxqt.git -b debian/sid + lxqt-build-tools (>= 0.4.0) +Standards-Version: 4.1.1 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/liblxqt.git/?h=debian/experimental +Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/liblxqt.git -b debian/experimental Homepage: https://github.com/lxde/liblxqt Package: liblxqt0 @@ -40,8 +40,8 @@ Architecture: any Section: libdevel Depends: ${misc:Depends}, liblxqt0 (= ${binary:Version}), - libqt5xdg-dev (>= 2.0.0), - libqt5xdgiconloader-dev (>= 2.0.0), + libqt5xdg-dev (>= 3.1.0), + libqt5xdgiconloader-dev (>= 3.1.0), lxqt-build-tools Description: Shared libraries for LXQt desktop environment (dev) LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt diff --git a/debian/liblxqt0.symbols b/debian/liblxqt0.symbols index 2bc73b6..4212047 100644 --- a/debian/liblxqt0.symbols +++ b/debian/liblxqt0.symbols @@ -1,6 +1,6 @@ liblxqt.so.0 liblxqt0 #MINVER# - (c++)"LXQt::Application::Application(int&, char**)@Base" 0.9.0+20150911 (c++)"LXQt::Application::Application(int&, char**, bool)@Base" 0.9.0+20150911 + (c++)"LXQt::Application::Application(int&, char**)@Base" 0.9.0+20150911 (c++)"LXQt::Application::listenToUnixSignals(QList const&)@Base" 0.9.0+20150911 (c++)"LXQt::Application::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::Application::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 @@ -18,12 +18,12 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::AutostartEntry::removeLocal()@Base" 0.9.0+20150911 (c++)"LXQt::AutostartEntry::setEnabled(bool)@Base" 0.9.0+20150911 (c++)"LXQt::AutostartEntry::setFile(XdgDesktopFile const&)@Base" 0.9.0+20150911 + (c++)"LXQt::ConfigDialog::~ConfigDialog()@Base" 0.9.0+20150911 + (c++)"LXQt::ConfigDialog::ConfigDialog(QString const&, LXQt::Settings*, QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::addPage(QWidget*, QString const&, QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::addPage(QWidget*, QString const&, QStringList const&)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::clicked(QDialogButtonBox::StandardButton)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::closeEvent(QCloseEvent*)@Base" 0.9.0+20150911 - (c++)"LXQt::ConfigDialog::~ConfigDialog()@Base" 0.9.0+20150911 - (c++)"LXQt::ConfigDialog::ConfigDialog(QString const&, LXQt::Settings*, QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::dialogButtonsAction(QAbstractButton*)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::event(QEvent*)@Base" 0.11.0 (c++)"LXQt::ConfigDialog::metaObject() const@Base" 0.9.0+20150911 @@ -35,6 +35,8 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::ConfigDialog::showPage(QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::ConfigDialog::updateIcons()@Base" 0.9.0+20150911 + (c++)"LXQt::GridLayout::~GridLayout()@Base" 0.9.0+20150911 + (c++)"LXQt::GridLayout::GridLayout(QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::addItem(QLayoutItem*)@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::animatedMoveInProgress() const@Base" 0.11.0 (c++)"LXQt::GridLayout::cellMaximumSize() const@Base" 0.9.0+20150911 @@ -42,8 +44,6 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::GridLayout::columnCount() const@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::count() const@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::direction() const@Base" 0.9.0+20150911 - (c++)"LXQt::GridLayout::~GridLayout()@Base" 0.9.0+20150911 - (c++)"LXQt::GridLayout::GridLayout(QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::invalidate()@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::itemAt(int) const@Base" 0.9.0+20150911 (c++)"LXQt::GridLayout::metaObject() const@Base" 0.9.0+20150911 @@ -78,28 +78,28 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::HtmlDelegate::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::HtmlDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const@Base" 0.9.0+20150911 (c++)"LXQt::HtmlDelegate::staticMetaObject@Base" 0.9.0+20150911 + (c++)"LXQt::LXQtTheme::~LXQtTheme()@Base" 0.12.0 + (c++)"LXQt::LXQtTheme::LXQtTheme()@Base" 0.9.0+20150911 + (c++)"LXQt::LXQtTheme::LXQtTheme(LXQt::LXQtTheme const&)@Base" 0.9.0+20150911 + (c++)"LXQt::LXQtTheme::LXQtTheme(QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::allThemes()@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::currentTheme()@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::desktopBackground(int) const@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::isValid() const@Base" 0.9.0+20150911 - (c++)"LXQt::LXQtTheme::~LXQtTheme()@Base" 0.9.0+20150911 - (c++)"LXQt::LXQtTheme::LXQtTheme()@Base" 0.9.0+20150911 - (c++)"LXQt::LXQtTheme::LXQtTheme(LXQt::LXQtTheme const&)@Base" 0.9.0+20150911 - (c++)"LXQt::LXQtTheme::LXQtTheme(QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::mInstance@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::name() const@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::operator=(LXQt::LXQtTheme const&)@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::path() const@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::previewImage() const@Base" 0.9.0+20150911 (c++)"LXQt::LXQtTheme::qss(QString const&) const@Base" 0.9.0+20150911 + (c++)"LXQt::Notification::~Notification()@Base" 0.9.0+20150911 + (c++)"LXQt::Notification::Notification(QString const&, QObject*)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::actionActivated(int)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::clearHints()@Base" 0.9.0+20150911 (c++)"LXQt::Notification::close()@Base" 0.9.0+20150911 (c++)"LXQt::Notification::getCapabilities()@Base" 0.9.0+20150911 (c++)"LXQt::Notification::metaObject() const@Base" 0.9.0+20150911 - (c++)"LXQt::Notification::~Notification()@Base" 0.9.0+20150911 (c++)"LXQt::Notification::notificationClosed(LXQt::Notification::CloseReason)@Base" 0.9.0+20150911 - (c++)"LXQt::Notification::Notification(QString const&, QObject*)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::notify(QString const&, QString const&, QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::qt_metacast(char const*)@Base" 0.9.0+20150911 @@ -113,39 +113,30 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::Notification::setUrgencyHint(LXQt::Notification::Urgency)@Base" 0.9.0+20150911 (c++)"LXQt::Notification::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::Notification::update()@Base" 0.9.0+20150911 + (c++)"LXQt::PageSelectWidget::~PageSelectWidget()@Base" 0.9.0+20150911 + (c++)"LXQt::PageSelectWidget::PageSelectWidget(QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::event(QEvent*)@Base" 0.11.0 (c++)"LXQt::PageSelectWidget::maxTextWidth() const@Base" 0.11.0 (c++)"LXQt::PageSelectWidget::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::minimumSizeHint() const@Base" 0.11.0 - (c++)"LXQt::PageSelectWidget::~PageSelectWidget()@Base" 0.9.0+20150911 - (c++)"LXQt::PageSelectWidget::PageSelectWidget(QWidget*)@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::PageSelectWidget::updateMaxTextWidth()@Base" 0.11.0 (c++)"LXQt::PageSelectWidget::viewportSizeHint() const@Base" 0.11.0 + (c++)"LXQt::PluginInfo::PluginInfo()@Base" 0.9.0+20150911 (c++)"LXQt::PluginInfo::isValid() const@Base" 0.9.0+20150911 (c++)"LXQt::PluginInfo::loadLibrary(QString const&) const@Base" 0.9.0+20150911 (c++)"LXQt::PluginInfo::load(QString const&)@Base" 0.9.0+20150911 - (c++)"LXQt::PluginInfo::PluginInfo()@Base" 0.9.0+20150911 (c++)"LXQt::PluginInfo::search(QString const&, QString const&, QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::PluginInfo::search(QStringList const&, QString const&, QString const&)@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canAction(LXQt::Power::Action) const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canHibernate() const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canLogout() const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canReboot() const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canShutdown() const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::canSuspend() const@Base" 0.9.0+20150911 - (c++)"LXQt::Power::doAction(LXQt::Power::Action)@Base" 0.9.0+20150911 - (c++)"LXQt::Power::hibernate()@Base" 0.9.0+20150911 - (c++)"LXQt::Power::logout()@Base" 0.9.0+20150911 + (c++)"LXQt::PowerManager::~PowerManager()@Base" 0.9.0+20150911 + (c++)"LXQt::PowerManager::PowerManager(QObject*, bool)@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::availableActions()@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::hibernate()@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::hibernateFailed()@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::logout()@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::metaObject() const@Base" 0.9.0+20150911 - (c++)"LXQt::PowerManager::~PowerManager()@Base" 0.9.0+20150911 - (c++)"LXQt::PowerManager::PowerManager(QObject*, bool)@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::reboot()@Base" 0.9.0+20150911 @@ -153,9 +144,19 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::PowerManager::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::suspend()@Base" 0.9.0+20150911 (c++)"LXQt::PowerManager::suspendFailed()@Base" 0.9.0+20150911 - (c++)"LXQt::Power::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::Power::~Power()@Base" 0.9.0+20150911 (c++)"LXQt::Power::Power(QObject*)@Base" 0.9.0+20150911 + (c++)"LXQt::Power::Power(bool, QObject*)@Base" 0.11.2~ + (c++)"LXQt::Power::canAction(LXQt::Power::Action) const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::canHibernate() const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::canLogout() const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::canReboot() const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::canShutdown() const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::canSuspend() const@Base" 0.9.0+20150911 + (c++)"LXQt::Power::doAction(LXQt::Power::Action)@Base" 0.9.0+20150911 + (c++)"LXQt::Power::hibernate()@Base" 0.9.0+20150911 + (c++)"LXQt::Power::logout()@Base" 0.9.0+20150911 + (c++)"LXQt::Power::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::Power::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::Power::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::Power::reboot()@Base" 0.9.0+20150911 @@ -165,6 +166,7 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::ProgramFinder::findPrograms(QStringList const&)@Base" 0.9.0+20150911 (c++)"LXQt::ProgramFinder::programExists(QString const&)@Base" 0.9.0+20150911 (c++)"LXQt::ProgramFinder::programName(QString const&)@Base" 0.9.0+20150911 + (c++)"LXQt::RotatedWidget::RotatedWidget(QWidget&, QWidget*, QFlags)@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::adjustContentSize()@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::adjustedPoint(QPoint) const@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::adjustedSize(QSize) const@Base" 0.9.0+20150911 @@ -182,11 +184,12 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::RotatedWidget::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::resizeEvent(QResizeEvent*)@Base" 0.9.0+20150911 - (c++)"LXQt::RotatedWidget::RotatedWidget(QWidget&, QWidget*, QFlags)@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::setOrigin(Qt::Corner)@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::sizeHint() const@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::RotatedWidget::wheelEvent(QWheelEvent*)@Base" 0.9.0+20150911 + (c++)"LXQt::ScreenSaver::~ScreenSaver()@Base" 0.11.0 + (c++)"LXQt::ScreenSaver::ScreenSaver(QObject*)@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::activated()@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::availableActions()@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::done()@Base" 0.9.0+20150911 @@ -194,14 +197,17 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::ScreenSaver::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::qt_metacast(char const*)@Base" 0.9.0+20150911 - (c++)"LXQt::ScreenSaver::~ScreenSaver()@Base" 0.11.0 - (c++)"LXQt::ScreenSaver::ScreenSaver(QObject*)@Base" 0.9.0+20150911 (c++)"LXQt::ScreenSaver::staticMetaObject@Base" 0.9.0+20150911 - (c++)"LXQt::Settings::addWatchedFile(QString const&)@Base" 0.10.0 + (c++)"LXQt::SettingsCache::SettingsCache(QSettings*)@Base" 0.9.0+20150911 + (c++)"LXQt::SettingsCache::SettingsCache(QSettings&)@Base" 0.12.0 (c++)"LXQt::SettingsCache::loadFromSettings()@Base" 0.9.0+20150911 (c++)"LXQt::SettingsCache::loadToSettings()@Base" 0.9.0+20150911 - (c++)"LXQt::SettingsCache::SettingsCache(QSettings*)@Base" 0.9.0+20150911 - (c++)"LXQt::SettingsCache::SettingsCache(QSettings&)@Base" 0.9.0+20150911 + (c++)"LXQt::Settings::~Settings()@Base" 0.9.0+20150911 + (c++)"LXQt::Settings::Settings(QSettings const*, QString const&, QObject*)@Base" 0.9.0+20150911 + (c++)"LXQt::Settings::Settings(QSettings const&, QString const&, QObject*)@Base" 0.12.0 + (c++)"LXQt::Settings::Settings(QString const&, QObject*)@Base" 0.9.0+20150911 + (c++)"LXQt::Settings::Settings(QString const&, QSettings::Format, QObject*)@Base" 0.9.0+20150911 + (c++)"LXQt::Settings::addWatchedFile(QString const&)@Base" 0.10.0 (c++)"LXQt::Settings::event(QEvent*)@Base" 0.9.0+20150911 (c++)"LXQt::Settings::fileChanged()@Base" 0.9.0+20150911 (c++)"LXQt::Settings::_fileChanged(QString)@Base" 0.9.0+20150911 @@ -211,23 +217,18 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"LXQt::Settings::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::Settings::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::Settings::setLocalizedValue(QString const&, QVariant const&)@Base" 0.9.0+20150911 - (c++)"LXQt::Settings::~Settings()@Base" 0.9.0+20150911 (c++)"LXQt::Settings::settingsChanged()@Base" 0.9.0+20150911 (c++)"LXQt::Settings::settingsChangedByApp()@Base" 0.10.0 (c++)"LXQt::Settings::settingsChangedFromExternal()@Base" 0.10.0 - (c++)"LXQt::Settings::Settings(QSettings const*, QString const&, QObject*)@Base" 0.9.0+20150911 - (c++)"LXQt::Settings::Settings(QSettings const&, QString const&, QObject*)@Base" 0.9.0+20150911 - (c++)"LXQt::Settings::Settings(QString const&, QObject*)@Base" 0.9.0+20150911 - (c++)"LXQt::Settings::Settings(QString const&, QSettings::Format, QObject*)@Base" 0.9.0+20150911 (c++)"LXQt::Settings::staticMetaObject@Base" 0.9.0+20150911 + (c++)"LXQt::SingleApplication::~SingleApplication()@Base" 0.9.0+20150911 + (c++)"LXQt::SingleApplication::SingleApplication(int&, char**, LXQt::SingleApplication::StartOptions)@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::activateWindow()@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::activationWindow() const@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::metaObject() const@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::qt_metacast(char const*)@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::setActivationWindow(QWidget*)@Base" 0.9.0+20150911 - (c++)"LXQt::SingleApplication::~SingleApplication()@Base" 0.9.0+20150911 - (c++)"LXQt::SingleApplication::SingleApplication(int&, char**, LXQt::SingleApplication::StartOptions)@Base" 0.9.0+20150911 (c++)"LXQt::SingleApplication::staticMetaObject@Base" 0.9.0+20150911 (c++)"LXQt::Translator::setTranslationSearchPaths(QStringList const&)@Base" 0.9.0+20150911 (c++)"LXQt::Translator::translateApplication(QString const&)@Base" 0.9.0+20150911 @@ -272,7 +273,7 @@ liblxqt.so.0 liblxqt0 #MINVER# (c++)"typeinfo name for LXQt::Settings@Base" 0.9.0+20150911 (c++)"typeinfo name for LXQt::SettingsCache@Base" 0.9.0+20150911 (c++)"typeinfo name for LXQt::SingleApplication@Base" 0.9.0+20150911 - (optional|c++)"void std::vector >::_M_emplace_back_aux(int&&)@Base" 0.11.0 + (c++)"void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, int&&)@Base" 0.12.0 (c++)"vtable for LXQt::Application@Base" 0.9.0+20150911 (c++)"vtable for LXQt::AutostartEntry@Base" 0.9.0+20150911 (c++)"vtable for LXQt::ConfigDialog@Base" 0.9.0+20150911 diff --git a/debian/rules b/debian/rules index 9f98619..5f6e202 100755 --- a/debian/rules +++ b/debian/rules @@ -6,8 +6,10 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: - dh ${@} --buildsystem cmake \ - --fail-missing + dh ${@} --buildsystem cmake + +override_dh_missing: + dh_missing --fail-missing override_dh_auto_configure: dh_auto_configure -- \ diff --git a/lxqtapplication.cpp b/lxqtapplication.cpp index 2c7c0a3..733db45 100644 --- a/lxqtapplication.cpp +++ b/lxqtapplication.cpp @@ -57,6 +57,7 @@ variable LXQT_DEBUG set */ 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 @@ void dbgMessageOutput(QtMsgType type, const QMessageLogContext &ctx, const QStri 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(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(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(qApp), typestr, msg); fclose(f); if (type == QtFatalMsg) @@ -102,7 +103,7 @@ Application::Application(int &argc, char** argv) #ifdef DEBUG qInstallMessageHandler(dbgMessageOutput); #else - if (!qgetenv("LXQT_DEBUG").isNull()) + if (!qEnvironmentVariableIsSet("LXQT_DEBUG")) qInstallMessageHandler(dbgMessageOutput); #endif @@ -128,7 +129,7 @@ Application::Application(int &argc, char** argv, bool handleQuitSignals) void Application::updateTheme() { - QString styleSheetKey = QFileInfo(applicationFilePath()).fileName(); + const QString styleSheetKey = QFileInfo(applicationFilePath()).fileName(); setStyleSheet(lxqtTheme.qss(styleSheetKey)); emit themeChanged(); } @@ -140,14 +141,14 @@ namespace 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 - SignalHandler(Lambda signalEmitter) + SignalHandler(Application * app, Lambda signalEmitter) : mSignalSock{-1, -1} { if (0 != socketpair(AF_UNIX, SOCK_STREAM, 0, mSignalSock)) @@ -157,7 +158,7 @@ namespace } 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 @@ void Application::listenToUnixSignals(QList const & signoList) static QScopedPointer 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 --git a/lxqtautostartentry.cpp b/lxqtautostartentry.cpp index f977a75..379f297 100644 --- a/lxqtautostartentry.cpp +++ b/lxqtautostartentry.cpp @@ -38,9 +38,10 @@ AutostartEntry::AutostartEntry() : 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 @@ AutostartEntry::AutostartEntry(const QString& name): } } - 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 @@ AutostartEntry::AutostartEntry(const QString& name): void AutostartEntry::setFile(const XdgDesktopFile& file) { - bool local = isLocal(); + const bool local = isLocal(); if (mSystem && local && file == mSystemFile) { removeLocal(); diff --git a/lxqtgridlayout.cpp b/lxqtgridlayout.cpp index 94861fc..739178e 100644 --- a/lxqtgridlayout.cpp +++ b/lxqtgridlayout.cpp @@ -131,7 +131,8 @@ void GridLayoutPrivate::updateCache() mCellMaxSize = QSize(0, 0); mVisibleCount = 0; - for (int i=0; iwidget() || item->widget()->isHidden()) diff --git a/lxqthtmldelegate.cpp b/lxqthtmldelegate.cpp index 5f1c694..9a5e7bf 100644 --- a/lxqthtmldelegate.cpp +++ b/lxqthtmldelegate.cpp @@ -65,7 +65,7 @@ void HtmlDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, 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 @@ void HtmlDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, // 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 @@ QSize HtmlDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelInd 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 --git a/lxqtnotification.cpp b/lxqtnotification.cpp index d26f25f..1dc3935 100644 --- a/lxqtnotification.cpp +++ b/lxqtnotification.cpp @@ -158,7 +158,8 @@ void NotificationPrivate::setActions(QStringList actions, int defaultAction) { 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 --git a/lxqtplugininfo.cpp b/lxqtplugininfo.cpp index 1f3ed78..c02888a 100644 --- a/lxqtplugininfo.cpp +++ b/lxqtplugininfo.cpp @@ -72,12 +72,11 @@ bool PluginInfo::isValid() const ************************************************/ 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 @@ QLibrary* PluginInfo::loadLibrary(const QString& libDir) const 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 @@ PluginInfoList PluginInfo::search(const QStringList& desktopFilesDirs, const QSt 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 --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 @@ public: 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 5379281..3907cc7 100644 --- a/lxqtpower/lxqtpowerproviders.cpp +++ b/lxqtpower/lxqtpowerproviders.cpp @@ -107,8 +107,8 @@ static bool dbusCall(const QString &service, // 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 @@ static bool dbusCallSystemd(const QString &service, } // 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 @@ bool dbusGetProperty(const QString &service, } return !msg.arguments().isEmpty() && - msg.arguments().first().value().variant().toBool(); + msg.arguments().constFirst().value().variant().toBool(); } @@ -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, @@ -594,12 +608,14 @@ HalProvider::~HalProvider() bool HalProvider::canAction(Power::Action action) const { + Q_UNUSED(action) return false; } bool HalProvider::doAction(Power::Action action) { + Q_UNUSED(action) return false; } diff --git a/lxqtpowermanager.cpp b/lxqtpowermanager.cpp index 4f14ff7..0258c64 100644 --- a/lxqtpowermanager.cpp +++ b/lxqtpowermanager.cpp @@ -41,14 +41,14 @@ namespace LXQt { 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 @@ public: 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 @@ public: 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 --git a/lxqtprogramfinder.cpp b/lxqtprogramfinder.cpp index 2d8f53c..0465aa3 100644 --- a/lxqtprogramfinder.cpp +++ b/lxqtprogramfinder.cpp @@ -31,17 +31,17 @@ using namespace LXQt; 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 --git a/lxqtrotatedwidget.cpp b/lxqtrotatedwidget.cpp index ec6f284..384eb84 100644 --- a/lxqtrotatedwidget.cpp +++ b/lxqtrotatedwidget.cpp @@ -90,7 +90,7 @@ void RotatedWidget::adjustContentSize() { mContent->adjustSize(); - QSize before = size(); + const QSize before = size(); adjustSize(); @@ -147,7 +147,7 @@ void RotatedWidget::paintEvent(QPaintEvent */*event*/) if (mOrigin == Qt::TopLeftCorner) return; - QSize sz = mContent->size(); + const QSize sz = mContent->size(); QPainter painter(this); diff --git a/lxqtscreensaver.cpp b/lxqtscreensaver.cpp index c38e46b..3907578 100644 --- a/lxqtscreensaver.cpp +++ b/lxqtscreensaver.cpp @@ -124,7 +124,7 @@ static bool GetIntArrayProperty(XID window, 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 @@ void ScreenSaverPrivate::_l_xdgProcess_finished(int err, QProcess::ExitStatus st { // 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 --git a/lxqtsettings.cpp b/lxqtsettings.cpp index b3d6989..7ef3506 100644 --- a/lxqtsettings.cpp +++ b/lxqtsettings.cpp @@ -80,7 +80,8 @@ public: 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 --git a/lxqtsingleapplication.h b/lxqtsingleapplication.h index cc37a50..7ae80ee 100644 --- a/lxqtsingleapplication.h +++ b/lxqtsingleapplication.h @@ -77,7 +77,6 @@ namespace LXQt { class LXQT_API SingleApplication : public Application { Q_OBJECT - Q_ENUMS(StartOptions) public: /*! @@ -101,6 +100,7 @@ public: /** 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 @@ private: #endif #define lxqtSingleApp (static_cast(qApp)) -}; // namespace LXQt +} // namespace LXQt #endif // LXQTSINGLEAPPLICATION_H diff --git a/lxqttranslator.cpp b/lxqttranslator.cpp index 4fc67c0..d022874 100644 --- a/lxqttranslator.cpp +++ b/lxqttranslator.cpp @@ -51,8 +51,8 @@ QStringList *getSearchPaths() 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 @@ void Translator::setTranslationSearchPaths(const QStringList &paths) ************************************************/ 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 translate(const QString &name, const QString &owner) ************************************************/ 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 @@ bool Translator::translatePlugin(const QString &pluginName, const QString& type) { static QSet loadedPlugins; - QString fullName = type % QChar('/') % pluginName; + const QString fullName = type % QChar('/') % pluginName; if (loadedPlugins.contains(fullName)) return true; From 59db1cc17a41a6926d17d161f23825e82d7f0e45 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sun, 22 Oct 2017 17:28:31 +0200 Subject: [PATCH 2/3] Added qtxdg build dependencies That will make the packaging more readable and understandable --- debian/changelog | 9 +++++++++ debian/control | 2 ++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index b761afd..cb0e9ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +liblxqt (0.12.0-2) experimental; urgency=medium + + * Re-added explicit build dependencies, make the packaging more + understandable: + - libqt5xdg-dev (>= 3.1.0) + - libqt5xdgiconloader-dev (>= 3.1.0) + + -- Alf Gaida Sun, 22 Oct 2017 17:28:18 +0200 + liblxqt (0.12.0-1) experimental; urgency=medium * Cherry-picking upstream version 0.12.0. diff --git a/debian/control b/debian/control index df78005..e635525 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,8 @@ Build-Depends: debhelper (>= 10), libqt5svg5-dev, libkf5windowsystem-dev, libqt5x11extras5-dev, + libqt5xdg-dev (>= 3.1.0), + libqt5xdgiconloader-dev (>= 3.1.0), libx11-dev, libxss-dev, lxqt-build-tools (>= 0.4.0) From 52dff0a3086e48db24a5da246cd969ad27db4892 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Mon, 23 Oct 2017 00:35:56 +0200 Subject: [PATCH 3/3] Fixed needed version to build-tools (>= 0.4.0) --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cb0e9ef..b96522a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +liblxqt (0.12.0-3) experimental; urgency=medium + + * Fixed needed version to build-tools (>= 0.4.0) + + -- Alf Gaida Mon, 23 Oct 2017 00:35:16 +0200 + liblxqt (0.12.0-2) experimental; urgency=medium * Re-added explicit build dependencies, make the packaging more diff --git a/debian/control b/debian/control index e635525..8dff5fd 100644 --- a/debian/control +++ b/debian/control @@ -44,7 +44,7 @@ Depends: ${misc:Depends}, liblxqt0 (= ${binary:Version}), libqt5xdg-dev (>= 3.1.0), libqt5xdgiconloader-dev (>= 3.1.0), - lxqt-build-tools + lxqt-build-tools (>= 0.4.0) Description: Shared libraries for LXQt desktop environment (dev) LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt technologies. It has been tailored for users who value simplicity, speed, and