Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/greeter/greeterproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
// Qt
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QDBusInterface>

Check warning on line 23 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusInterface> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDBusPendingCall>

Check warning on line 24 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusPendingCall> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDBusReply>

Check warning on line 25 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusReply> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDBusServiceWatcher>

Check warning on line 26 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDBusServiceWatcher> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QGuiApplication>

Check warning on line 27 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QGuiApplication> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QLocalSocket>

Check warning on line 28 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QLocalSocket> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QScopeGuard>

Check warning on line 29 in src/greeter/greeterproxy.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QScopeGuard> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QVariantMap>

// Waylib
Expand Down Expand Up @@ -91,14 +92,34 @@
: QObject(parent)
{
m_socket = new QLocalSocket(this);
auto conn = QDBusConnection::systemBus();
auto *displayManagerWatcher =
Comment thread
zccrs marked this conversation as resolved.
new QDBusServiceWatcher(QStringLiteral("org.deepin.DisplayManager"),
conn,
QDBusServiceWatcher::WatchForRegistration
| QDBusServiceWatcher::WatchForUnregistration,
this);
connect(displayManagerWatcher,
&QDBusServiceWatcher::serviceRegistered,
this,
[this](const QString &) {
qCInfo(lcTlGreeter) << "Display manager service registered";
updateAuthSocket();
});
connect(displayManagerWatcher,
&QDBusServiceWatcher::serviceUnregistered,
this,
[this](const QString &) {
qCWarning(lcTlGreeter) << "Display manager service unregistered";
m_socket->abort();
});

// connect signals
connect(m_socket, &QLocalSocket::connected, this, &GreeterProxy::connected);
connect(m_socket, &QLocalSocket::disconnected, this, &GreeterProxy::disconnected);
connect(m_socket, &QLocalSocket::readyRead, this, &GreeterProxy::readyRead);
connect(m_socket, &QLocalSocket::errorOccurred, this, &GreeterProxy::error);

auto conn = QDBusConnection::systemBus();
conn.connect(Logind::serviceName(),
Logind::managerPath(),
Logind::managerIfaceName(),
Expand Down
Loading