Replace QLatin1String with operator _L1

This commit is contained in:
Jonas Kvinge
2024-09-07 04:24:14 +02:00
parent e3e6a22172
commit 4270b12cd1
185 changed files with 2429 additions and 2139 deletions

View File

@@ -37,6 +37,8 @@ THE SOFTWARE.
#include "searchfield.h"
#include "qocoa_mac.h"
using namespace Qt::Literals::StringLiterals;
class SearchFieldPrivate : public QObject {
public:
@@ -156,19 +158,19 @@ class SearchFieldPrivate : public QObject {
if ([event type] == NSEventTypeKeyDown && [event modifierFlags] & NSEventModifierFlagCommand) {
const QString keyString = toQString([event characters]);
if (keyString == QLatin1String("a")) { // Cmd+a
if (keyString == "a"_L1) { // Cmd+a
[self performSelector:@selector(selectText:)];
return YES;
}
else if (keyString == QLatin1String("c")) { // Cmd+c
else if (keyString == "c"_L1) { // Cmd+c
[[self currentEditor] copy: nil];
return YES;
}
else if (keyString == QLatin1String("v")) { // Cmd+v
else if (keyString == "v"_L1) { // Cmd+v
[[self currentEditor] paste: nil];
return YES;
}
else if (keyString == QLatin1String("x")) { // Cmd+x
else if (keyString == "x"_L1) { // Cmd+x
[[self currentEditor] cut: nil];
return YES;
}