diff --git a/D5193.diff b/D5193.diff new file mode 100644 index 0000000..d467b31 --- /dev/null +++ b/D5193.diff @@ -0,0 +1,129 @@ +diff --git a/PkSession/CMakeLists.txt b/PkSession/CMakeLists.txt +--- a/PkSession/CMakeLists.txt ++++ b/PkSession/CMakeLists.txt +@@ -44,6 +44,7 @@ + KF5::KIOFileWidgets + KF5::KDELibs4Support + KF5::IconThemes ++ KF5::DBusAddons + ${PackageKitQt5_LIBRARIES} + apper_private + ) +diff --git a/PkSession/PkSession.h b/PkSession/PkSession.h +--- a/PkSession/PkSession.h ++++ b/PkSession/PkSession.h +@@ -21,15 +21,15 @@ + #ifndef PKSESSION_H + #define PKSESSION_H + +-#include ++#include + #include + + class PkInterface; +-class PkSession : public KUniqueApplication ++class PkSession : public QObject + { + Q_OBJECT + public: +- PkSession(); ++ explicit PkSession(QObject* parent = 0); + virtual ~PkSession(); + int newInstance(); + +diff --git a/PkSession/PkSession.cpp b/PkSession/PkSession.cpp +--- a/PkSession/PkSession.cpp ++++ b/PkSession/PkSession.cpp +@@ -22,6 +22,7 @@ + + #include "PkInterface.h" + ++#include + #include + + #include +@@ -35,8 +36,8 @@ + + using namespace PackageKit; + +-PkSession::PkSession() : +- KUniqueApplication() ++PkSession::PkSession(QObject* parent) ++ : QObject(parent) + { + m_pkInterface = new PkInterface(this); + connect(m_pkInterface, SIGNAL(close()), +@@ -46,7 +47,7 @@ + Daemon::global()->setHints(QLatin1String("locale=") % locale); + + // this enables not quitting when closing a transaction ui +- setQuitOnLastWindowClosed(false); ++ qApp->setQuitOnLastWindowClosed(false); + + // create the close timer and connect it's signal + m_closeT = new QTimer(this); +@@ -83,7 +84,7 @@ + // again just to be sure. + if (!isRunning()) { + kDebug() << "Closed by Timer"; +- quit(); ++ qApp->quit(); + } + } + +diff --git a/PkSession/main.cpp b/PkSession/main.cpp +--- a/PkSession/main.cpp ++++ b/PkSession/main.cpp +@@ -21,14 +21,21 @@ + #include "PkSession.h" + #include + +-#include ++#include ++#include ++#include ++#include ++ ++#include + #include ++#include + #include +-#include +-#include + + int main(int argc, char **argv) + { ++ QApplication app(argc, argv); ++ app.setWindowIcon(QIcon::fromTheme("system-software-install")); ++ + KLocalizedString::setApplicationDomain("apper"); + + KAboutData aboutData("PkSession", +@@ -41,18 +48,16 @@ + aboutData.addAuthor(i18n("Trever Fischer"), QString(), "wm161@wm161.net", "http://wm161.net"); + + aboutData.addCredit(i18n("Adrien Bustany"), i18n("libpackagekit-qt and other stuff"),"@"); +- aboutData.setProgramIconName("system-software-install"); + KAboutData::setApplicationData(aboutData); + +- //! KCmdLineArgs::init(argc, argv); +- Q_UNUSED(argc); +- Q_UNUSED(argv); +- +- if (!PkSession::start()) { +- //kDebug() << "PkSession is already running!"; +- return 0; +- } ++ // Let's ensure we only have one PkSession at any one time on the same session ++ KDBusService service(KDBusService::Unique); ++ auto disableSessionManagement = [](QSessionManager &sm) { ++ sm.setRestartHint(QSessionManager::RestartNever); ++ }; ++ QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement); ++ QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement); + +- PkSession app; ++ PkSession session; + return app.exec(); + } + diff --git a/apper.spec b/apper.spec index 1a772c8..efc00b5 100644 --- a/apper.spec +++ b/apper.spec @@ -6,7 +6,7 @@ Name: apper Summary: KDE interface for PackageKit Version: 0.9.3 -Release: 0.7.%{snap}%{?dist} +Release: 0.8.%{snap}%{?dist} License: GPLv2+ %if 0%{?snap:1} @@ -19,6 +19,8 @@ URL: https://cgit.kde.org/apper.git ## upstream patches (in lookaside cache) ## upstreamable patches +# https://phabricator.kde.org/D5193 +Patch100: https://phabricator.kde.org/file/data/dos4duccaqmjmlpc3vzo/PHID-FILE-zig6gg67s5y7fp2e4p7w/D5193.diff Obsoletes: kpackagekit < 0.7.0 Provides: kpackagekit = %{version}-%{release} @@ -145,6 +147,9 @@ fi %changelog +* Mon Mar 27 2017 Rex Dieter - 0.9.3-0.8.20170226 +- apper: K4AboutData::appName crasher (#1383747) + * Wed Mar 15 2017 Rex Dieter - 0.9.3-0.7.20170226 - fresh snapshot, includes theming fix - omit broken -updater subpkg (for now at least)