Changeset View
Changeset View
Standalone View
Standalone View
shell/shellcorona.cpp
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Line(s) | 99 | { | |||
---|---|---|---|---|---|
211 | 211 | | |||
212 | new Osd(m_config, this); | 212 | new Osd(m_config, this); | ||
213 | 213 | | |||
214 | // catch when plasmarc changes, so we e.g. enable/disable the OSd | 214 | // catch when plasmarc changes, so we e.g. enable/disable the OSd | ||
215 | m_configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + m_config->name(); | 215 | m_configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + m_config->name(); | ||
216 | KDirWatch::self()->addFile(m_configPath); | 216 | KDirWatch::self()->addFile(m_configPath); | ||
217 | connect(KDirWatch::self(), &KDirWatch::dirty, this, &ShellCorona::configurationChanged); | 217 | connect(KDirWatch::self(), &KDirWatch::dirty, this, &ShellCorona::configurationChanged); | ||
218 | connect(KDirWatch::self(), &KDirWatch::created, this, &ShellCorona::configurationChanged); | 218 | connect(KDirWatch::self(), &KDirWatch::created, this, &ShellCorona::configurationChanged); | ||
219 | | ||||
220 | connect(qApp, &QGuiApplication::focusWindowChanged, | ||||
davidedmundson: that's clever | |||||
221 | this, [this] (QWindow *focusWindow) { | ||||
222 | if (!focusWindow) { | ||||
223 | setEditMode(false); | ||||
224 | } | ||||
225 | } | ||||
226 | ); | ||||
227 | connect(this, &ShellCorona::editModeChanged, | ||||
228 | this, [this](bool edit) { | ||||
229 | setDashboardShown(edit); | ||||
230 | } | ||||
231 | ); | ||||
219 | } | 232 | } | ||
220 | 233 | | |||
221 | ShellCorona::~ShellCorona() | 234 | ShellCorona::~ShellCorona() | ||
222 | { | 235 | { | ||
223 | while (!containments().isEmpty()) { | 236 | while (!containments().isEmpty()) { | ||
224 | //deleting a containment will remove it from the list due to QObject::destroyed connect in Corona | 237 | //deleting a containment will remove it from the list due to QObject::destroyed connect in Corona | ||
225 | delete containments().first(); | 238 | delete containments().first(); | ||
226 | } | 239 | } | ||
▲ Show 20 Lines • Show All 1921 Lines • Show Last 20 Lines |
that's clever