2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Replaced some qstr with u""_q literal.

This commit is contained in:
23rd
2022-11-27 00:20:17 +03:00
parent 22dc7023fc
commit 2acedca6b7
99 changed files with 477 additions and 480 deletions

View File

@@ -816,8 +816,8 @@ void AttachWebView::show(
const auto handleLocalUri = [close](QString uri) {
const auto local = Core::TryConvertUrlToLocal(uri);
if (uri == local || Core::InternalPassportLink(local)) {
return local.startsWith(qstr("tg://"));
} else if (!local.startsWith(qstr("tg://"), Qt::CaseInsensitive)) {
return local.startsWith(u"tg://"_q);
} else if (!local.startsWith(u"tg://"_q, Qt::CaseInsensitive)) {
return false;
}
UrlClickHandler::Open(local, {});

View File

@@ -474,7 +474,7 @@ MTPVector<MTPDocumentAttribute> Result::adjustAttributes(
const auto mime = qs(mimeType);
if (_type == Type::Gif) {
if (!exists(mtpc_documentAttributeFilename)) {
auto filename = (mime == qstr("video/mp4")
auto filename = (mime == u"video/mp4"_q
? "animation.gif.mp4"
: "animation.gif");
result.push_back(MTP_documentAttributeFilename(
@@ -487,7 +487,7 @@ MTPVector<MTPDocumentAttribute> Result::adjustAttributes(
const auto audio = find(mtpc_documentAttributeAudio);
if (audio != result.cend()) {
using Flag = MTPDdocumentAttributeAudio::Flag;
if (mime == qstr("audio/ogg")) {
if (mime == u"audio/ogg"_q) {
// We always treat audio/ogg as a voice message.
// It was that way before we started to get attributes here.
const auto &fields = audio->c_documentAttributeAudio();