Changeset View
Changeset View
Standalone View
Standalone View
keyboard_layout.cpp
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Line(s) | 266 | menu->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure Layouts..."), this, | |||
---|---|---|---|---|---|
267 | [this] { | 267 | [this] { | ||
268 | // TODO: introduce helper function to start kcmshell5 | 268 | // TODO: introduce helper function to start kcmshell5 | ||
269 | QProcess *p = new Process(this); | 269 | QProcess *p = new Process(this); | ||
270 | p->setArguments(QStringList{QStringLiteral("--args=--tab=layouts"), QStringLiteral("kcm_keyboard")}); | 270 | p->setArguments(QStringList{QStringLiteral("--args=--tab=layouts"), QStringLiteral("kcm_keyboard")}); | ||
271 | p->setProcessEnvironment(kwinApp()->processStartupEnvironment()); | 271 | p->setProcessEnvironment(kwinApp()->processStartupEnvironment()); | ||
272 | p->setProgram(QStringLiteral("kcmshell5")); | 272 | p->setProgram(QStringLiteral("kcmshell5")); | ||
273 | connect(p, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), p, &QProcess::deleteLater); | 273 | connect(p, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), p, &QProcess::deleteLater); | ||
274 | connect(p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, | 274 | connect(p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, | ||
275 | [p] (QProcess::ProcessError e) { | 275 | [] (QProcess::ProcessError e) { | ||
276 | if (e == QProcess::FailedToStart) { | 276 | if (e == QProcess::FailedToStart) { | ||
277 | qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; | 277 | qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; | ||
278 | } | 278 | } | ||
279 | } | 279 | } | ||
280 | ); | 280 | ); | ||
281 | p->start(); | 281 | p->start(); | ||
282 | } | 282 | } | ||
283 | ); | 283 | ); | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |