From 5cfe84b23b81caea7616b203a14644b4e66e153d Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Mon, 9 Sep 2024 21:40:43 +0800 Subject: [PATCH] xwayland/selection: reduce string allocations --- src/xwayland/selection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xwayland/selection.cpp b/src/xwayland/selection.cpp index 8a3f463966..69e6d000c6 100644 --- a/src/xwayland/selection.cpp +++ b/src/xwayland/selection.cpp @@ -65,12 +65,12 @@ QStringList Selection::atomToMimeTypes(xcb_atom_t atom) QStringList mimeTypes; if (atom == atoms->utf8_string) { - mimeTypes << QString::fromLatin1("text/plain;charset=utf-8"); + mimeTypes << QStringLiteral("text/plain;charset=utf-8"); } else if (atom == atoms->text) { - mimeTypes << QString::fromLatin1("text/plain"); + mimeTypes << QStringLiteral("text/plain"); } else if (atom == atoms->uri_list) { - mimeTypes << "text/uri-list" - << "text/x-uri"; + mimeTypes << QStringLiteral("text/uri-list") + << QStringLiteral("text/x-uri"); } else { mimeTypes << atomName(atom); }