xwayland/selection: reduce string allocations
This commit is contained in:
parent
e851b18d16
commit
5cfe84b23b
1 changed files with 4 additions and 4 deletions
|
@ -65,12 +65,12 @@ QStringList Selection::atomToMimeTypes(xcb_atom_t atom)
|
||||||
QStringList mimeTypes;
|
QStringList mimeTypes;
|
||||||
|
|
||||||
if (atom == atoms->utf8_string) {
|
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) {
|
} else if (atom == atoms->text) {
|
||||||
mimeTypes << QString::fromLatin1("text/plain");
|
mimeTypes << QStringLiteral("text/plain");
|
||||||
} else if (atom == atoms->uri_list) {
|
} else if (atom == atoms->uri_list) {
|
||||||
mimeTypes << "text/uri-list"
|
mimeTypes << QStringLiteral("text/uri-list")
|
||||||
<< "text/x-uri";
|
<< QStringLiteral("text/x-uri");
|
||||||
} else {
|
} else {
|
||||||
mimeTypes << atomName(atom);
|
mimeTypes << atomName(atom);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue