mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 10:18:30 +00:00
Replaced some qsl with u""_q literal.
This commit is contained in:
@@ -387,7 +387,7 @@ bool NotificationData::init(
|
||||
_notification->set_body(
|
||||
subtitle.isEmpty()
|
||||
? msg.toStdString()
|
||||
: qsl("%1\n%2").arg(subtitle, msg).toStdString());
|
||||
: u("%1\n%2"_q.arg(subtitle, msg).toStdString());
|
||||
|
||||
_notification->set_icon(
|
||||
Gio::ThemedIcon::create(base::IconName().toStdString()));
|
||||
@@ -500,16 +500,16 @@ bool NotificationData::init(
|
||||
_title = title.toStdString();
|
||||
_imageKey = GetImageKey(CurrentServerInformationValue().specVersion);
|
||||
|
||||
if (capabilities.contains(qsl("body-markup"))) {
|
||||
if (capabilities.contains(u"body-markup"_q)) {
|
||||
_body = subtitle.isEmpty()
|
||||
? msg.toHtmlEscaped().toStdString()
|
||||
: qsl("<b>%1</b>\n%2").arg(
|
||||
: u"<b>%1</b>\n%2"_q.arg(
|
||||
subtitle.toHtmlEscaped(),
|
||||
msg.toHtmlEscaped()).toStdString();
|
||||
} else {
|
||||
_body = subtitle.isEmpty()
|
||||
? msg.toStdString()
|
||||
: qsl("%1\n%2").arg(subtitle, msg).toStdString();
|
||||
: u"%1\n%2"_q.arg(subtitle, msg).toStdString();
|
||||
}
|
||||
|
||||
if (capabilities.contains("actions")) {
|
||||
@@ -812,16 +812,16 @@ bool ByDefault() {
|
||||
// with custom notifications
|
||||
static const auto NeededCapabilities = {
|
||||
// To show message content
|
||||
qsl("body"),
|
||||
u"body"_q,
|
||||
// To make the sender name bold
|
||||
qsl("body-markup"),
|
||||
u"body-markup"_q,
|
||||
// To have buttons on notifications
|
||||
qsl("actions"),
|
||||
u"actions"_q,
|
||||
// To have quick reply
|
||||
qsl("inline-reply"),
|
||||
u"inline-reply"_q,
|
||||
// To not to play sound with Don't Disturb activated
|
||||
// (no, using sound capability is not a way)
|
||||
qsl("inhibitions"),
|
||||
u"inhibitions"_q,
|
||||
};
|
||||
|
||||
return ranges::all_of(NeededCapabilities, [&](const auto &capability) {
|
||||
@@ -962,7 +962,7 @@ Manager::Private::Private(not_null<Manager*> manager)
|
||||
.arg(capabilities.join(", ")));
|
||||
}
|
||||
|
||||
if (capabilities.contains(qsl("inhibitions"))) {
|
||||
if (capabilities.contains(u"inhibitions"_q)) {
|
||||
Noexcept([&] {
|
||||
_dbusConnection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
Reference in New Issue
Block a user