Changeset View
Changeset View
Standalone View
Standalone View
kded/daemon.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 43 | K_PLUGIN_FACTORY_WITH_JSON(KScreenDaemonFactory, | |||
---|---|---|---|---|---|
44 | "kscreen.json", | 44 | "kscreen.json", | ||
45 | registerPlugin<KScreenDaemon>();) | 45 | registerPlugin<KScreenDaemon>();) | ||
46 | 46 | | |||
47 | KScreenDaemon::KScreenDaemon(QObject* parent, const QList< QVariant >& ) | 47 | KScreenDaemon::KScreenDaemon(QObject* parent, const QList< QVariant >& ) | ||
48 | : KDEDModule(parent) | 48 | : KDEDModule(parent) | ||
49 | , m_monitoredConfig(0) | 49 | , m_monitoredConfig(0) | ||
50 | , m_iteration(Generator::None) | 50 | , m_iteration(Generator::None) | ||
51 | , m_monitoring(false) | 51 | , m_monitoring(false) | ||
52 | , m_changeCompressor(new QTimer()) | 52 | , m_changeCompressor(new QTimer(this)) | ||
53 | , m_buttonTimer(new QTimer()) | 53 | , m_buttonTimer(new QTimer(this)) | ||
54 | , m_saveTimer(new QTimer()) | 54 | , m_saveTimer(new QTimer(this)) | ||
55 | , m_lidClosedTimer(new QTimer()) | 55 | , m_lidClosedTimer(new QTimer(this)) | ||
56 | , m_changeBlockTimer(new QElapsedTimer()) | 56 | , m_changeBlockTimer(new QElapsedTimer()) | ||
57 | 57 | | |||
58 | { | 58 | { | ||
59 | QMetaObject::invokeMethod(this, "requestConfig", Qt::QueuedConnection); | 59 | QMetaObject::invokeMethod(this, "requestConfig", Qt::QueuedConnection); | ||
60 | } | 60 | } | ||
61 | 61 | | |||
62 | void KScreenDaemon::requestConfig() | 62 | void KScreenDaemon::requestConfig() | ||
63 | { | 63 | { | ||
Show All 11 Lines | 69 | { | |||
75 | qCDebug(KSCREEN_KDED) << "Config" << m_monitoredConfig.data() << "is ready"; | 75 | qCDebug(KSCREEN_KDED) << "Config" << m_monitoredConfig.data() << "is ready"; | ||
76 | KScreen::ConfigMonitor::instance()->addConfig(m_monitoredConfig); | 76 | KScreen::ConfigMonitor::instance()->addConfig(m_monitoredConfig); | ||
77 | 77 | | |||
78 | init(); | 78 | init(); | ||
79 | } | 79 | } | ||
80 | 80 | | |||
81 | KScreenDaemon::~KScreenDaemon() | 81 | KScreenDaemon::~KScreenDaemon() | ||
82 | { | 82 | { | ||
83 | delete m_changeCompressor; | | |||
84 | delete m_saveTimer; | | |||
85 | delete m_buttonTimer; | | |||
86 | delete m_lidClosedTimer; | | |||
87 | delete m_changeBlockTimer; | | |||
88 | | ||||
89 | Generator::destroy(); | 83 | Generator::destroy(); | ||
90 | Device::destroy(); | 84 | Device::destroy(); | ||
91 | } | 85 | } | ||
92 | 86 | | |||
93 | void KScreenDaemon::init() | 87 | void KScreenDaemon::init() | ||
94 | { | 88 | { | ||
95 | KActionCollection *coll = new KActionCollection(this); | 89 | KActionCollection *coll = new KActionCollection(this); | ||
96 | QAction* action = coll->addAction(QStringLiteral("display")); | 90 | QAction* action = coll->addAction(QStringLiteral("display")); | ||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |