Changeset View
Changeset View
Standalone View
Standalone View
logind.cpp
Show First 20 Lines • Show All 414 Lines • ▼ Show 20 Line(s) | 414 | if (m_sessionPath.isEmpty()) { | |||
---|---|---|---|---|---|
415 | return; | 415 | return; | ||
416 | } | 416 | } | ||
417 | qDBusRegisterMetaType<DBusLogindSeat>(); | 417 | qDBusRegisterMetaType<DBusLogindSeat>(); | ||
418 | QDBusMessage message = QDBusMessage::createMethodCall(m_sessionControllerService, | 418 | QDBusMessage message = QDBusMessage::createMethodCall(m_sessionControllerService, | ||
419 | m_sessionPath, | 419 | m_sessionPath, | ||
420 | s_dbusPropertiesInterface, | 420 | s_dbusPropertiesInterface, | ||
421 | QStringLiteral("Get")); | 421 | QStringLiteral("Get")); | ||
422 | message.setArguments(QVariantList({m_sessionControllerSessionInterface, QStringLiteral("Seat")})); | 422 | message.setArguments(QVariantList({m_sessionControllerSessionInterface, QStringLiteral("Seat")})); | ||
423 | message.setArguments(QVariantList({m_sessionControllerSessionInterface, QStringLiteral("Seat")})); | | |||
424 | QDBusPendingReply<QVariant> reply = m_bus.asyncCall(message); | 423 | QDBusPendingReply<QVariant> reply = m_bus.asyncCall(message); | ||
425 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); | 424 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); | ||
426 | connect(watcher, &QDBusPendingCallWatcher::finished, this, | 425 | connect(watcher, &QDBusPendingCallWatcher::finished, this, | ||
427 | [this](QDBusPendingCallWatcher *self) { | 426 | [this](QDBusPendingCallWatcher *self) { | ||
428 | QDBusPendingReply<QVariant> reply = *self; | 427 | QDBusPendingReply<QVariant> reply = *self; | ||
429 | self->deleteLater(); | 428 | self->deleteLater(); | ||
430 | if (!reply.isValid()) { | 429 | if (!reply.isValid()) { | ||
431 | qCDebug(KWIN_CORE) << "Failed to get Seat Property of " << m_sessionControllerName << " session:" << reply.error().message(); | 430 | qCDebug(KWIN_CORE) << "Failed to get Seat Property of " << m_sessionControllerName << " session:" << reply.error().message(); | ||
432 | return; | 431 | return; | ||
433 | } | 432 | } | ||
434 | DBusLogindSeat seat = qdbus_cast<DBusLogindSeat>(reply.value().value<QDBusArgument>()); | 433 | DBusLogindSeat seat = qdbus_cast<DBusLogindSeat>(reply.value().value<QDBusArgument>()); | ||
435 | const QString seatPath = seat.path.path(); | 434 | const QString seatPath = seat.path.path(); | ||
436 | qCDebug(KWIN_CORE) << m_sessionControllerName << " seat:" << seat.name << "/" << seatPath; | 435 | qCDebug(KWIN_CORE) << m_sessionControllerName << " seat:" << seat.name << "/" << seatPath; | ||
437 | qCDebug(KWIN_CORE) << m_sessionControllerName << " seat:" << seat.name << "/" << seatPath; | | |||
438 | if (m_seatPath != seatPath) { | 436 | if (m_seatPath != seatPath) { | ||
439 | m_seatPath = seatPath; | 437 | m_seatPath = seatPath; | ||
440 | } | 438 | } | ||
441 | if (m_seatName != seat.name) { | 439 | if (m_seatName != seat.name) { | ||
442 | m_seatName = seat.name; | 440 | m_seatName = seat.name; | ||
443 | } | 441 | } | ||
444 | } | 442 | } | ||
445 | ); | 443 | ); | ||
Show All 16 Lines |