2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +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

@@ -598,7 +598,7 @@ void ChatParticipants::requestSelf(not_null<ChannelData*> channel) {
});
}).fail([=](const MTP::Error &error) {
_selfParticipantRequests.erase(channel);
if (error.type() == qstr("CHANNEL_PRIVATE")) {
if (error.type() == u"CHANNEL_PRIVATE"_q) {
channel->privateErrorReceived();
}
finalize();

View File

@@ -23,7 +23,7 @@ MTPVector<MTPDocumentAttribute> ComposeSendingDocumentAttributes(
auto attributes = QVector<MTPDocumentAttribute>(1, filenameAttribute);
if (dimensions.width() > 0 && dimensions.height() > 0) {
const auto duration = document->getDuration();
if (duration >= 0 && !document->hasMimeType(qstr("image/gif"))) {
if (duration >= 0 && !document->hasMimeType(u"image/gif"_q)) {
auto flags = MTPDdocumentAttributeVideo::Flags(0);
using VideoFlag = MTPDdocumentAttributeVideo::Flag;
if (document->isVideoMessage()) {

View File

@@ -166,7 +166,7 @@ void SendExistingMedia(
), [=](const MTPUpdates &result, const MTP::Response &response) {
}, [=](const MTP::Error &error, const MTP::Response &response) {
if (error.code() == 400
&& error.type().startsWith(qstr("FILE_REFERENCE_"))) {
&& error.type().startsWith(u"FILE_REFERENCE_"_q)) {
api->refreshFileReference(origin, [=](const auto &result) {
if (media->fileReference() != usedFileReference) {
repeatRequest(repeatRequest);

View File

@@ -33,12 +33,12 @@ Key ExtractKey(const QString &query) {
qthelp::UrlParamNameTransform::ToLower)
: QMap<QString, QString>();
};
if (check.startsWith(qstr("tg://privatepost"), Qt::CaseInsensitive)) {
if (check.startsWith(u"tg://privatepost"_q, Qt::CaseInsensitive)) {
const auto params = parse();
const auto channel = params.value("channel");
const auto post = params.value("post").toInt();
return (channel.toULongLong() && post) ? Key{ channel, post } : Key();
} else if (check.startsWith(qstr("tg://resolve"), Qt::CaseInsensitive)) {
} else if (check.startsWith(u"tg://resolve"_q, Qt::CaseInsensitive)) {
const auto params = parse();
const auto domain = params.value("domain");
const auto post = params.value("post").toInt();
@@ -220,7 +220,7 @@ QString ConvertPeerSearchQuery(const QString &query) {
const auto trimmed = query.trimmed();
const auto local = Core::TryConvertUrlToLocal(trimmed);
const auto check = local.isEmpty() ? trimmed : local;
if (!check.startsWith(qstr("tg://resolve"), Qt::CaseInsensitive)) {
if (!check.startsWith(u"tg://resolve"_q, Qt::CaseInsensitive)) {
return query;
}
const auto delimeter = check.indexOf('?');

View File

@@ -95,7 +95,7 @@ void ProcessScheduledMessageWithElapsedTime(
}
bool IsForceLogoutNotification(const MTPDupdateServiceNotification &data) {
return qs(data.vtype()).startsWith(qstr("AUTH_KEY_DROP_"));
return qs(data.vtype()).startsWith(u"AUTH_KEY_DROP_"_q);
}
bool HasForceLogoutNotification(const MTPUpdates &updates) {