diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp index c8444b0017..c23d5b73f8 100644 --- a/src/backends/drm/drm_backend.cpp +++ b/src/backends/drm/drm_backend.cpp @@ -153,7 +153,7 @@ void DrmBackend::handleUdevEvent() } } - if (device->action() == QStringLiteral("add")) { + if (device->action() == QLatin1StringView("add")) { DrmGpu *gpu = findGpu(device->devNum()); if (gpu) { qCWarning(KWIN_DRM) << "Received unexpected add udev event for:" << device->devNode(); @@ -162,7 +162,7 @@ void DrmBackend::handleUdevEvent() if (addGpu(device->devNode())) { updateOutputs(); } - } else if (device->action() == QStringLiteral("remove")) { + } else if (device->action() == QLatin1StringView("remove")) { DrmGpu *gpu = findGpu(device->devNum()); if (gpu) { if (primaryGpu() == gpu) { @@ -174,7 +174,7 @@ void DrmBackend::handleUdevEvent() updateOutputs(); } } - } else if (device->action() == QStringLiteral("change")) { + } else if (device->action() == QLatin1StringView("change")) { DrmGpu *gpu = findGpu(device->devNum()); if (!gpu) { gpu = addGpu(device->devNode()); diff --git a/src/helpers/killer/killer.cpp b/src/helpers/killer/killer.cpp index 17ea76a3b1..e3033ffc8a 100644 --- a/src/helpers/killer/killer.cpp +++ b/src/helpers/killer/killer.cpp @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "%s\n", qPrintable(i18n("This helper utility is not supposed to be called directly."))); parser.showHelp(1); } - bool isLocal = hostname == QStringLiteral("localhost"); + bool isLocal = hostname == QLatin1StringView("localhost"); const auto service = KService::serviceByDesktopName(appname); if (service) { diff --git a/src/kcms/common/effectsmodel.cpp b/src/kcms/common/effectsmodel.cpp index 7c00bb8ed1..31f53486f8 100644 --- a/src/kcms/common/effectsmodel.cpp +++ b/src/kcms/common/effectsmodel.cpp @@ -299,7 +299,7 @@ void EffectsModel::loadJavascriptEffects(const KConfigGroup &kwinConfig) effect.internal = plugin.value(QStringLiteral("X-KWin-Internal"), false); if (const QString configModule = plugin.value(QStringLiteral("X-KDE-ConfigModule")); !configModule.isEmpty()) { - if (configModule == QStringLiteral("kcm_kwin4_genericscripted")) { + if (configModule == QLatin1StringView("kcm_kwin4_genericscripted")) { const QString xmlFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + plugin.pluginId() + QLatin1String("/contents/config/main.xml")); const QString uiFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + plugin.pluginId() + QLatin1String("/contents/ui/config.ui")); if (QFileInfo::exists(xmlFile) && QFileInfo::exists(uiFile)) { diff --git a/src/kcms/decoration/kwin-applywindowdecoration.cpp b/src/kcms/decoration/kwin-applywindowdecoration.cpp index 89fcbd0d02..8d7842181c 100644 --- a/src/kcms/decoration/kwin-applywindowdecoration.cpp +++ b/src/kcms/decoration/kwin-applywindowdecoration.cpp @@ -55,7 +55,7 @@ int main(int argc, char **argv) // Since this is the name of a directory, let's do a bit of checking to see // if we know enough about it to deduce that this is, in fact, a theme. QStringList splitTheme = requestedTheme.split(QStringLiteral("/"), Qt::SkipEmptyParts); - if (splitTheme.count() > 3 && splitTheme[splitTheme.count() - 3] == QStringLiteral("aurorae") && splitTheme[splitTheme.count() - 2] == QStringLiteral("themes")) { + if (splitTheme.count() > 3 && splitTheme[splitTheme.count() - 3] == QLatin1StringView("aurorae") && splitTheme[splitTheme.count() - 2] == QLatin1StringView("themes")) { // We think this is an aurorae theme, but let's just make a little more certain... QString file(QStringLiteral("aurorae/themes/%1/metadata.desktop").arg(splitTheme.last())); QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file); diff --git a/src/kcms/screenedges/main.cpp b/src/kcms/screenedges/main.cpp index 0ed178204b..9ab6b042f9 100644 --- a/src/kcms/screenedges/main.cpp +++ b/src/kcms/screenedges/main.cpp @@ -362,19 +362,19 @@ void KWinScreenEdgesConfig::monitorShowEvent() ElectricBorderAction KWinScreenEdgesConfig::electricBorderActionFromString(const QString &string) { QString lowerName = string.toLower(); - if (lowerName == QStringLiteral("showdesktop")) { + if (lowerName == QLatin1StringView("showdesktop")) { return ElectricActionShowDesktop; } - if (lowerName == QStringLiteral("lockscreen")) { + if (lowerName == QLatin1StringView("lockscreen")) { return ElectricActionLockScreen; } - if (lowerName == QStringLiteral("krunner")) { + if (lowerName == QLatin1StringView("krunner")) { return ElectricActionKRunner; } - if (lowerName == QStringLiteral("activitymanager")) { + if (lowerName == QLatin1StringView("activitymanager")) { return ElectricActionActivityManager; } - if (lowerName == QStringLiteral("applicationlauncher")) { + if (lowerName == QLatin1StringView("applicationlauncher")) { return ElectricActionApplicationLauncher; } return ElectricActionNone; diff --git a/src/kcms/screenedges/touch.cpp b/src/kcms/screenedges/touch.cpp index 77364c96ac..3203f0b4b3 100644 --- a/src/kcms/screenedges/touch.cpp +++ b/src/kcms/screenedges/touch.cpp @@ -303,19 +303,19 @@ void KWinScreenEdgesConfig::monitorShowEvent() ElectricBorderAction KWinScreenEdgesConfig::electricBorderActionFromString(const QString &string) { QString lowerName = string.toLower(); - if (lowerName == QStringLiteral("showdesktop")) { + if (lowerName == QLatin1StringView("showdesktop")) { return ElectricActionShowDesktop; } - if (lowerName == QStringLiteral("lockscreen")) { + if (lowerName == QLatin1StringView("lockscreen")) { return ElectricActionLockScreen; } - if (lowerName == QStringLiteral("krunner")) { + if (lowerName == QLatin1StringView("krunner")) { return ElectricActionKRunner; } - if (lowerName == QStringLiteral("activitymanager")) { + if (lowerName == QLatin1StringView("activitymanager")) { return ElectricActionActivityManager; } - if (lowerName == QStringLiteral("applicationlauncher")) { + if (lowerName == QLatin1StringView("applicationlauncher")) { return ElectricActionApplicationLauncher; } return ElectricActionNone; diff --git a/src/keyboard_layout_switching.cpp b/src/keyboard_layout_switching.cpp index bf7d98c0b5..f1cc682a10 100644 --- a/src/keyboard_layout_switching.cpp +++ b/src/keyboard_layout_switching.cpp @@ -43,13 +43,13 @@ void Policy::setLayout(uint index) std::unique_ptr Policy::create(Xkb *xkb, KeyboardLayout *layout, const KConfigGroup &config, const QString &policy) { - if (policy.toLower() == QStringLiteral("desktop")) { + if (policy.toLower() == QLatin1StringView("desktop")) { return std::make_unique(xkb, layout, config); } - if (policy.toLower() == QStringLiteral("window")) { + if (policy.toLower() == QLatin1StringView("window")) { return std::make_unique(xkb, layout); } - if (policy.toLower() == QStringLiteral("winclass")) { + if (policy.toLower() == QLatin1StringView("winclass")) { return std::make_unique(xkb, layout, config); } return std::make_unique(xkb, layout, config); diff --git a/src/options.cpp b/src/options.cpp index 84614eb51f..9af5eefc30 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -706,7 +706,7 @@ void Options::loadConfig() 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; + CmdAllModKey = (config.readEntry("CommandAllKey", "Meta") == QLatin1StringView("Meta")) ? Qt::Key_Meta : Qt::Key_Alt; CmdAllWheel = mouseWheelCommand(config.readEntry("CommandAllWheel", "Nothing")); setCommandActiveTitlebar1(mouseCommand(config.readEntry("CommandActiveTitlebar1", "Raise"), true)); setCommandActiveTitlebar2(mouseCommand(config.readEntry("CommandActiveTitlebar2", "Nothing"), true)); @@ -802,9 +802,9 @@ void Options::loadConfig() } }; auto keyToInterface = [](const QString &key) { - if (key == QStringLiteral("glx")) { + if (key == QLatin1StringView("glx")) { return GlxPlatformInterface; - } else if (key == QStringLiteral("egl")) { + } else if (key == QLatin1StringView("egl")) { return EglPlatformInterface; } return defaultGlPlatformInterface(); @@ -853,27 +853,27 @@ void Options::syncFromKcfgc() // may not be able to move it back, unless they know about Meta+LMB) Options::WindowOperation Options::windowOperation(const QString &name, bool restricted) { - if (name == QStringLiteral("Move")) { + if (name == QLatin1StringView("Move")) { return restricted ? MoveOp : UnrestrictedMoveOp; - } else if (name == QStringLiteral("Resize")) { + } else if (name == QLatin1StringView("Resize")) { return restricted ? ResizeOp : UnrestrictedResizeOp; - } else if (name == QStringLiteral("Maximize")) { + } else if (name == QLatin1StringView("Maximize")) { return MaximizeOp; - } else if (name == QStringLiteral("Minimize")) { + } else if (name == QLatin1StringView("Minimize")) { return MinimizeOp; - } else if (name == QStringLiteral("Close")) { + } else if (name == QLatin1StringView("Close")) { return CloseOp; - } else if (name == QStringLiteral("OnAllDesktops")) { + } else if (name == QLatin1StringView("OnAllDesktops")) { return OnAllDesktopsOp; - } else if (name == QStringLiteral("Shade")) { + } else if (name == QLatin1StringView("Shade")) { return ShadeOp; - } else if (name == QStringLiteral("Operations")) { + } else if (name == QLatin1StringView("Operations")) { return OperationsOp; - } else if (name == QStringLiteral("Maximize (vertical only)")) { + } else if (name == QLatin1StringView("Maximize (vertical only)")) { return VMaximizeOp; - } else if (name == QStringLiteral("Maximize (horizontal only)")) { + } else if (name == QLatin1StringView("Maximize (horizontal only)")) { return HMaximizeOp; - } else if (name == QStringLiteral("Lower")) { + } else if (name == QLatin1StringView("Lower")) { return LowerOp; } return NoOp; @@ -882,67 +882,67 @@ Options::WindowOperation Options::windowOperation(const QString &name, bool rest Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted) { QString lowerName = name.toLower(); - if (lowerName == QStringLiteral("raise")) { + if (lowerName == QLatin1StringView("raise")) { return MouseRaise; } - if (lowerName == QStringLiteral("lower")) { + if (lowerName == QLatin1StringView("lower")) { return MouseLower; } - if (lowerName == QStringLiteral("operations menu")) { + if (lowerName == QLatin1StringView("operations menu")) { return MouseOperationsMenu; } - if (lowerName == QStringLiteral("toggle raise and lower")) { + if (lowerName == QLatin1StringView("toggle raise and lower")) { return MouseToggleRaiseAndLower; } - if (lowerName == QStringLiteral("activate and raise")) { + if (lowerName == QLatin1StringView("activate and raise")) { return MouseActivateAndRaise; } - if (lowerName == QStringLiteral("activate and lower")) { + if (lowerName == QLatin1StringView("activate and lower")) { return MouseActivateAndLower; } - if (lowerName == QStringLiteral("activate")) { + if (lowerName == QLatin1StringView("activate")) { return MouseActivate; } - if (lowerName == QStringLiteral("activate, raise and pass click")) { + if (lowerName == QLatin1StringView("activate, raise and pass click")) { return MouseActivateRaiseAndPassClick; } - if (lowerName == QStringLiteral("activate and pass click")) { + if (lowerName == QLatin1StringView("activate and pass click")) { return MouseActivateAndPassClick; } - if (lowerName == QStringLiteral("scroll")) { + if (lowerName == QLatin1StringView("scroll")) { return MouseNothing; } - if (lowerName == QStringLiteral("activate and scroll")) { + if (lowerName == QLatin1StringView("activate and scroll")) { return MouseActivateAndPassClick; } - if (lowerName == QStringLiteral("activate, raise and scroll")) { + if (lowerName == QLatin1StringView("activate, raise and scroll")) { return MouseActivateRaiseAndPassClick; } - if (lowerName == QStringLiteral("activate, raise and move")) { + if (lowerName == QLatin1StringView("activate, raise and move")) { return restricted ? MouseActivateRaiseAndMove : MouseActivateRaiseAndUnrestrictedMove; } - if (lowerName == QStringLiteral("move")) { + if (lowerName == QLatin1StringView("move")) { return restricted ? MouseMove : MouseUnrestrictedMove; } - if (lowerName == QStringLiteral("resize")) { + if (lowerName == QLatin1StringView("resize")) { return restricted ? MouseResize : MouseUnrestrictedResize; } - if (lowerName == QStringLiteral("shade")) { + if (lowerName == QLatin1StringView("shade")) { return MouseShade; } - if (lowerName == QStringLiteral("minimize")) { + if (lowerName == QLatin1StringView("minimize")) { return MouseMinimize; } - if (lowerName == QStringLiteral("close")) { + if (lowerName == QLatin1StringView("close")) { return MouseClose; } - if (lowerName == QStringLiteral("increase opacity")) { + if (lowerName == QLatin1StringView("increase opacity")) { return MouseOpacityMore; } - if (lowerName == QStringLiteral("decrease opacity")) { + if (lowerName == QLatin1StringView("decrease opacity")) { return MouseOpacityLess; } - if (lowerName == QStringLiteral("nothing")) { + if (lowerName == QLatin1StringView("nothing")) { return MouseNothing; } return MouseNothing; @@ -951,25 +951,25 @@ Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted Options::MouseWheelCommand Options::mouseWheelCommand(const QString &name) { QString lowerName = name.toLower(); - if (lowerName == QStringLiteral("raise/lower")) { + if (lowerName == QLatin1StringView("raise/lower")) { return MouseWheelRaiseLower; } - if (lowerName == QStringLiteral("shade/unshade")) { + if (lowerName == QLatin1StringView("shade/unshade")) { return MouseWheelShadeUnshade; } - if (lowerName == QStringLiteral("maximize/restore")) { + if (lowerName == QLatin1StringView("maximize/restore")) { return MouseWheelMaximizeRestore; } - if (lowerName == QStringLiteral("above/below")) { + if (lowerName == QLatin1StringView("above/below")) { return MouseWheelAboveBelow; } - if (lowerName == QStringLiteral("previous/next desktop")) { + if (lowerName == QLatin1StringView("previous/next desktop")) { return MouseWheelPreviousNextDesktop; } - if (lowerName == QStringLiteral("change opacity")) { + if (lowerName == QLatin1StringView("change opacity")) { return MouseWheelChangeOpacity; } - if (lowerName == QStringLiteral("nothing")) { + if (lowerName == QLatin1StringView("nothing")) { return MouseWheelNothing; } return MouseWheelNothing; diff --git a/src/plugins/kdecorations/aurorae/src/lib/themeconfig.cpp b/src/plugins/kdecorations/aurorae/src/lib/themeconfig.cpp index d12512a2d7..bdd4fc3158 100644 --- a/src/plugins/kdecorations/aurorae/src/lib/themeconfig.cpp +++ b/src/plugins/kdecorations/aurorae/src/lib/themeconfig.cpp @@ -91,17 +91,17 @@ void ThemeConfig::load(const KConfig &conf) m_haloActive = general.readEntry("HaloActive", defaultHaloActive()); m_haloInactive = general.readEntry("HaloInactive", defaultHaloInactive()); QString alignment = (general.readEntry("TitleAlignment", "Left")).toLower(); - if (alignment == QStringLiteral("left")) { + if (alignment == QLatin1StringView("left")) { m_alignment = Qt::AlignLeft; - } else if (alignment == QStringLiteral("center")) { + } else if (alignment == QLatin1StringView("center")) { m_alignment = Qt::AlignHCenter; } else { m_alignment = Qt::AlignRight; } alignment = (general.readEntry("TitleVerticalAlignment", "Center")).toLower(); - if (alignment == QStringLiteral("top")) { + if (alignment == QLatin1StringView("top")) { m_verticalAlignment = Qt::AlignTop; - } else if (alignment == QStringLiteral("center")) { + } else if (alignment == QLatin1StringView("center")) { m_verticalAlignment = Qt::AlignVCenter; } else { m_verticalAlignment = Qt::AlignBottom; diff --git a/src/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.cpp b/src/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.cpp index 2e296a05ac..1820163db0 100644 --- a/src/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.cpp +++ b/src/plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.cpp @@ -35,13 +35,13 @@ QPixmap PlastikButtonProvider::requestPixmap(const QString &id, QSize *size, con bool active = false; bool toggled = false; bool shadow = false; - if (idParts.length() > 1 && idParts.at(1) == QStringLiteral("true")) { + if (idParts.length() > 1 && idParts.at(1) == QLatin1StringView("true")) { active = true; } - if (idParts.length() > 2 && idParts.at(2) == QStringLiteral("true")) { + if (idParts.length() > 2 && idParts.at(2) == QLatin1StringView("true")) { toggled = true; } - if (idParts.length() > 3 && idParts.at(3) == QStringLiteral("true")) { + if (idParts.length() > 3 && idParts.at(3) == QLatin1StringView("true")) { shadow = true; } ButtonIcon button; diff --git a/src/plugins/kpackage/effect/effect.cpp b/src/plugins/kpackage/effect/effect.cpp index 7b6c8c5a62..f86d35556b 100644 --- a/src/plugins/kpackage/effect/effect.cpp +++ b/src/plugins/kpackage/effect/effect.cpp @@ -35,10 +35,10 @@ public: } const QString api = package->metadata().value(QStringLiteral("X-Plasma-API")); - if (api == QStringLiteral("javascript")) { + if (api == QLatin1StringView("javascript")) { package->addFileDefinition("mainscript", QStringLiteral("code/main.js")); package->setRequired("mainscript", true); - } else if (api == QStringLiteral("declarativescript")) { + } else if (api == QLatin1StringView("declarativescript")) { package->addFileDefinition("mainscript", QStringLiteral("ui/main.qml")); package->setRequired("mainscript", true); } diff --git a/src/plugins/windowview/windowvieweffect.cpp b/src/plugins/windowview/windowvieweffect.cpp index 39d3b29622..e628b8ee2b 100644 --- a/src/plugins/windowview/windowvieweffect.cpp +++ b/src/plugins/windowview/windowvieweffect.cpp @@ -81,16 +81,16 @@ WindowViewEffect::WindowViewEffect() }); connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, [this](QAction *action, const QKeySequence &seq) { - if (action->objectName() == QStringLiteral("Expose")) { + if (action->objectName() == QLatin1StringView("Expose")) { m_shortcut.clear(); m_shortcut.append(seq); - } else if (action->objectName() == QStringLiteral("ExposeAll")) { + } else if (action->objectName() == QLatin1StringView("ExposeAll")) { m_shortcutAll.clear(); m_shortcutAll.append(seq); - } else if (action->objectName() == QStringLiteral("ExposeClass")) { + } else if (action->objectName() == QLatin1StringView("ExposeClass")) { m_shortcutClass.clear(); m_shortcutClass.append(seq); - } else if (action->objectName() == QStringLiteral("ExposeClassCurrentDesktop")) { + } else if (action->objectName() == QLatin1StringView("ExposeClassCurrentDesktop")) { m_shortcutClassCurrentDesktop.clear(); m_shortcutClassCurrentDesktop.append(seq); } diff --git a/src/screenedge.cpp b/src/screenedge.cpp index edd827993c..f48dddf6d8 100644 --- a/src/screenedge.cpp +++ b/src/screenedge.cpp @@ -821,9 +821,9 @@ void ScreenEdges::init() static ElectricBorderAction electricBorderAction(const QString &name) { QString lowerName = name.toLower(); - if (lowerName == QStringLiteral("showdesktop")) { + if (lowerName == QLatin1StringView("showdesktop")) { return ElectricActionShowDesktop; - } else if (lowerName == QStringLiteral("lockscreen")) { + } else if (lowerName == QLatin1StringView("lockscreen")) { return ElectricActionLockScreen; } else if (lowerName == QLatin1String("krunner")) { return ElectricActionKRunner; diff --git a/src/scripting/scriptedeffect.cpp b/src/scripting/scriptedeffect.cpp index 337a1f9974..dfd1b07f23 100644 --- a/src/scripting/scriptedeffect.cpp +++ b/src/scripting/scriptedeffect.cpp @@ -309,7 +309,7 @@ bool ScriptedEffect::isActiveFullScreenEffect() const QList ScriptedEffect::touchEdgesForAction(const QString &action) const { QList ret; - if (m_exclusiveCategory == QStringLiteral("show-desktop") && action == QStringLiteral("show-desktop")) { + if (m_exclusiveCategory == QLatin1StringView("show-desktop") && action == QLatin1StringView("show-desktop")) { for (const auto b : {ElectricTop, ElectricRight, ElectricBottom, ElectricLeft}) { if (workspace()->screenEdges()->actionForTouchBorder(b) == ElectricActionShowDesktop) { ret.append(b); diff --git a/src/tabletmodemanager.cpp b/src/tabletmodemanager.cpp index 72f2475ae6..f3fc062baa 100644 --- a/src/tabletmodemanager.cpp +++ b/src/tabletmodemanager.cpp @@ -142,12 +142,12 @@ void KWin::TabletModeManager::refreshSettings() KConfigGroup cg = kwinSettings->group(QStringLiteral("Input")); const QString tabletModeConfig = cg.readPathEntry("TabletMode", QStringLiteral("auto")); const bool oldEffectiveTabletMode = effectiveTabletMode(); - if (tabletModeConfig == QStringLiteral("on")) { + if (tabletModeConfig == QLatin1StringView("on")) { m_configuredMode = ConfiguredMode::On; if (!m_detecting) { Q_EMIT tabletModeAvailableChanged(true); } - } else if (tabletModeConfig == QStringLiteral("off")) { + } else if (tabletModeConfig == QLatin1StringView("off")) { m_configuredMode = ConfiguredMode::Off; } else { m_configuredMode = ConfiguredMode::Auto; diff --git a/src/tiles/tilemanager.cpp b/src/tiles/tilemanager.cpp index 9b7618ecca..7cc40ab6f3 100644 --- a/src/tiles/tilemanager.cpp +++ b/src/tiles/tilemanager.cpp @@ -135,9 +135,9 @@ TileModel *TileManager::model() const Tile::LayoutDirection strToLayoutDirection(const QString &dir) { - if (dir == QStringLiteral("horizontal")) { + if (dir == QLatin1StringView("horizontal")) { return Tile::LayoutDirection::Horizontal; - } else if (dir == QStringLiteral("vertical")) { + } else if (dir == QLatin1StringView("vertical")) { return Tile::LayoutDirection::Vertical; } else { return Tile::LayoutDirection::Floating; diff --git a/src/useractions.cpp b/src/useractions.cpp index ad1109a358..01a9dfeb8c 100644 --- a/src/useractions.cpp +++ b/src/useractions.cpp @@ -158,7 +158,7 @@ void UserActionsMenu::helperDialog(const QString &message) const auto shortcuts = KGlobalAccel::self()->shortcut(action); return QStringLiteral("%1 (%2)").arg(action->text(), shortcuts.isEmpty() ? QString() : shortcuts.first().toString(QKeySequence::NativeText)); }; - if (message == QStringLiteral("noborderaltf3")) { + if (message == QLatin1StringView("noborderaltf3")) { args << QStringLiteral("--msgbox") << i18n("You have selected to show a window without its border.\n" "Without the border, you will not be able to enable the border " "again using the mouse: use the window operations menu instead, " diff --git a/src/window.cpp b/src/window.cpp index e4c3e43256..94e4b8561a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1068,7 +1068,7 @@ void Window::ensurePalette() m_palette = s_defaultPalette; } - if (m_colorScheme == QStringLiteral("kdeglobals")) { + if (m_colorScheme == QLatin1StringView("kdeglobals")) { s_defaultPalette = m_palette; } } else {