Changeset View
Changeset View
Standalone View
Standalone View
kded/daemon.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
60 | { | 60 | { | ||
61 | KScreen::Log::instance(); | 61 | KScreen::Log::instance(); | ||
62 | QMetaObject::invokeMethod(this, "requestConfig", Qt::QueuedConnection); | 62 | QMetaObject::invokeMethod(this, "requestConfig", Qt::QueuedConnection); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | void KScreenDaemon::requestConfig() | 65 | void KScreenDaemon::requestConfig() | ||
66 | { | 66 | { | ||
67 | connect(new KScreen::GetConfigOperation, &KScreen::GetConfigOperation::finished, | 67 | connect(new KScreen::GetConfigOperation, &KScreen::GetConfigOperation::finished, | ||
68 | this, &KScreenDaemon::configReady); | 68 | this, [this](KScreen::ConfigOperation* op) { | ||
69 | } | | |||
70 | | ||||
71 | void KScreenDaemon::configReady(KScreen::ConfigOperation* op) | | |||
72 | { | | |||
73 | if (op->hasError()) { | 69 | if (op->hasError()) { | ||
74 | return; | 70 | return; | ||
75 | } | 71 | } | ||
76 | 72 | | |||
77 | m_monitoredConfig = qobject_cast<KScreen::GetConfigOperation*>(op)->config(); | 73 | m_monitoredConfig = qobject_cast<KScreen::GetConfigOperation*>(op)->config(); | ||
78 | qCDebug(KSCREEN_KDED) << "Config" << m_monitoredConfig.data() << "is ready"; | 74 | qCDebug(KSCREEN_KDED) << "Config" << m_monitoredConfig.data() << "is ready"; | ||
79 | KScreen::ConfigMonitor::instance()->addConfig(m_monitoredConfig); | 75 | KScreen::ConfigMonitor::instance()->addConfig(m_monitoredConfig); | ||
80 | 76 | | |||
81 | init(); | 77 | init(); | ||
78 | }); | ||||
82 | } | 79 | } | ||
83 | 80 | | |||
84 | KScreenDaemon::~KScreenDaemon() | 81 | KScreenDaemon::~KScreenDaemon() | ||
85 | { | 82 | { | ||
86 | Generator::destroy(); | 83 | Generator::destroy(); | ||
87 | Device::destroy(); | 84 | Device::destroy(); | ||
88 | } | 85 | } | ||
89 | 86 | | |||
▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines |