Port away from deprecated KConfigBase::group() api
This commit is contained in:
parent
c8d4f26a9f
commit
784d48ef52
61 changed files with 147 additions and 147 deletions
|
@ -221,7 +221,7 @@ void GLPlatformTest::testDetect()
|
|||
{
|
||||
QFETCH(QString, configFile);
|
||||
KConfig config(configFile);
|
||||
const KConfigGroup driverGroup = config.group("Driver");
|
||||
const KConfigGroup driverGroup = config.group(QStringLiteral("Driver"));
|
||||
s_gl = new MockGL;
|
||||
s_gl->getString.vendor = driverGroup.readEntry("Vendor").toUtf8();
|
||||
s_gl->getString.renderer = driverGroup.readEntry("Renderer").toUtf8();
|
||||
|
@ -238,7 +238,7 @@ void GLPlatformTest::testDetect()
|
|||
gl->detect(EglPlatformInterface);
|
||||
QCOMPARE(gl->platformInterface(), EglPlatformInterface);
|
||||
|
||||
const KConfigGroup settingsGroup = config.group("Settings");
|
||||
const KConfigGroup settingsGroup = config.group(QStringLiteral("Settings"));
|
||||
|
||||
QCOMPARE(gl->supports(GLFeature::LooseBinding), settingsGroup.readEntry("LooseBinding", false));
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ void DecorationInputTest::testDoubleClickOnAllDesktops_data()
|
|||
|
||||
void KWin::DecorationInputTest::testDoubleClickOnAllDesktops()
|
||||
{
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("TitlebarDoubleClickCommand", QStringLiteral("OnAllDesktops"));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -269,7 +269,7 @@ void KWin::DecorationInputTest::testDoubleClickOnAllDesktops()
|
|||
void DecorationInputTest::testDoubleClickClose()
|
||||
{
|
||||
// this test verifies that no crash occurs when double click is configured to close action
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("TitlebarDoubleClickCommand", QStringLiteral("Close"));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -309,7 +309,7 @@ void DecorationInputTest::testDoubleTap_data()
|
|||
|
||||
void KWin::DecorationInputTest::testDoubleTap()
|
||||
{
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("TitlebarDoubleClickCommand", QStringLiteral("OnAllDesktops"));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -531,7 +531,7 @@ void DecorationInputTest::testResizeOutsideWindow()
|
|||
// this test verifies that one can resize the window outside the decoration with NoSideBorder
|
||||
|
||||
// first adjust config
|
||||
kwinApp()->config()->group("org.kde.kdecoration2").writeEntry("BorderSize", QStringLiteral("None"));
|
||||
kwinApp()->config()->group(QStringLiteral("org.kde.kdecoration2")).writeEntry("BorderSize", QStringLiteral("None"));
|
||||
kwinApp()->config()->sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
||||
|
@ -617,7 +617,7 @@ void DecorationInputTest::testModifierClickUnrestrictedMove()
|
|||
|
||||
// first modify the config for this run
|
||||
QFETCH(QString, modKey);
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", modKey);
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
@ -686,7 +686,7 @@ void DecorationInputTest::testModifierScrollOpacity()
|
|||
|
||||
// first modify the config for this run
|
||||
QFETCH(QString, modKey);
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", modKey);
|
||||
group.writeEntry("CommandAllWheel", "change opacity");
|
||||
group.sync();
|
||||
|
|
|
@ -50,7 +50,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase()
|
|||
});
|
||||
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
config->group("org.kde.kdecoration2").writeEntry("library", "org.kde.kwin.aurorae");
|
||||
config->group(QStringLiteral("org.kde.kdecoration2")).writeEntry("library", "org.kde.kwin.aurorae");
|
||||
config->sync();
|
||||
kwinApp()->setConfig(config);
|
||||
|
||||
|
@ -78,7 +78,7 @@ void DontCrashAuroraeDestroyDecoTest::testBorderlessMaximizedWindows()
|
|||
// see BUG 362772
|
||||
|
||||
// first adjust the config
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", true);
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
|
|
@ -63,7 +63,7 @@ void SlidingPopupsTest::initTestCase()
|
|||
for (QString name : builtinNames) {
|
||||
plugins.writeEntry(name + QStringLiteral("Enabled"), false);
|
||||
}
|
||||
KConfigGroup wobblyGroup = config->group("Effect-Wobbly");
|
||||
KConfigGroup wobblyGroup = config->group(QStringLiteral("Effect-Wobbly"));
|
||||
wobblyGroup.writeEntry(QStringLiteral("Settings"), QStringLiteral("Custom"));
|
||||
wobblyGroup.writeEntry(QStringLiteral("OpenEffect"), true);
|
||||
wobblyGroup.writeEntry(QStringLiteral("CloseEffect"), true);
|
||||
|
|
|
@ -59,8 +59,8 @@ void TranslucencyTest::initTestCase()
|
|||
for (QString name : builtinNames) {
|
||||
plugins.writeEntry(name + QStringLiteral("Enabled"), false);
|
||||
}
|
||||
config->group("Outline").writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
config->group("Effect-translucency").writeEntry(QStringLiteral("Dialogs"), 90);
|
||||
config->group(QStringLiteral("Outline")).writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
config->group(QStringLiteral("Effect-translucency")).writeEntry(QStringLiteral("Dialogs"), 90);
|
||||
|
||||
config->sync();
|
||||
kwinApp()->setConfig(config);
|
||||
|
|
|
@ -554,7 +554,7 @@ void InternalWindowTest::testModifierClickUnrestrictedMove()
|
|||
QVERIFY(internalWindow);
|
||||
QVERIFY(internalWindow->isDecorated());
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
@ -595,7 +595,7 @@ void InternalWindowTest::testModifierScroll()
|
|||
QVERIFY(internalWindow);
|
||||
QVERIFY(internalWindow->isDecorated());
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAllWheel", "change opacity");
|
||||
group.sync();
|
||||
|
|
|
@ -141,7 +141,7 @@ void KeyboardLayoutTest::initTestCase()
|
|||
kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||
kwinApp()->setInputConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||
|
||||
layoutGroup = kwinApp()->kxkbConfig()->group("Layout");
|
||||
layoutGroup = kwinApp()->kxkbConfig()->group(QStringLiteral("Layout"));
|
||||
layoutGroup.deleteGroup();
|
||||
|
||||
kwinApp()->start();
|
||||
|
@ -175,7 +175,7 @@ void KeyboardLayoutTest::testReconfigure()
|
|||
QCOMPARE(xkb->layoutName(0), QStringLiteral("English (US)"));
|
||||
|
||||
// create a new keymap
|
||||
KConfigGroup layoutGroup = kwinApp()->kxkbConfig()->group("Layout");
|
||||
KConfigGroup layoutGroup = kwinApp()->kxkbConfig()->group(QStringLiteral("Layout"));
|
||||
layoutGroup.writeEntry("LayoutList", QStringLiteral("de,us"));
|
||||
layoutGroup.sync();
|
||||
|
||||
|
@ -537,7 +537,7 @@ void KeyboardLayoutTest::testNumLock()
|
|||
QVERIFY(!xkb->leds().testFlag(LED::NumLock));
|
||||
|
||||
// let's reconfigure to enable through config
|
||||
auto group = kwinApp()->inputConfig()->group("Keyboard");
|
||||
auto group = kwinApp()->inputConfig()->group(QStringLiteral("Keyboard"));
|
||||
group.writeEntry("NumLock", 0);
|
||||
group.sync();
|
||||
xkb->reconfigure();
|
||||
|
|
|
@ -55,7 +55,7 @@ void KeymapCreationFailureTest::initTestCase()
|
|||
|
||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||
kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||
KConfigGroup layoutGroup = kwinApp()->kxkbConfig()->group("Layout");
|
||||
KConfigGroup layoutGroup = kwinApp()->kxkbConfig()->group(QStringLiteral("Layout"));
|
||||
layoutGroup.writeEntry("LayoutList", QStringLiteral("no"));
|
||||
layoutGroup.writeEntry("Model", "no");
|
||||
layoutGroup.writeEntry("Options", "no");
|
||||
|
|
|
@ -72,7 +72,7 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch
|
|||
qunsetenv("XKB_DEFAULT_OPTIONS");
|
||||
|
||||
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup windowsGroup = config->group("Windows");
|
||||
KConfigGroup windowsGroup = config->group(QStringLiteral("Windows"));
|
||||
windowsGroup.writeEntry("Placement", Placement::policyToString(PlacementSmart));
|
||||
windowsGroup.sync();
|
||||
setConfig(config);
|
||||
|
|
|
@ -77,7 +77,7 @@ void TestMaximized::cleanup()
|
|||
Test::destroyWaylandConnection();
|
||||
|
||||
// adjust config
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", false);
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
@ -168,7 +168,7 @@ void TestMaximized::testInitiallyMaximizedBorderless()
|
|||
// This test verifies that a window created as maximized, will be maximized and without Border with BorderlessMaximizedWindows
|
||||
|
||||
// adjust config
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", true);
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
@ -218,7 +218,7 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
// decoration when the borderless maximized option is on.
|
||||
|
||||
// Enable the borderless maximized windows option.
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", true);
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
|
|
@ -133,7 +133,7 @@ void ModifierOnlyShortcutTest::testTrigger()
|
|||
Target target;
|
||||
QSignalSpy triggeredSpy(&target, &Target::shortcutTriggered);
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("ModifierOnlyShortcuts");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("ModifierOnlyShortcuts"));
|
||||
QFETCH(QStringList, metaConfig);
|
||||
QFETCH(QStringList, altConfig);
|
||||
QFETCH(QStringList, shiftConfig);
|
||||
|
@ -248,7 +248,7 @@ void ModifierOnlyShortcutTest::testCapsLock()
|
|||
Target target;
|
||||
QSignalSpy triggeredSpy(&target, &Target::shortcutTriggered);
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("ModifierOnlyShortcuts");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("ModifierOnlyShortcuts"));
|
||||
group.writeEntry("Meta", QStringList());
|
||||
group.writeEntry("Alt", QStringList());
|
||||
group.writeEntry("Shift", QStringList{s_serviceName, s_path, s_serviceName, QStringLiteral("shortcut")});
|
||||
|
@ -333,7 +333,7 @@ void ModifierOnlyShortcutTest::testGlobalShortcutsDisabled()
|
|||
Target target;
|
||||
QSignalSpy triggeredSpy(&target, &Target::shortcutTriggered);
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("ModifierOnlyShortcuts");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("ModifierOnlyShortcuts"));
|
||||
QFETCH(QStringList, metaConfig);
|
||||
QFETCH(QStringList, altConfig);
|
||||
QFETCH(QStringList, shiftConfig);
|
||||
|
|
|
@ -141,7 +141,7 @@ void NoGlobalShortcutsTest::testTrigger()
|
|||
Target target;
|
||||
QSignalSpy triggeredSpy(&target, &Target::shortcutTriggered);
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("ModifierOnlyShortcuts");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("ModifierOnlyShortcuts"));
|
||||
QFETCH(QStringList, metaConfig);
|
||||
QFETCH(QStringList, altConfig);
|
||||
QFETCH(QStringList, shiftConfig);
|
||||
|
|
|
@ -99,7 +99,7 @@ void TestPlacement::initTestCase()
|
|||
|
||||
void TestPlacement::setPlacementPolicy(PlacementPolicy policy)
|
||||
{
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(policy));
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
@ -238,7 +238,7 @@ void TestPlacement::testPlaceCentered()
|
|||
{
|
||||
// This test verifies that Centered placement policy works.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementCentered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -257,7 +257,7 @@ void TestPlacement::testPlaceUnderMouse()
|
|||
{
|
||||
// This test verifies that Under Mouse placement policy works.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementUnderMouse));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -279,7 +279,7 @@ void TestPlacement::testPlaceZeroCornered()
|
|||
{
|
||||
// This test verifies that the Zero-Cornered placement policy works.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementZeroCornered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -317,7 +317,7 @@ void TestPlacement::testPlaceRandom()
|
|||
{
|
||||
// This test verifies that Random placement policy works.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementRandom));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -388,7 +388,7 @@ void TestPlacement::testCascadeIfCovering()
|
|||
// This test verifies that the cascade-if-covering adjustment works for the Centered placement
|
||||
// policy.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementCentered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -430,7 +430,7 @@ void TestPlacement::testCascadeIfCoveringIgnoreNonCovering()
|
|||
// This test verifies that the cascade-if-covering adjustment doesn't take effect when the
|
||||
// other window wouldn't be fully covered.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementCentered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -459,7 +459,7 @@ void TestPlacement::testCascadeIfCoveringIgnoreOutOfArea()
|
|||
// This test verifies that the cascade-if-covering adjustment doesn't take effect when there is
|
||||
// not enough space on the placement area to cascade.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementCentered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -488,7 +488,7 @@ void TestPlacement::testCascadeIfCoveringIgnoreAlreadyCovered()
|
|||
// This test verifies that the cascade-if-covering adjustment doesn't take effect when the
|
||||
// other window is already fully covered by other windows anyway.
|
||||
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("Placement", Placement::policyToString(PlacementCentered));
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
|
|
@ -65,7 +65,7 @@ void TestPointerConstraints::initTestCase()
|
|||
|
||||
// set custom config which disables the OnScreenNotification
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup group = config->group("OnScreenNotification");
|
||||
KConfigGroup group = config->group(QStringLiteral("OnScreenNotification"));
|
||||
group.writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
group.sync();
|
||||
|
||||
|
@ -167,7 +167,7 @@ void TestPointerConstraints::testConfinedPointer()
|
|||
|
||||
// modifier + click should be ignored
|
||||
// first ensure the settings are ok
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", QStringLiteral("Meta"));
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
|
|
@ -358,7 +358,7 @@ void PointerInputTest::testUpdateFocusOnDecorationDestroy()
|
|||
QSignalSpy buttonStateChangedSpy(pointer, &KWayland::Client::Pointer::buttonStateChanged);
|
||||
|
||||
// Enable the borderless maximized windows option.
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", true);
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
@ -487,7 +487,7 @@ void PointerInputTest::testModifierClickUnrestrictedMove()
|
|||
|
||||
// first modify the config for this run
|
||||
QFETCH(QString, modKey);
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", modKey);
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
@ -553,7 +553,7 @@ void PointerInputTest::testModifierClickUnrestrictedFullscreenMove()
|
|||
}
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
@ -607,7 +607,7 @@ void PointerInputTest::testModifierClickUnrestrictedMoveGlobalShortcutsDisabled(
|
|||
QSignalSpy buttonSpy(pointer, &KWayland::Client::Pointer::buttonStateChanged);
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.writeEntry("CommandAll2", "Move");
|
||||
|
@ -684,7 +684,7 @@ void PointerInputTest::testModifierScrollOpacity()
|
|||
|
||||
// first modify the config for this run
|
||||
QFETCH(QString, modKey);
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", modKey);
|
||||
group.writeEntry("CommandAllWheel", "change opacity");
|
||||
group.sync();
|
||||
|
@ -742,7 +742,7 @@ void PointerInputTest::testModifierScrollOpacityGlobalShortcutsDisabled()
|
|||
QSignalSpy axisSpy(pointer, &KWayland::Client::Pointer::axisChanged);
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAllWheel", "change opacity");
|
||||
group.sync();
|
||||
|
@ -791,7 +791,7 @@ void PointerInputTest::testScrollAction()
|
|||
QSignalSpy axisSpy(pointer, &KWayland::Client::Pointer::axisChanged);
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandWindowWheel", "activate and scroll");
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -837,7 +837,7 @@ void PointerInputTest::testFocusFollowsMouse()
|
|||
input()->pointer()->warp(QPointF(900, 900));
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("AutoRaise", true);
|
||||
group.writeEntry("AutoRaiseInterval", 20);
|
||||
group.writeEntry("DelayFocusInterval", 200);
|
||||
|
@ -922,10 +922,10 @@ void PointerInputTest::testMouseActionInactiveWindow()
|
|||
// it should activate the window and raise it
|
||||
|
||||
// first modify the config for this run - disable FocusFollowsMouse
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("FocusPolicy", "ClickToFocus");
|
||||
group.sync();
|
||||
group = kwinApp()->config()->group("MouseBindings");
|
||||
group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandWindow1", "Activate, raise and pass click");
|
||||
group.writeEntry("CommandWindow2", "Activate, raise and pass click");
|
||||
group.writeEntry("CommandWindow3", "Activate, raise and pass click");
|
||||
|
@ -1011,7 +1011,7 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
|
||||
// adjust config for this run
|
||||
QFETCH(bool, clickRaise);
|
||||
KConfigGroup group = kwinApp()->config()->group("Windows");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("ClickRaise", clickRaise);
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -1582,7 +1582,7 @@ void PointerInputTest::testResizeCursor()
|
|||
// this test verifies that the cursor has correct shape during resize operation
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAll3", "Resize");
|
||||
group.sync();
|
||||
|
@ -1669,7 +1669,7 @@ void PointerInputTest::testMoveCursor()
|
|||
// this test verifies that the cursor has correct shape during move operation
|
||||
|
||||
// first modify the config for this run
|
||||
KConfigGroup group = kwinApp()->config()->group("MouseBindings");
|
||||
KConfigGroup group = kwinApp()->config()->group(QStringLiteral("MouseBindings"));
|
||||
group.writeEntry("CommandAllKey", "Meta");
|
||||
group.writeEntry("CommandAll1", "Move");
|
||||
group.sync();
|
||||
|
|
|
@ -91,7 +91,7 @@ void QuickTilingTest::initTestCase()
|
|||
|
||||
// set custom config which disables the Outline
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup group = config->group("Outline");
|
||||
KConfigGroup group = config->group(QStringLiteral("Outline"));
|
||||
group.writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
group.sync();
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void ScreenEdgesTest::testTouchCallback()
|
|||
// This test verifies that touch screen edges trigger associated callbacks.
|
||||
|
||||
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
auto group = config->group("TouchEdges");
|
||||
auto group = config->group(QStringLiteral("TouchEdges"));
|
||||
group.writeEntry("Top", "none");
|
||||
group.writeEntry("Left", "none");
|
||||
group.writeEntry("Bottom", "none");
|
||||
|
@ -223,7 +223,7 @@ void ScreenEdgesTest::testPushBack()
|
|||
|
||||
QFETCH(int, pushback);
|
||||
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
config->group("Windows").writeEntry("ElectricBorderPushbackPixels", pushback);
|
||||
config->group(QStringLiteral("Windows")).writeEntry("ElectricBorderPushbackPixels", pushback);
|
||||
config->sync();
|
||||
|
||||
auto s = workspace()->screenEdges();
|
||||
|
|
|
@ -106,7 +106,7 @@ void ScreensTest::testCurrent()
|
|||
Output *output = workspace()->outputs().at(currentId);
|
||||
|
||||
// Disable "active screen follows mouse"
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("ActiveMouseScreen", false);
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -130,7 +130,7 @@ void ScreensTest::testCurrentWithFollowsMouse_data()
|
|||
void ScreensTest::testCurrentWithFollowsMouse()
|
||||
{
|
||||
// Enable "active screen follows mouse"
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("ActiveMouseScreen", true);
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
@ -164,7 +164,7 @@ void ScreensTest::testCurrentPoint()
|
|||
Test::setOutputConfig(geometries);
|
||||
|
||||
// Disable "active screen follows mouse"
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("ActiveMouseScreen", false);
|
||||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
|
|
@ -62,8 +62,8 @@ void ScreenEdgeTest::initTestCase()
|
|||
}
|
||||
|
||||
// disable electric border pushback
|
||||
config->group("Windows").writeEntry("ElectricBorderPushbackPixels", 0);
|
||||
config->group("TabBox").writeEntry("TouchBorderActivate", int(ElectricNone));
|
||||
config->group(QStringLiteral("Windows")).writeEntry("ElectricBorderPushbackPixels", 0);
|
||||
config->group(QStringLiteral("TabBox")).writeEntry("TouchBorderActivate", int(ElectricNone));
|
||||
|
||||
config->sync();
|
||||
kwinApp()->setConfig(config);
|
||||
|
|
|
@ -60,7 +60,7 @@ void StrutsTest::initTestCase()
|
|||
|
||||
// set custom config which disables the Outline
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup group = config->group("Outline");
|
||||
KConfigGroup group = config->group(QStringLiteral("Outline"));
|
||||
group.writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
group.sync();
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ void TabBoxTest::initTestCase()
|
|||
});
|
||||
|
||||
KSharedConfigPtr c = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
c->group("TabBox").writeEntry("ShowTabBox", false);
|
||||
c->group(QStringLiteral("TabBox")).writeEntry("ShowTabBox", false);
|
||||
c->sync();
|
||||
kwinApp()->setConfig(c);
|
||||
qputenv("KWIN_XKB_DEFAULT_KEYMAP", "1");
|
||||
|
|
|
@ -279,7 +279,7 @@ void TouchInputTest::testUpdateFocusOnDecorationDestroy()
|
|||
QSignalSpy sequenceEndedSpy(m_touch, &KWayland::Client::Touch::sequenceEnded);
|
||||
|
||||
// Enable the borderless maximized windows option.
|
||||
auto group = kwinApp()->config()->group("Windows");
|
||||
auto group = kwinApp()->config()->group(QStringLiteral("Windows"));
|
||||
group.writeEntry("BorderlessMaximizedWindows", true);
|
||||
group.sync();
|
||||
Workspace::self()->slotReconfigure();
|
||||
|
|
|
@ -135,9 +135,9 @@ void WindowRuleTest::testApplyInitialMaximizeVert()
|
|||
void WindowRuleTest::testWindowClassChange()
|
||||
{
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
config->group("General").writeEntry("count", 1);
|
||||
config->group(QStringLiteral("General")).writeEntry("count", 1);
|
||||
|
||||
auto group = config->group("1");
|
||||
auto group = config->group(QStringLiteral("1"));
|
||||
group.writeEntry("above", true);
|
||||
group.writeEntry("aboverule", 2);
|
||||
group.writeEntry("wmclass", "org.kde.foo");
|
||||
|
|
|
@ -278,8 +278,8 @@ template<typename T>
|
|||
void TestXdgShellWindowRules::setWindowRule(const QString &property, const T &value, int policy)
|
||||
{
|
||||
// Initialize RuleBook with the test rule.
|
||||
m_config->group("General").writeEntry("count", 1);
|
||||
KConfigGroup group = m_config->group("1");
|
||||
m_config->group(QStringLiteral("General")).writeEntry("count", 1);
|
||||
KConfigGroup group = m_config->group(QStringLiteral("1"));
|
||||
|
||||
group.writeEntry(property, value);
|
||||
group.writeEntry(QStringLiteral("%1rule").arg(property), policy);
|
||||
|
|
|
@ -43,7 +43,7 @@ void XwaylandServerCrashTest::initTestCase()
|
|||
});
|
||||
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup xwaylandGroup = config->group("Xwayland");
|
||||
KConfigGroup xwaylandGroup = config->group(QStringLiteral("Xwayland"));
|
||||
xwaylandGroup.writeEntry(QStringLiteral("XwaylandCrashPolicy"), QStringLiteral("Stop"));
|
||||
xwaylandGroup.sync();
|
||||
kwinApp()->setConfig(config);
|
||||
|
|
|
@ -41,7 +41,7 @@ void XwaylandServerRestartTest::initTestCase()
|
|||
});
|
||||
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||
KConfigGroup xwaylandGroup = config->group("Xwayland");
|
||||
KConfigGroup xwaylandGroup = config->group(QStringLiteral("Xwayland"));
|
||||
xwaylandGroup.writeEntry(QStringLiteral("XwaylandCrashPolicy"), QStringLiteral("Restart"));
|
||||
xwaylandGroup.sync();
|
||||
kwinApp()->setConfig(config);
|
||||
|
|
|
@ -40,7 +40,7 @@ void OnScreenNotificationTest::show()
|
|||
{
|
||||
OnScreenNotification notification;
|
||||
auto config = KSharedConfig::openConfig(QString(), KSharedConfig::SimpleConfig);
|
||||
KConfigGroup group = config->group("OnScreenNotification");
|
||||
KConfigGroup group = config->group(QStringLiteral("OnScreenNotification"));
|
||||
group.writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
|
||||
group.sync();
|
||||
notification.setConfig(config);
|
||||
|
|
|
@ -605,12 +605,12 @@ void TestVirtualDesktops::load()
|
|||
vds->load();
|
||||
QCOMPARE(vds->count(), (uint)1);
|
||||
// setting a sensible number
|
||||
config->group("Desktops").writeEntry("Number", 4);
|
||||
config->group(QStringLiteral("Desktops")).writeEntry("Number", 4);
|
||||
vds->load();
|
||||
QCOMPARE(vds->count(), (uint)4);
|
||||
|
||||
// setting the config value and reloading should update
|
||||
config->group("Desktops").writeEntry("Number", 5);
|
||||
config->group(QStringLiteral("Desktops")).writeEntry("Number", 5);
|
||||
vds->load();
|
||||
QCOMPARE(vds->count(), (uint)5);
|
||||
}
|
||||
|
@ -625,10 +625,10 @@ void TestVirtualDesktops::save()
|
|||
vds->setConfig(config);
|
||||
|
||||
// now save should create the group "Desktops"
|
||||
QCOMPARE(config->hasGroup("Desktops"), false);
|
||||
QCOMPARE(config->hasGroup(QStringLiteral("Desktops")), false);
|
||||
vds->save();
|
||||
QCOMPARE(config->hasGroup("Desktops"), true);
|
||||
KConfigGroup desktops = config->group("Desktops");
|
||||
QCOMPARE(config->hasGroup(QStringLiteral("Desktops")), true);
|
||||
KConfigGroup desktops = config->group(QStringLiteral("Desktops"));
|
||||
QCOMPARE(desktops.readEntry<int>("Number", 1), 4);
|
||||
QCOMPARE(desktops.hasKey("Name_1"), false);
|
||||
QCOMPARE(desktops.hasKey("Name_2"), false);
|
||||
|
|
|
@ -29,9 +29,9 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
KConfig src_cfg(file);
|
||||
KConfig dest_cfg("kwinrulesrc", KConfig::NoGlobals);
|
||||
KConfigGroup scg(&src_cfg, "General");
|
||||
KConfigGroup dcg(&dest_cfg, "General");
|
||||
KConfig dest_cfg(QStringLiteral("kwinrulesrc"), KConfig::NoGlobals);
|
||||
KConfigGroup scg(&src_cfg, QStringLiteral("General"));
|
||||
KConfigGroup dcg(&dest_cfg, QStringLiteral("General"));
|
||||
int count = scg.readEntry("count", 0);
|
||||
int pos = dcg.readEntry("count", 0);
|
||||
for (int group = 1;
|
||||
|
|
|
@ -81,7 +81,7 @@ void Activities::slotRemoved(const QString &activity)
|
|||
window->setOnActivity(activity, false);
|
||||
}
|
||||
// toss out any session data for it
|
||||
KConfigGroup cg(KSharedConfig::openConfig(), QByteArray("SubSession: ").append(activity.toUtf8()).constData());
|
||||
KConfigGroup cg(KSharedConfig::openConfig(), QLatin1String("SubSession: ") + activity);
|
||||
cg.deleteGroup();
|
||||
}
|
||||
|
||||
|
|
|
@ -661,22 +661,22 @@ void Connection::applyScreenToDevice(Device *device)
|
|||
|
||||
void Connection::applyDeviceConfig(Device *device)
|
||||
{
|
||||
KConfigGroup defaults = m_config->group("Libinput").group("Defaults");
|
||||
KConfigGroup defaults = m_config->group(QStringLiteral("Libinput")).group(QStringLiteral("Defaults"));
|
||||
if (defaults.isValid()) {
|
||||
if (device->isAlphaNumericKeyboard() && defaults.hasGroup("Keyboard")) {
|
||||
defaults = defaults.group("Keyboard");
|
||||
} else if (device->isTouchpad() && defaults.hasGroup("Touchpad")) {
|
||||
if (device->isAlphaNumericKeyboard() && defaults.hasGroup(QStringLiteral("Keyboard"))) {
|
||||
defaults = defaults.group(QStringLiteral("Keyboard"));
|
||||
} else if (device->isTouchpad() && defaults.hasGroup(QStringLiteral("Touchpad"))) {
|
||||
// A Touchpad is a Pointer, so we need to check for it before Pointer.
|
||||
defaults = defaults.group("Touchpad");
|
||||
} else if (device->isPointer() && defaults.hasGroup("Pointer")) {
|
||||
defaults = defaults.group("Pointer");
|
||||
defaults = defaults.group(QStringLiteral("Touchpad"));
|
||||
} else if (device->isPointer() && defaults.hasGroup(QStringLiteral("Pointer"))) {
|
||||
defaults = defaults.group(QStringLiteral("Pointer"));
|
||||
}
|
||||
|
||||
device->setDefaultConfig(defaults);
|
||||
}
|
||||
|
||||
// pass configuration to Device
|
||||
device->setConfig(m_config->group("Libinput").group(QString::number(device->vendor())).group(QString::number(device->product())).group(device->name()));
|
||||
device->setConfig(m_config->group(QStringLiteral("Libinput")).group(QString::number(device->vendor())).group(QString::number(device->product())).group(device->name()));
|
||||
device->loadConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ X11Compositor *X11Compositor::self()
|
|||
|
||||
bool X11Compositor::openGLCompositingIsBroken() const
|
||||
{
|
||||
auto timestamp = KConfigGroup(kwinApp()->config(), "Compositing").readEntry(QLatin1String("LastFailureTimestamp"), 0);
|
||||
auto timestamp = KConfigGroup(kwinApp()->config(), QStringLiteral("Compositing")).readEntry(QLatin1String("LastFailureTimestamp"), 0);
|
||||
if (timestamp > 0) {
|
||||
if (QDateTime::currentSecsSinceEpoch() - timestamp < 60) {
|
||||
return true;
|
||||
|
@ -508,7 +508,7 @@ bool X11Compositor::openGLCompositingIsBroken() const
|
|||
QString X11Compositor::compositingNotPossibleReason() const
|
||||
{
|
||||
// first off, check whether we figured that we'll crash on detection because of a buggy driver
|
||||
KConfigGroup gl_workaround_group(kwinApp()->config(), "Compositing");
|
||||
KConfigGroup gl_workaround_group(kwinApp()->config(), QStringLiteral("Compositing"));
|
||||
if (gl_workaround_group.readEntry("Backend", "OpenGL") == QLatin1String("OpenGL") && openGLCompositingIsBroken()) {
|
||||
return i18n("<b>OpenGL compositing (the default) has crashed KWin in the past.</b><br>"
|
||||
"This was most likely due to a driver bug."
|
||||
|
@ -528,7 +528,7 @@ QString X11Compositor::compositingNotPossibleReason() const
|
|||
bool X11Compositor::compositingPossible() const
|
||||
{
|
||||
// first off, check whether we figured that we'll crash on detection because of a buggy driver
|
||||
KConfigGroup gl_workaround_group(kwinApp()->config(), "Compositing");
|
||||
KConfigGroup gl_workaround_group(kwinApp()->config(), QStringLiteral("Compositing"));
|
||||
if (gl_workaround_group.readEntry("Backend", "OpenGL") == QLatin1String("OpenGL") && openGLCompositingIsBroken()) {
|
||||
qCWarning(KWIN_CORE) << "Compositing disabled: video driver seems unstable. If you think it's a false positive, please try again in a few minutes.";
|
||||
return false;
|
||||
|
@ -556,7 +556,7 @@ bool X11Compositor::compositingPossible() const
|
|||
|
||||
void X11Compositor::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
||||
{
|
||||
auto group = KConfigGroup(kwinApp()->config(), "Compositing");
|
||||
auto group = KConfigGroup(kwinApp()->config(), QStringLiteral("Compositing"));
|
||||
switch (safePoint) {
|
||||
case OpenGLSafePoint::PreInit:
|
||||
// Explicitly write the failure timestamp so that if we crash during
|
||||
|
@ -580,7 +580,7 @@ void X11Compositor::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
|||
connect(
|
||||
m_openGLFreezeProtection.get(), &QTimer::timeout, m_openGLFreezeProtection.get(),
|
||||
[configName] {
|
||||
auto group = KConfigGroup(KSharedConfig::openConfig(configName), "Compositing");
|
||||
auto group = KConfigGroup(KSharedConfig::openConfig(configName), QStringLiteral("Compositing"));
|
||||
group.writeEntry(QLatin1String("LastFailureTimestamp"), QDateTime::currentSecsSinceEpoch());
|
||||
group.sync();
|
||||
KCrash::setDrKonqiEnabled(false);
|
||||
|
|
|
@ -242,7 +242,7 @@ bool Output::directScanoutInhibited() const
|
|||
std::chrono::milliseconds Output::dimAnimationTime()
|
||||
{
|
||||
// See kscreen.kcfg
|
||||
return std::chrono::milliseconds(KSharedConfig::openConfig()->group("Effect-Kscreen").readEntry("Duration", 250));
|
||||
return std::chrono::milliseconds(KSharedConfig::openConfig()->group(QStringLiteral("Effect-Kscreen")).readEntry("Duration", 250));
|
||||
}
|
||||
|
||||
QRect Output::mapFromGlobal(const QRect &rect) const
|
||||
|
|
|
@ -147,7 +147,7 @@ void Cursor::loadThemeSettings()
|
|||
|
||||
void Cursor::loadThemeFromKConfig()
|
||||
{
|
||||
KConfigGroup mousecfg(kwinApp()->inputConfig(), "Mouse");
|
||||
KConfigGroup mousecfg(kwinApp()->inputConfig(), QStringLiteral("Mouse"));
|
||||
const QString themeName = mousecfg.readEntry("cursorTheme", defaultThemeName());
|
||||
const uint themeSize = mousecfg.readEntry("cursorSize", defaultThemeSize());
|
||||
updateTheme(themeName, themeSize);
|
||||
|
|
|
@ -26,7 +26,7 @@ DpmsInputEventFilter::DpmsInputEventFilter()
|
|||
: InputEventFilter()
|
||||
{
|
||||
KSharedConfig::Ptr kwinSettings = kwinApp()->config();
|
||||
m_enableDoubleTap = kwinSettings->group("Wayland").readEntry<bool>("DoubleTapWakeup", true);
|
||||
m_enableDoubleTap = kwinSettings->group(QStringLiteral("Wayland")).readEntry<bool>("DoubleTapWakeup", true);
|
||||
if (Session *session = kwinApp()->outputBackend()->session()) {
|
||||
connect(session, &Session::awoke, this, &DpmsInputEventFilter::notify);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ static std::vector<quint32> textToKey(const QString &text)
|
|||
|
||||
InputMethod::InputMethod()
|
||||
{
|
||||
m_enabled = kwinApp()->config()->group("Wayland").readEntry("VirtualKeyboardEnabled", true);
|
||||
m_enabled = kwinApp()->config()->group(QStringLiteral("Wayland")).readEntry("VirtualKeyboardEnabled", true);
|
||||
// this is actually too late. Other processes are started before init,
|
||||
// so might miss the availability of text input
|
||||
// but without Workspace we don't have the window listed at all
|
||||
|
@ -487,7 +487,7 @@ void InputMethod::setEnabled(bool enabled)
|
|||
startInputMethod();
|
||||
}
|
||||
// save value into config
|
||||
kwinApp()->config()->group("Wayland").writeEntry("VirtualKeyboardEnabled", m_enabled);
|
||||
kwinApp()->config()->group(QStringLiteral("Wayland")).writeEntry("VirtualKeyboardEnabled", m_enabled);
|
||||
kwinApp()->config()->sync();
|
||||
}
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ void EffectsModel::loadPluginEffects(const KConfigGroup &kwinConfig)
|
|||
|
||||
void EffectsModel::load(LoadOptions options)
|
||||
{
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), "Plugins");
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), QStringLiteral("Plugins"));
|
||||
|
||||
m_pendingEffects.clear();
|
||||
loadBuiltInEffects(kwinConfig);
|
||||
|
@ -483,7 +483,7 @@ void EffectsModel::updateEffectStatus(const QModelIndex &rowIndex, Status effect
|
|||
|
||||
void EffectsModel::save()
|
||||
{
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), "Plugins");
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), QStringLiteral("Plugins"));
|
||||
|
||||
QList<EffectData> dirtyEffects;
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ void KWinCompositingKCM::save()
|
|||
KCModule::save();
|
||||
|
||||
// This clears up old entries that are now migrated to kdeglobals
|
||||
KConfig("kwinrc", KConfig::NoGlobals).group("KDE").revertToDefault("AnimationDurationFactor");
|
||||
KConfig("kwinrc", KConfig::NoGlobals).group(QStringLiteral("KDE")).revertToDefault("AnimationDurationFactor");
|
||||
|
||||
// Send signal to all kwin instances
|
||||
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/Compositor"),
|
||||
|
|
|
@ -156,7 +156,7 @@ bool AnimationsModel::isDefaults() const
|
|||
|
||||
bool AnimationsModel::needsSave() const
|
||||
{
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), "Plugins");
|
||||
KConfigGroup kwinConfig(KSharedConfig::openConfig("kwinrc"), QStringLiteral("Plugins"));
|
||||
|
||||
for (int i = 0; i < rowCount(); ++i) {
|
||||
const QModelIndex index_ = index(i, 0);
|
||||
|
|
|
@ -163,7 +163,7 @@ void KWinScreenEdgesConfig::monitorInit()
|
|||
m_form->monitorAddItem(i18n("Toggle window switching"));
|
||||
m_form->monitorAddItem(i18n("Toggle alternative window switching"));
|
||||
|
||||
KConfigGroup config(m_config, "Plugins");
|
||||
KConfigGroup config(m_config, QStringLiteral("Plugins"));
|
||||
const auto effects = listBuiltinEffects() << listScriptedEffects();
|
||||
|
||||
for (const KPluginMetaData &effect : effects) {
|
||||
|
@ -309,7 +309,7 @@ void KWinScreenEdgesConfig::monitorSaveSettings()
|
|||
void KWinScreenEdgesConfig::monitorShowEvent()
|
||||
{
|
||||
// Check if they are enabled
|
||||
KConfigGroup config(m_config, "Plugins");
|
||||
KConfigGroup config(m_config, QStringLiteral("Plugins"));
|
||||
|
||||
// Present Windows
|
||||
bool enabled = config.readEntry("windowviewEnabled", true);
|
||||
|
@ -317,7 +317,7 @@ void KWinScreenEdgesConfig::monitorShowEvent()
|
|||
m_form->monitorItemSetEnabled(PresentWindowsAll, enabled);
|
||||
|
||||
// tabbox, depends on reasonable focus policy.
|
||||
KConfigGroup config2(m_config, "Windows");
|
||||
KConfigGroup config2(m_config, QStringLiteral("Windows"));
|
||||
QString focusPolicy = config2.readEntry("FocusPolicy", QString());
|
||||
bool reasonable = focusPolicy != "FocusStrictlyUnderMouse" && focusPolicy != "FocusUnderMouse";
|
||||
m_form->monitorItemSetEnabled(TabBox, reasonable);
|
||||
|
|
|
@ -130,7 +130,7 @@ void KWinScreenEdgesConfig::monitorInit()
|
|||
m_form->monitorAddItem(i18n("Toggle window switching"));
|
||||
m_form->monitorAddItem(i18n("Toggle alternative window switching"));
|
||||
|
||||
KConfigGroup config(m_config, "Plugins");
|
||||
KConfigGroup config(m_config, QStringLiteral("Plugins"));
|
||||
const auto effects = KPackage::PackageLoader::self()->listPackages(QStringLiteral("KWin/Script"), QStringLiteral("kwin/builtin-effects/")) << KPackage::PackageLoader::self()->listPackages(QStringLiteral("KWin/Script"), QStringLiteral("kwin/effects/"));
|
||||
|
||||
for (const KPluginMetaData &effect : effects) {
|
||||
|
@ -257,7 +257,7 @@ void KWinScreenEdgesConfig::monitorSaveSettings()
|
|||
void KWinScreenEdgesConfig::monitorShowEvent()
|
||||
{
|
||||
// Check if they are enabled
|
||||
KConfigGroup config(m_config, "Plugins");
|
||||
KConfigGroup config(m_config, QStringLiteral("Plugins"));
|
||||
|
||||
// Present Windows
|
||||
bool enabled = config.readEntry("windowviewEnabled", true);
|
||||
|
@ -265,7 +265,7 @@ void KWinScreenEdgesConfig::monitorShowEvent()
|
|||
m_form->monitorItemSetEnabled(PresentWindowsAll, enabled);
|
||||
|
||||
// tabbox, depends on reasonable focus policy.
|
||||
KConfigGroup config2(m_config, "Windows");
|
||||
KConfigGroup config2(m_config, QStringLiteral("Windows"));
|
||||
QString focusPolicy = config2.readEntry("FocusPolicy", QString());
|
||||
bool reasonable = focusPolicy != "FocusStrictlyUnderMouse" && focusPolicy != "FocusUnderMouse";
|
||||
m_form->monitorItemSetEnabled(TabBox, reasonable);
|
||||
|
|
|
@ -27,7 +27,7 @@ QList<KPluginMetaData> KWinScriptsData::pluginMetaDataList() const
|
|||
bool KWinScriptsData::isDefaults() const
|
||||
{
|
||||
QList<KPluginMetaData> plugins = pluginMetaDataList();
|
||||
KConfigGroup cfgGroup(m_kwinConfig, "Plugins");
|
||||
KConfigGroup cfgGroup(m_kwinConfig, QStringLiteral("Plugins"));
|
||||
for (auto &plugin : plugins) {
|
||||
if (cfgGroup.readEntry(plugin.pluginId() + QLatin1String("Enabled"), plugin.isEnabledByDefault()) != plugin.isEnabledByDefault()) {
|
||||
return false;
|
||||
|
|
|
@ -36,7 +36,7 @@ Module::Module(QObject *parent, const KPluginMetaData &data)
|
|||
connect(m_model, &KPluginModel::defaulted, this, [this](bool defaulted) {
|
||||
setRepresentsDefaults(defaulted);
|
||||
});
|
||||
m_model->setConfig(KSharedConfig::openConfig("kwinrc")->group("Plugins"));
|
||||
m_model->setConfig(KSharedConfig::openConfig("kwinrc")->group(QStringLiteral("Plugins")));
|
||||
}
|
||||
|
||||
void Module::onGHNSEntriesChanged()
|
||||
|
|
|
@ -97,7 +97,7 @@ KWinTabBoxConfig::KWinTabBoxConfig(QObject *parent, const KPluginMetaData &data)
|
|||
createConnections(m_alternativeTabBoxUi);
|
||||
|
||||
// check focus policy - we don't offer configs for unreasonable focus policies
|
||||
KConfigGroup config(m_config, "Windows");
|
||||
KConfigGroup config(m_config, QStringLiteral("Windows"));
|
||||
QString policy = config.readEntry("FocusPolicy", "ClickToFocus");
|
||||
if ((policy == "FocusUnderMouse") || (policy == "FocusStrictlyUnderMouse")) {
|
||||
tabWidget->setEnabled(false);
|
||||
|
@ -129,8 +129,8 @@ static QList<KPackage::Package> availableLnFPackages()
|
|||
pkg.setFallbackPackage(KPackage::Package());
|
||||
if (!pkg.filePath("defaults").isEmpty()) {
|
||||
KSharedConfigPtr conf = KSharedConfig::openConfig(pkg.filePath("defaults"));
|
||||
KConfigGroup cg = KConfigGroup(conf, "kwinrc");
|
||||
cg = KConfigGroup(&cg, "WindowSwitcher");
|
||||
KConfigGroup cg = KConfigGroup(conf, QStringLiteral("kwinrc"));
|
||||
cg = KConfigGroup(&cg, QStringLiteral("WindowSwitcher"));
|
||||
if (!cg.readEntry("LayoutName", QString()).isEmpty()) {
|
||||
packages << pkg;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace KWin
|
|||
KeyboardLayout::KeyboardLayout(Xkb *xkb, const KSharedConfigPtr &config)
|
||||
: QObject()
|
||||
, m_xkb(xkb)
|
||||
, m_configGroup(config->group("Layout"))
|
||||
, m_configGroup(config->group(QStringLiteral("Layout")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ void KeyboardLayout::init()
|
|||
KGlobalAccel::self()->setShortcut(switchLastUsedKeyboardAction, QList<QKeySequence>({sequenceLastUsed}));
|
||||
|
||||
connect(switchLastUsedKeyboardAction, &QAction::triggered, this, &KeyboardLayout::switchToLastUsedLayout);
|
||||
|
||||
|
||||
QDBusConnection::sessionBus().connect(QString(),
|
||||
QStringLiteral("/Layouts"),
|
||||
QStringLiteral("org.kde.keyboard"),
|
||||
|
|
|
@ -392,12 +392,12 @@ void Application::setXwaylandScale(qreal scale)
|
|||
void Application::applyXwaylandScale()
|
||||
{
|
||||
KConfig cfg(QStringLiteral("kdeglobals"));
|
||||
KConfigGroup kscreenGroup = cfg.group("KScreen");
|
||||
KConfigGroup kscreenGroup = cfg.group(QStringLiteral("KScreen"));
|
||||
const bool xwaylandClientsScale = kscreenGroup.readEntry("XwaylandClientsScale", true);
|
||||
if (xwaylandClientsScale) {
|
||||
kwinApp()->config()->group("Xwayland").writeEntry("Scale", m_xwaylandScale, KConfig::Notify);
|
||||
kwinApp()->config()->group(QStringLiteral("Xwayland")).writeEntry("Scale", m_xwaylandScale, KConfig::Notify);
|
||||
} else {
|
||||
kwinApp()->config()->group("Xwayland").deleteEntry("Scale", KConfig::Notify);
|
||||
kwinApp()->config()->group(QStringLiteral("Xwayland")).deleteEntry("Scale", KConfig::Notify);
|
||||
}
|
||||
if (x11Connection()) {
|
||||
// rerun the fonts kcm init that does the appropriate xrdb call with the new settings
|
||||
|
|
|
@ -134,7 +134,7 @@ void ApplicationWayland::performStartup()
|
|||
{
|
||||
if (m_startXWayland) {
|
||||
setOperationMode(OperationModeXwayland);
|
||||
setXwaylandScale(config()->group("Xwayland").readEntry("Scale", 1.0));
|
||||
setXwaylandScale(config()->group(QStringLiteral("Xwayland")).readEntry("Scale", 1.0));
|
||||
}
|
||||
createOptions();
|
||||
|
||||
|
@ -191,7 +191,7 @@ void ApplicationWayland::startSession()
|
|||
if (!m_inputMethodServerToStart.isEmpty()) {
|
||||
kwinApp()->inputMethod()->setInputMethodCommand(m_inputMethodServerToStart);
|
||||
} else {
|
||||
refreshSettings(kwinSettings->group("Wayland"), {"InputMethod"});
|
||||
refreshSettings(kwinSettings->group(QStringLiteral("Wayland")), {"InputMethod"});
|
||||
}
|
||||
|
||||
// start session
|
||||
|
|
|
@ -686,14 +686,14 @@ void Options::loadConfig()
|
|||
syncFromKcfgc();
|
||||
|
||||
// Electric borders
|
||||
KConfigGroup config(m_settings->config(), "Windows");
|
||||
KConfigGroup config(m_settings->config(), QStringLiteral("Windows"));
|
||||
OpTitlebarDblClick = windowOperation(config.readEntry("TitlebarDoubleClickCommand", "Maximize"), true);
|
||||
setOperationMaxButtonLeftClick(windowOperation(config.readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true));
|
||||
setOperationMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true));
|
||||
setOperationMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true));
|
||||
|
||||
// Mouse bindings
|
||||
config = KConfigGroup(m_settings->config(), "MouseBindings");
|
||||
config = KConfigGroup(m_settings->config(), QStringLiteral("MouseBindings"));
|
||||
// TODO: add properties for missing options
|
||||
CmdTitlebarWheel = mouseWheelCommand(config.readEntry("CommandTitlebarWheel", "Nothing"));
|
||||
CmdAllModKey = (config.readEntry("CommandAllKey", "Meta") == QStringLiteral("Meta")) ? Qt::Key_Meta : Qt::Key_Alt;
|
||||
|
@ -713,7 +713,7 @@ void Options::loadConfig()
|
|||
setCommandAll3(mouseCommand(config.readEntry("CommandAll3", "Resize"), false));
|
||||
|
||||
// Modifier Only Shortcuts
|
||||
config = KConfigGroup(m_settings->config(), "ModifierOnlyShortcuts");
|
||||
config = KConfigGroup(m_settings->config(), QStringLiteral("ModifierOnlyShortcuts"));
|
||||
m_modifierOnlyShortcuts.clear();
|
||||
if (config.hasKey("Shift")) {
|
||||
m_modifierOnlyShortcuts.insert(Qt::ShiftModifier, config.readEntry("Shift", QStringList()));
|
||||
|
@ -727,7 +727,7 @@ void Options::loadConfig()
|
|||
m_modifierOnlyShortcuts.insert(Qt::MetaModifier, config.readEntry("Meta", QStringList{QStringLiteral("org.kde.plasmashell"), QStringLiteral("/PlasmaShell"), QStringLiteral("org.kde.PlasmaShell"), QStringLiteral("activateLauncherMenu")}));
|
||||
|
||||
// Compositing
|
||||
config = KConfigGroup(m_settings->config(), "Compositing");
|
||||
config = KConfigGroup(m_settings->config(), QStringLiteral("Compositing"));
|
||||
bool useCompositing = false;
|
||||
CompositingType compositingMode = NoCompositing;
|
||||
QString compositingBackend = config.readEntry("Backend", "OpenGL");
|
||||
|
|
|
@ -147,7 +147,7 @@ void ButtonRebindsFilter::loadConfig(const KConfigGroup &group)
|
|||
|
||||
bool foundActions = false;
|
||||
const auto mouseButtonEnum = QMetaEnum::fromType<Qt::MouseButtons>();
|
||||
const auto mouseGroup = group.group("Mouse");
|
||||
const auto mouseGroup = group.group(QStringLiteral("Mouse"));
|
||||
static constexpr auto maximumQtExtraButton = 24;
|
||||
for (int i = 1; i <= maximumQtExtraButton; ++i) {
|
||||
const QByteArray buttonName = QByteArray("ExtraButton") + QByteArray::number(i);
|
||||
|
@ -159,7 +159,7 @@ void ButtonRebindsFilter::loadConfig(const KConfigGroup &group)
|
|||
}
|
||||
}
|
||||
|
||||
const auto tabletsGroup = group.group("Tablet");
|
||||
const auto tabletsGroup = group.group(QStringLiteral("Tablet"));
|
||||
const auto tablets = tabletsGroup.groupList();
|
||||
for (const auto &tabletName : tablets) {
|
||||
const auto tabletGroup = tabletsGroup.group(tabletName);
|
||||
|
@ -175,7 +175,7 @@ void ButtonRebindsFilter::loadConfig(const KConfigGroup &group)
|
|||
}
|
||||
}
|
||||
|
||||
const auto tabletToolsGroup = group.group("TabletTool");
|
||||
const auto tabletToolsGroup = group.group(QStringLiteral("TabletTool"));
|
||||
const auto tabletTools = tabletToolsGroup.groupList();
|
||||
for (const auto &tabletToolName : tabletTools) {
|
||||
const auto toolGroup = tabletToolsGroup.group(tabletToolName);
|
||||
|
|
|
@ -76,7 +76,7 @@ ThemeConfig::ThemeConfig()
|
|||
|
||||
void ThemeConfig::load(const KConfig &conf)
|
||||
{
|
||||
KConfigGroup general(&conf, "General");
|
||||
KConfigGroup general(&conf, QStringLiteral("General"));
|
||||
m_activeTextColor = general.readEntry("ActiveTextColor", defaultActiveTextColor());
|
||||
m_inactiveTextColor = general.readEntry("InactiveTextColor", defaultInactiveTextColor());
|
||||
m_activeFocusedTextColor = general.readEntry("ActiveFocusedTabColor", m_activeTextColor);
|
||||
|
|
|
@ -134,10 +134,10 @@ bool StartupFeedbackEffect::supported()
|
|||
|
||||
void StartupFeedbackEffect::reconfigure(Effect::ReconfigureFlags flags)
|
||||
{
|
||||
KConfigGroup c = m_configWatcher->config()->group("FeedbackStyle");
|
||||
KConfigGroup c = m_configWatcher->config()->group(QStringLiteral("FeedbackStyle"));
|
||||
const bool busyCursor = c.readEntry("BusyCursor", true);
|
||||
|
||||
c = m_configWatcher->config()->group("BusyCursorSettings");
|
||||
c = m_configWatcher->config()->group(QStringLiteral("BusyCursorSettings"));
|
||||
m_timeout = std::chrono::seconds(c.readEntry("Timeout", s_startupDefaultTimeout));
|
||||
m_startupInfo->setTimeout(m_timeout.count());
|
||||
const bool busyBlinking = c.readEntry("Blinking", false);
|
||||
|
@ -311,7 +311,7 @@ void StartupFeedbackEffect::start(const Startup &startup)
|
|||
m_active = true;
|
||||
|
||||
// read details about the mouse-cursor theme define per default
|
||||
KConfigGroup mousecfg(effects->inputConfig(), "Mouse");
|
||||
KConfigGroup mousecfg(effects->inputConfig(), QStringLiteral("Mouse"));
|
||||
m_cursorSize = mousecfg.readEntry("cursorSize", 24);
|
||||
|
||||
int iconSize = m_cursorSize / 1.5;
|
||||
|
|
|
@ -818,11 +818,11 @@ void ScreenEdges::reconfigure()
|
|||
if (!m_config) {
|
||||
return;
|
||||
}
|
||||
KConfigGroup screenEdgesConfig = m_config->group("ScreenEdges");
|
||||
KConfigGroup screenEdgesConfig = m_config->group(QStringLiteral("ScreenEdges"));
|
||||
setRemainActiveOnFullscreen(screenEdgesConfig.readEntry("RemainActiveOnFullscreen", false));
|
||||
|
||||
// TODO: migrate settings to a group ScreenEdges
|
||||
KConfigGroup windowsConfig = m_config->group("Windows");
|
||||
KConfigGroup windowsConfig = m_config->group(QStringLiteral("Windows"));
|
||||
setTimeThreshold(windowsConfig.readEntry("ElectricBorderDelay", 150));
|
||||
setReActivationThreshold(std::max(timeThreshold() + 50, windowsConfig.readEntry("ElectricBorderCooldown", 350)));
|
||||
int desktopSwitching = windowsConfig.readEntry("ElectricBorders", static_cast<int>(ElectricDisabled));
|
||||
|
@ -839,7 +839,7 @@ void ScreenEdges::reconfigure()
|
|||
const int pushBack = windowsConfig.readEntry("ElectricBorderPushbackPixels", 1);
|
||||
m_cursorPushBackDistance = QSize(pushBack, pushBack);
|
||||
|
||||
KConfigGroup borderConfig = m_config->group("ElectricBorders");
|
||||
KConfigGroup borderConfig = m_config->group(QStringLiteral("ElectricBorders"));
|
||||
setActionForBorder(ElectricTopLeft, &m_actionTopLeft,
|
||||
electricBorderAction(borderConfig.readEntry("TopLeft", "None")));
|
||||
setActionForBorder(ElectricTop, &m_actionTop,
|
||||
|
@ -857,7 +857,7 @@ void ScreenEdges::reconfigure()
|
|||
setActionForBorder(ElectricLeft, &m_actionLeft,
|
||||
electricBorderAction(borderConfig.readEntry("Left", "None")));
|
||||
|
||||
borderConfig = m_config->group("TouchEdges");
|
||||
borderConfig = m_config->group(QStringLiteral("TouchEdges"));
|
||||
setActionForTouchBorder(ElectricTop, electricBorderAction(borderConfig.readEntry("Top", "None")));
|
||||
setActionForTouchBorder(ElectricRight, electricBorderAction(borderConfig.readEntry("Right", "None")));
|
||||
setActionForTouchBorder(ElectricBottom, electricBorderAction(borderConfig.readEntry("Bottom", "None")));
|
||||
|
|
|
@ -705,7 +705,7 @@ LoadScriptList KWin::Scripting::queryScriptsToLoad()
|
|||
} else {
|
||||
s_started = true;
|
||||
}
|
||||
QMap<QString, QString> pluginStates = KConfigGroup(_config, "Plugins").entryMap();
|
||||
QMap<QString, QString> pluginStates = KConfigGroup(_config, QStringLiteral("Plugins")).entryMap();
|
||||
const QString scriptFolder = QStringLiteral("kwin/scripts/");
|
||||
const auto offers = KPackage::PackageLoader::self()->listPackages(QStringLiteral("KWin/Script"), scriptFolder);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ void SessionManager::storeSession(const QString &sessionName, SMSavePhase phase)
|
|||
qCDebug(KWIN_CORE) << "storing session" << sessionName << "in phase" << phase;
|
||||
KConfig *config = sessionConfig(sessionName, QString());
|
||||
|
||||
KConfigGroup cg(config, "Session");
|
||||
KConfigGroup cg(config, QStringLiteral("Session"));
|
||||
int count = 0;
|
||||
int active_client = -1;
|
||||
|
||||
|
@ -228,7 +228,7 @@ void SessionManager::storeSubSession(const QString &name, QSet<QByteArray> sessi
|
|||
void SessionManager::loadSession(const QString &sessionName)
|
||||
{
|
||||
session.clear();
|
||||
KConfigGroup cg(sessionConfig(sessionName, QString()), "Session");
|
||||
KConfigGroup cg(sessionConfig(sessionName, QString()), QStringLiteral("Session"));
|
||||
Q_EMIT loadSessionRequested(sessionName);
|
||||
addSessionInfo(cg);
|
||||
}
|
||||
|
|
|
@ -500,10 +500,10 @@ void TabBox::hide(bool abort)
|
|||
void TabBox::reconfigure()
|
||||
{
|
||||
KSharedConfigPtr c = kwinApp()->config();
|
||||
KConfigGroup config = c->group("TabBox");
|
||||
KConfigGroup config = c->group(QStringLiteral("TabBox"));
|
||||
|
||||
loadConfig(c->group("TabBox"), m_defaultConfig);
|
||||
loadConfig(c->group("TabBoxAlternative"), m_alternativeConfig);
|
||||
loadConfig(c->group(QStringLiteral("TabBox")), m_defaultConfig);
|
||||
loadConfig(c->group(QStringLiteral("TabBoxAlternative")), m_alternativeConfig);
|
||||
|
||||
m_defaultCurrentApplicationConfig = m_defaultConfig;
|
||||
m_defaultCurrentApplicationConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsCurrentApplication);
|
||||
|
@ -924,7 +924,7 @@ void TabBox::CDEWalkThroughWindows(bool forward)
|
|||
Window *nc = c;
|
||||
bool options_traverse_all;
|
||||
{
|
||||
KConfigGroup group(kwinApp()->config(), "TabBox");
|
||||
KConfigGroup group(kwinApp()->config(), QStringLiteral("TabBox"));
|
||||
options_traverse_all = group.readEntry("TraverseAll", false);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ TabletModeManager::TabletModeManager()
|
|||
void KWin::TabletModeManager::refreshSettings()
|
||||
{
|
||||
KSharedConfig::Ptr kwinSettings = kwinApp()->config();
|
||||
KConfigGroup cg = kwinSettings->group("Input");
|
||||
KConfigGroup cg = kwinSettings->group(QStringLiteral("Input"));
|
||||
const QString tabletModeConfig = cg.readPathEntry("TabletMode", QStringLiteral("auto"));
|
||||
const bool oldEffectiveTabletMode = effectiveTabletMode();
|
||||
if (tabletModeConfig == QStringLiteral("on")) {
|
||||
|
|
|
@ -174,7 +174,7 @@ void UserActionsMenu::helperDialog(const QString &message)
|
|||
}
|
||||
if (!type.isEmpty()) {
|
||||
KConfig cfg(QStringLiteral("kwin_dialogsrc"));
|
||||
KConfigGroup cg(&cfg, "Notification Messages"); // Depends on KMessageBox
|
||||
KConfigGroup cg(&cfg, QStringLiteral("Notification Messages")); // Depends on KMessageBox
|
||||
if (!cg.readEntry(type, true)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ void KXcursorThemePrivate::load(const QString &themeName, int size, qreal device
|
|||
loadCursors(dir.filePath(QStringLiteral("cursors")), size, devicePixelRatio);
|
||||
if (inherits.isEmpty()) {
|
||||
const KConfig config(dir.filePath(QStringLiteral("index.theme")), KConfig::NoGlobals);
|
||||
inherits << KConfigGroup(&config, "Icon Theme").readEntry("Inherits", QStringList());
|
||||
inherits << KConfigGroup(&config, QStringLiteral("Icon Theme")).readEntry("Inherits", QStringList());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ bool WaylandServer::init(InitializationFlags flags)
|
|||
new CursorShapeManagerV1Interface(m_display, m_display);
|
||||
|
||||
const auto kwinConfig = kwinApp()->config();
|
||||
if (kwinConfig->group("Wayland").readEntry("EnablePrimarySelection", true)) {
|
||||
if (kwinConfig->group(QStringLiteral("Wayland")).readEntry("EnablePrimarySelection", true)) {
|
||||
new PrimarySelectionDeviceManagerV1Interface(m_display, m_display);
|
||||
}
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ bool Workspace::applyOutputConfiguration(const OutputConfiguration &config, cons
|
|||
updateOutputs(outputOrder);
|
||||
m_outputConfigStore->storeConfig(kwinApp()->outputBackend()->outputs(), m_lidSwitchTracker->isLidClosed(), config, outputOrder);
|
||||
KConfig cfg(QStringLiteral("kdeglobals"));
|
||||
KConfigGroup kscreenGroup = cfg.group("KScreen");
|
||||
KConfigGroup kscreenGroup = cfg.group(QStringLiteral("KScreen"));
|
||||
const bool xwaylandClientsScale = kscreenGroup.readEntry("XwaylandClientsScale", true);
|
||||
if (xwaylandClientsScale && !outputOrder.isEmpty()) {
|
||||
double maxScale = 0;
|
||||
|
|
|
@ -141,7 +141,7 @@ Xkb::~Xkb()
|
|||
|
||||
void Xkb::setConfig(const KSharedConfigPtr &config)
|
||||
{
|
||||
m_configGroup = config->group("Layout");
|
||||
m_configGroup = config->group(QStringLiteral("Layout"));
|
||||
}
|
||||
|
||||
void Xkb::setNumLockConfig(const KSharedConfigPtr &config)
|
||||
|
@ -324,7 +324,7 @@ void Xkb::updateKeymap(xkb_keymap *keymap)
|
|||
if (s_startup || qEnvironmentVariableIsSet("KWIN_FORCE_NUM_LOCK_EVALUATION")) {
|
||||
s_startup = false;
|
||||
if (m_numLockConfig) {
|
||||
const KConfigGroup config = m_numLockConfig->group("Keyboard");
|
||||
const KConfigGroup config = m_numLockConfig->group(QStringLiteral("Keyboard"));
|
||||
// STATE_ON = 0, STATE_OFF = 1, STATE_UNCHANGED = 2, see plasma-desktop/kcms/keyboard/kcmmisc.h
|
||||
const auto setting = config.readEntry("NumLock", 2);
|
||||
if (setting != 2) {
|
||||
|
|
Loading…
Reference in a new issue