Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Staging:C
sddm
0001-Destroy-the-QLocalServer-in-Auth-on-shutdo...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Destroy-the-QLocalServer-in-Auth-on-shutdown.patch of Package sddm
From 462cc1d77be372b907fab3f3b624087aef0e1f6e Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fabian@ritter-vogt.de> Date: Fri, 4 Jan 2019 13:29:35 +0100 Subject: [PATCH] Destroy the QLocalServer in Auth on shutdown This is necessary to remove the sddm-auth* sockets. --- src/auth/Auth.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/auth/Auth.cpp b/src/auth/Auth.cpp index 597efc2..2c2e182 100644 --- a/src/auth/Auth.cpp +++ b/src/auth/Auth.cpp @@ -30,6 +30,8 @@ #include <QtQml/QtQml> +#include <memory> + #include <unistd.h> namespace SDDM { @@ -42,12 +44,9 @@ namespace SDDM { QMap<qint64, Auth::Private*> helpers; private: - static Auth::SocketServer *self; SocketServer(); }; - Auth::SocketServer *Auth::SocketServer::self = nullptr; - class Auth::Private : public QObject { Q_OBJECT public: @@ -99,11 +98,12 @@ namespace SDDM { } Auth::SocketServer* Auth::SocketServer::instance() { + static std::unique_ptr<Auth::SocketServer> self; if (!self) { - self = new SocketServer(); + self.reset(new SocketServer()); self->listen(QStringLiteral("sddm-auth%1").arg(QUuid::createUuid().toString().replace(QRegExp(QStringLiteral("[{}]")), QString()))); } - return self; + return self.get(); } -- 2.19.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor