diff options
Diffstat (limited to 'src/main-lib/main.cpp')
-rw-r--r-- | src/main-lib/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index 80b96751..14b287f4 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -654,7 +654,7 @@ void Main::setupWindowManager(const QString &waylandSocketName, const QVariantLi sudo->removeRecursive(path); } - QScopedPointer<QLocalServer> extraSocket(new QLocalServer); + std::unique_ptr<QLocalServer> extraSocket(new QLocalServer); extraSocket->setMaxPendingConnections(0); // disable Qt's new connection handling if (!extraSocket->listen(path)) { throw Exception("could not listen on extra Wayland socket %1: %2") @@ -688,13 +688,13 @@ void Main::setupWindowManager(const QString &waylandSocketName, const QVariantLi } // if we changed the owner, ~QLocalServer might not be able to clean up the // socket inode, so we need to sudo this removal as well - QObject::connect(extraSocket.data(), &QObject::destroyed, [path, sudo]() { + QObject::connect(extraSocket.get(), &QObject::destroyed, [path, sudo]() { sudo->removeRecursive(path); }); } } - m_windowManager->addWaylandSocket(extraSocket.take()); + m_windowManager->addWaylandSocket(extraSocket.release()); } catch (const std::exception &e) { qCCritical(LogSystem) << "ERROR:" << e.what(); } |