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 | ); | ||||
219 | } | 227 | } | ||
220 | 228 | | |||
221 | ShellCorona::~ShellCorona() | 229 | ShellCorona::~ShellCorona() | ||
222 | { | 230 | { | ||
223 | while (!containments().isEmpty()) { | 231 | while (!containments().isEmpty()) { | ||
224 | //deleting a containment will remove it from the list due to QObject::destroyed connect in Corona | 232 | //deleting a containment will remove it from the list due to QObject::destroyed connect in Corona | ||
225 | delete containments().first(); | 233 | delete containments().first(); | ||
226 | } | 234 | } | ||
▲ Show 20 Lines • Show All 1921 Lines • Show Last 20 Lines |
that's clever