autotests: Prevent sticky keys leaking to other tests
This commit is contained in:
parent
ba7875bec2
commit
b33c5d9fbb
1 changed files with 11 additions and 2 deletions
|
@ -46,8 +46,17 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch
|
|||
: Application(mode, argc, argv)
|
||||
{
|
||||
QStandardPaths::setTestModeEnabled(true);
|
||||
// TODO: add a test move to kglobalaccel instead?
|
||||
QFile{QStandardPaths::locate(QStandardPaths::ConfigLocation, QStringLiteral("kglobalshortcutsrc"))}.remove();
|
||||
|
||||
const QStringList configs{
|
||||
QStringLiteral("kaccessrc"),
|
||||
QStringLiteral("kglobalshortcutsrc"),
|
||||
};
|
||||
for (const QString &config : configs) {
|
||||
if (const QString &fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, config); !fileName.isEmpty()) {
|
||||
QFile::remove(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
QIcon::setThemeName(QStringLiteral("breeze"));
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
setUseKActivities(false);
|
||||
|
|
Loading…
Reference in a new issue