From e15176f52cced43f57e9ec67986b8e8d4177deb3 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Mon, 2 Jan 2017 16:41:26 +0100 Subject: [PATCH] Cherry-picking upstream release 0.11.1. * Removed some build dependencies: -cmake -libqt5xdg-dev -libqt5xdgiconloader-dev -pkg-config -qttools5-dev -qttools5-dev-tools * Bumped build dependency liblxqt0-dev (>= 0.11.1) * Bumped years in d/copyright * Removed deleted files and BSD-License from d/copyright --- .gitignore | 3 -- CHANGELOG | 17 ++++++- CMakeLists.txt | 46 ++++++++--------- cmake/FindUDev.cmake | 50 ------------------- debian/changelog | 16 ++++++ debian/control | 8 +-- debian/copyright | 33 +----------- debian/rules | 6 +-- lxqt-config-session/modulemodel.cpp | 2 +- .../lxqt-config-session_da.desktop | 5 +- .../lxqt-config-session_da_DK.desktop | 4 -- .../lxqt-config-session_fr.desktop | 4 ++ .../lxqt-config-session_fr_FR.desktop | 4 -- .../translations/lxqt-hibernate_da.desktop | 3 ++ .../translations/lxqt-hibernate_fr.desktop | 4 ++ lxqt-leave/translations/lxqt-leave_da.desktop | 3 ++ lxqt-leave/translations/lxqt-leave_fr.desktop | 4 ++ .../translations/lxqt-lockscreen_da.desktop | 3 ++ .../translations/lxqt-logout_da.desktop | 3 ++ .../translations/lxqt-logout_fr.desktop | 4 ++ .../translations/lxqt-reboot_da.desktop | 3 ++ .../translations/lxqt-reboot_fr.desktop | 4 ++ .../translations/lxqt-shutdown_da.desktop | 3 ++ .../translations/lxqt-shutdown_fr.desktop | 4 ++ .../translations/lxqt-suspend_da.desktop | 3 ++ .../translations/lxqt-suspend_fr.desktop | 4 ++ lxqt-session/CMakeLists.txt | 4 +- lxqt-session/src/lxqtmodman.cpp | 25 +++++++++- 28 files changed, 134 insertions(+), 138 deletions(-) delete mode 100644 .gitignore delete mode 100644 cmake/FindUDev.cmake delete mode 100644 lxqt-config-session/translations/lxqt-config-session_da_DK.desktop create mode 100644 lxqt-config-session/translations/lxqt-config-session_fr.desktop delete mode 100644 lxqt-config-session/translations/lxqt-config-session_fr_FR.desktop create mode 100644 lxqt-leave/translations/lxqt-hibernate_da.desktop create mode 100644 lxqt-leave/translations/lxqt-hibernate_fr.desktop create mode 100644 lxqt-leave/translations/lxqt-leave_da.desktop create mode 100644 lxqt-leave/translations/lxqt-leave_fr.desktop create mode 100644 lxqt-leave/translations/lxqt-lockscreen_da.desktop create mode 100644 lxqt-leave/translations/lxqt-logout_da.desktop create mode 100644 lxqt-leave/translations/lxqt-logout_fr.desktop create mode 100644 lxqt-leave/translations/lxqt-reboot_da.desktop create mode 100644 lxqt-leave/translations/lxqt-reboot_fr.desktop create mode 100644 lxqt-leave/translations/lxqt-shutdown_da.desktop create mode 100644 lxqt-leave/translations/lxqt-shutdown_fr.desktop create mode 100644 lxqt-leave/translations/lxqt-suspend_da.desktop create mode 100644 lxqt-leave/translations/lxqt-suspend_fr.desktop diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0bcd51a..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build -*.kdev4 -*/translations/lxqt-session diff --git a/CHANGELOG b/CHANGELOG index 8fd948c..d7841c0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,22 @@ -lxqt-session-0.11.0 / 2016-09-24 +lxqt-session-0.11.1 / 2017-01-01 ================================ + * Adds an nullptr check when restarting a module (#90) + * Fixes a session logout crash (#88) + * Updated da.desktop files and removed da_DK.desktop files + * Moves FindUDev to the lxqt-build-tools repo + * Reworks X11 CMake libraries + * Removes all XCB stuff from CMake + * Update french desktop entries + * lxqt-config-session: Use localized comment + * Make CMakeLists.txt more uniform. + * Remove cpack (#83) + +0.11.0 / 2016-09-24 +=================== + + * Release 0.11.0: Add changelog * lockscreenmanager: always listen to the session provider's lock signal (#79) * Update Polish translation * Add README.md diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ad07be..d62552f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,44 +2,38 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(lxqt-session) -option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) -option(WITH_LIBUDEV "Build with libudev support" ON) - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +include(GNUInstallDirs) + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) -include(GNUInstallDirs) +option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) +option(WITH_LIBUDEV "Build with libudev support" ON) -find_package(KF5WindowSystem REQUIRED) -find_package(Qt5Widgets REQUIRED QUIET) -find_package(Qt5DBus REQUIRED QUIET) -find_package(Qt5X11Extras REQUIRED QUIET) +find_package(X11 REQUIRED) + +find_package(Qt5DBus REQUIRED) find_package(Qt5LinguistTools REQUIRED QUIET) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5X11Extras REQUIRED) +message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}") + +find_package(KF5WindowSystem REQUIRED) -find_package(lxqt REQUIRED QUIET) -find_package(XdgUserDirs REQUIRED QUIET) +find_package(lxqt REQUIRED) + +# Please don't move, must be after lxqt +find_package(XdgUserDirs REQUIRED) include(LXQtCompilerSettings NO_POLICY_SCOPE) -include(LXQtTranslate) -find_package(PkgConfig REQUIRED QUIET) -pkg_check_modules(XCB REQUIRED xcb) -find_package(X11 REQUIRED) +# Translations ********************************** +include(LXQtTranslate) add_subdirectory(lxqt-session) add_subdirectory(lxqt-config-session) add_subdirectory(lxqt-leave) - -# building tarball with CPack ------------------------------------------------- -include(InstallRequiredSystemLibraries) -set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION}) -set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION}) -set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION}) -set(CPACK_GENERATOR TBZ2) -set(CPACK_SOURCE_GENERATOR TBZ2) -set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp) -include(CPack) diff --git a/cmake/FindUDev.cmake b/cmake/FindUDev.cmake deleted file mode 100644 index 9d0f21d..0000000 --- a/cmake/FindUDev.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# - Try to find the UDev library -# Once done this will define -# -# UDEV_FOUND - system has UDev -# UDEV_INCLUDE_DIR - the libudev include directory -# UDEV_LIBS - The libudev libraries - -# Copyright (c) 2010, Rafael Fernández López, -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - -find_path(UDEV_INCLUDE_DIR libudev.h) -find_library(UDEV_LIBS udev) - -if(UDEV_INCLUDE_DIR AND UDEV_LIBS) - include(CheckFunctionExists) - include(CMakePushCheckState) - cmake_push_check_state() - set(CMAKE_REQUIRED_LIBRARIES ${UDEV_LIBS} ) - - cmake_pop_check_state() - -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS) - -mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS) diff --git a/debian/changelog b/debian/changelog index d427d0b..719cee5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +lxqt-session (0.11.1-1) unstable; urgency=medium + + * Cherry-picking upstream release 0.11.1. + * Removed some build dependencies: + -cmake + -libqt5xdg-dev + -libqt5xdgiconloader-dev + -pkg-config + -qttools5-dev + -qttools5-dev-tools + * Bumped build dependency liblxqt0-dev (>= 0.11.1) + * Bumped years in d/copyright + * Removed deleted files and BSD-License from d/copyright + + -- Alf Gaida Mon, 02 Jan 2017 16:41:12 +0100 + lxqt-session (0.11.0-2) unstable; urgency=medium * Cherry-picking upstream release 0.11.0 diff --git a/debian/control b/debian/control index 9e2964a..91b7fa0 100644 --- a/debian/control +++ b/debian/control @@ -6,18 +6,12 @@ Uploaders: Alf Gaida , Section: x11 Priority: optional Build-Depends: debhelper (>= 10), - cmake (>= 3.0.2), libkf5windowsystem-dev, - liblxqt0-dev (>= 0.11.0), + liblxqt0-dev (>= 0.11.1), libqt5svg5-dev, libqt5x11extras5-dev, - libqt5xdg-dev (>= 2.0.0), - libqt5xdgiconloader-dev (>= 2.0.0), libudev-dev [linux-any], libx11-dev, - pkg-config, - qttools5-dev, - qttools5-dev-tools, xdg-user-dirs Standards-Version: 3.9.8 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-session.git/?h=debian/sid diff --git a/debian/copyright b/debian/copyright index 89bd240..3066b2e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,13 +4,9 @@ Source: https://github.com/lxde/lxqt-session Files: * Copyright: 2010-2012 Razor team - 2012-2016 LXQt team + 2012-2017 LXQt team License: LGPL-2.1+ -Files: cmake/FindUDev.cmake -Copyright: 2010 Rafael Fernández López -License: BSD-3-Clause - Files: lxqt-config-session/autostartedit.* lxqt-config-session/autostartitem.* lxqt-config-session/autostartpage.* @@ -51,7 +47,7 @@ Copyright: 2016 Palo Kisa License: LGPL-2.1+ Files: debian/* -Copyright: 2014-2016 Alf Gaida +Copyright: 2014-2017 Alf Gaida 2015 Andrew Lee (李健秋) 2015 ChangZhuo Chen (陳昌倬) License: LGPL-2.1+ @@ -70,28 +66,3 @@ License: LGPL-2.1+ On Debian systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1". - -License: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/rules b/debian/rules index 6a8b842..ff70b67 100755 --- a/debian/rules +++ b/debian/rules @@ -17,7 +17,7 @@ endif override_dh_auto_configure: dh_auto_configure -- \ - -DPULL_TRANSLATIONS=OFF\ - -DUPDATE_TRANSLATIONS=OFF\ - -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DPULL_TRANSLATIONS=OFF \ + -DUPDATE_TRANSLATIONS=OFF \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ $(CMAKE_ARGS) diff --git a/lxqt-config-session/modulemodel.cpp b/lxqt-config-session/modulemodel.cpp index be5afe5..30d472c 100644 --- a/lxqt-config-session/modulemodel.cpp +++ b/lxqt-config-session/modulemodel.cpp @@ -77,7 +77,7 @@ QVariant ModuleModel::data(const QModelIndex& index, int role) const case Qt::CheckStateRole: return mItemMap.value(name).isEnabled() ? Qt::Checked : Qt::Unchecked; case Qt::ToolTipRole: - return mItemMap.value(name).file().value("Comment"); + return mItemMap.value(name).file().comment(); } } else if (index.column() == 1 && (role == Qt::DisplayRole || role == Qt::DecorationRole)) diff --git a/lxqt-config-session/translations/lxqt-config-session_da.desktop b/lxqt-config-session/translations/lxqt-config-session_da.desktop index 87dbcb0..5668227 100644 --- a/lxqt-config-session/translations/lxqt-config-session_da.desktop +++ b/lxqt-config-session/translations/lxqt-config-session_da.desktop @@ -1,4 +1,3 @@ # Translations -Comment[da]=Indstil LXQt Sessionsmodul -GenericName[da]=Indstilling af LXQt-sessioner -Name[da]=Indstilling af LXQt-sessioner +Name[da]=Sessionsindstillinger +Comment[da]=Konfiguration af LXQt-sessioner diff --git a/lxqt-config-session/translations/lxqt-config-session_da_DK.desktop b/lxqt-config-session/translations/lxqt-config-session_da_DK.desktop deleted file mode 100644 index 8bbc4fe..0000000 --- a/lxqt-config-session/translations/lxqt-config-session_da_DK.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[da_DK]=Indstilling af LXQt sessionsmodul -GenericName[da_DK]=Indstilling af LXQt Session -Name[da_DK]=Indstilling af LXQt Session diff --git a/lxqt-config-session/translations/lxqt-config-session_fr.desktop b/lxqt-config-session/translations/lxqt-config-session_fr.desktop new file mode 100644 index 0000000..1079695 --- /dev/null +++ b/lxqt-config-session/translations/lxqt-config-session_fr.desktop @@ -0,0 +1,4 @@ +# Translations +Comment[fr]=Configurer le module 'session' de LXQt +GenericName[fr]=Paramétreur de session LXQt +Name[fr]=Paramétreur de session LXQt diff --git a/lxqt-config-session/translations/lxqt-config-session_fr_FR.desktop b/lxqt-config-session/translations/lxqt-config-session_fr_FR.desktop deleted file mode 100644 index 9ed47cf..0000000 --- a/lxqt-config-session/translations/lxqt-config-session_fr_FR.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[fr_FR]=Configurer le module 'session' de LXQt -GenericName[fr_FR]=Paramétreur de session LXQt -Name[fr_FR]=Paramétreur de session LXQt diff --git a/lxqt-leave/translations/lxqt-hibernate_da.desktop b/lxqt-leave/translations/lxqt-hibernate_da.desktop new file mode 100644 index 0000000..92f206b --- /dev/null +++ b/lxqt-leave/translations/lxqt-hibernate_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Dvale +Comment[da]=Sæt maskinen i dvale diff --git a/lxqt-leave/translations/lxqt-hibernate_fr.desktop b/lxqt-leave/translations/lxqt-hibernate_fr.desktop new file mode 100644 index 0000000..83db6d5 --- /dev/null +++ b/lxqt-leave/translations/lxqt-hibernate_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Hivernation +GenericName[fr]=Hivernation +Comment[fr]=Hivernation de l'ordinateur diff --git a/lxqt-leave/translations/lxqt-leave_da.desktop b/lxqt-leave/translations/lxqt-leave_da.desktop new file mode 100644 index 0000000..480eb6e --- /dev/null +++ b/lxqt-leave/translations/lxqt-leave_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Afslut +Comment[da]=Afslut-dialog diff --git a/lxqt-leave/translations/lxqt-leave_fr.desktop b/lxqt-leave/translations/lxqt-leave_fr.desktop new file mode 100644 index 0000000..b885e09 --- /dev/null +++ b/lxqt-leave/translations/lxqt-leave_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Quitter +GenericName[fr]=Quitter +Comment[fr]=Dialogue pour quitter diff --git a/lxqt-leave/translations/lxqt-lockscreen_da.desktop b/lxqt-leave/translations/lxqt-lockscreen_da.desktop new file mode 100644 index 0000000..362e7f5 --- /dev/null +++ b/lxqt-leave/translations/lxqt-lockscreen_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Lås skærmen +Comment[da]=Lås den aktuelle session diff --git a/lxqt-leave/translations/lxqt-logout_da.desktop b/lxqt-leave/translations/lxqt-logout_da.desktop new file mode 100644 index 0000000..0c12dda --- /dev/null +++ b/lxqt-leave/translations/lxqt-logout_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Log ud +Comment[da]=Log ud fra den aktuelle session diff --git a/lxqt-leave/translations/lxqt-logout_fr.desktop b/lxqt-leave/translations/lxqt-logout_fr.desktop new file mode 100644 index 0000000..5d253b9 --- /dev/null +++ b/lxqt-leave/translations/lxqt-logout_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Déconnecter +GenericName[fr]=Déconnecter +Comment[fr]=Déconnecter de cette session diff --git a/lxqt-leave/translations/lxqt-reboot_da.desktop b/lxqt-leave/translations/lxqt-reboot_da.desktop new file mode 100644 index 0000000..dd007ab --- /dev/null +++ b/lxqt-leave/translations/lxqt-reboot_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Genstart +Comment[da]=Genstart maskinen diff --git a/lxqt-leave/translations/lxqt-reboot_fr.desktop b/lxqt-leave/translations/lxqt-reboot_fr.desktop new file mode 100644 index 0000000..825fc5f --- /dev/null +++ b/lxqt-leave/translations/lxqt-reboot_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Redémarrer +GenericName[fr]=Redémarrer +Comment[fr]=Redémarrer l'ordinateur diff --git a/lxqt-leave/translations/lxqt-shutdown_da.desktop b/lxqt-leave/translations/lxqt-shutdown_da.desktop new file mode 100644 index 0000000..1bc9906 --- /dev/null +++ b/lxqt-leave/translations/lxqt-shutdown_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Luk ned +Comment[da]=Luk maskinen diff --git a/lxqt-leave/translations/lxqt-shutdown_fr.desktop b/lxqt-leave/translations/lxqt-shutdown_fr.desktop new file mode 100644 index 0000000..7f23391 --- /dev/null +++ b/lxqt-leave/translations/lxqt-shutdown_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Arrêter +GenericName[fr]=Arrêter +Comment[fr]=Arrêter l'ordinateur diff --git a/lxqt-leave/translations/lxqt-suspend_da.desktop b/lxqt-leave/translations/lxqt-suspend_da.desktop new file mode 100644 index 0000000..ca3d6c4 --- /dev/null +++ b/lxqt-leave/translations/lxqt-suspend_da.desktop @@ -0,0 +1,3 @@ +# Translations +Name[da]=Hvile +Comment[da]=Sæt maskinen i hvile diff --git a/lxqt-leave/translations/lxqt-suspend_fr.desktop b/lxqt-leave/translations/lxqt-suspend_fr.desktop new file mode 100644 index 0000000..167c862 --- /dev/null +++ b/lxqt-leave/translations/lxqt-suspend_fr.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[fr]=Suspendre +GenericName[fr]=Suspendre +Comment[fr]=Suspendre l'ordinateur diff --git a/lxqt-session/CMakeLists.txt b/lxqt-session/CMakeLists.txt index d8f2b5e..bca34e0 100644 --- a/lxqt-session/CMakeLists.txt +++ b/lxqt-session/CMakeLists.txt @@ -12,7 +12,6 @@ if (WITH_LIBUDEV) endif() include_directories( - ${XCB_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ) @@ -73,9 +72,8 @@ target_link_libraries(lxqt-session Qt5::Widgets Qt5::DBus Qt5::X11Extras - ${XCB_LDFLAGS} - X11 lxqt + ${X11_LIBRARIES} KF5::WindowSystem ) diff --git a/lxqt-session/src/lxqtmodman.cpp b/lxqt-session/src/lxqtmodman.cpp index f5b7572..fbb8ab8 100644 --- a/lxqt-session/src/lxqtmodman.cpp +++ b/lxqt-session/src/lxqtmodman.cpp @@ -280,7 +280,10 @@ void LXQtModuleManager::startConfUpdate() void LXQtModuleManager::restartModules(int exitCode, QProcess::ExitStatus exitStatus) { LXQtModule* proc = qobject_cast(sender()); - Q_ASSERT(proc); + if (nullptr == proc) { + qCWarning(SESSION) << "Got an invalid (null) module to restart. Ignoring it"; + return; + } if (!proc->isTerminating()) { @@ -319,7 +322,25 @@ void LXQtModuleManager::restartModules(int exitCode, QProcess::ExitStatus exitSt LXQtModuleManager::~LXQtModuleManager() { qApp->removeNativeEventFilter(this); - qDeleteAll(mNameMap); + + // We disconnect the finished signal before deleting the process. We do + // this to prevent a crash that results from a state change signal being + // emmited while deleting a crashing module. + // If the module is still connect restartModules will be called with a + // invalid sender. + + ModulesMapIterator i(mNameMap); + while (i.hasNext()) + { + i.next(); + + auto p = i.value(); + disconnect(p, SIGNAL(finished(int, QProcess::ExitStatus)), 0, 0); + + delete p; + mNameMap[i.key()] = nullptr; + } + delete mWmProcess; }