19 #include <QDBusConnection> 21 Platform::Platform(QObject *parent)
24 QMetaObject::invokeMethod(
this,
"init");
29 QDBusInterface iface(
"org.freedesktop.hostname1",
"/org/freedesktop/hostname1",
"org.freedesktop.hostname1",
30 QDBusConnection::systemBus(),
this);
31 QDBusInterface seatIface(
"org.freedesktop.login1",
"/org/freedesktop/login1/seat/self",
"org.freedesktop.login1.Seat",
32 QDBusConnection::systemBus(),
this);
34 m_chassis = iface.property(
"Chassis").toString();
35 m_isPC = (m_chassis ==
"desktop" || m_chassis ==
"laptop" || m_chassis ==
"server");
36 m_isMultiSession = seatIface.property(
"CanMultiSession").toBool() && seatIface.property(
"CanGraphical").toBool();
51 return m_isMultiSession;