Rename literal operator

Qt 6.4 introduced `QString operator""_s()` and the previous `""_qs` is
deprecated since Qt 6.8.
This commit is contained in:
Chocobo1
2023-06-18 02:02:02 +08:00
parent f6b58f36e2
commit e6d85a468b
141 changed files with 3610 additions and 3604 deletions

View File

@@ -38,8 +38,8 @@
DBusNotifier::DBusNotifier(QObject *parent)
: QObject(parent)
, m_notificationsInterface {new DBusNotificationsInterface(u"org.freedesktop.Notifications"_qs
, u"/org/freedesktop/Notifications"_qs, QDBusConnection::sessionBus(), this)}
, m_notificationsInterface {new DBusNotificationsInterface(u"org.freedesktop.Notifications"_s
, u"/org/freedesktop/Notifications"_s, QDBusConnection::sessionBus(), this)}
{
// Testing for 'DBusNotificationsInterface::isValid()' isn't helpful here.
// If the notification daemon is configured to run 'as needed'
@@ -58,10 +58,10 @@ DBusNotifier::DBusNotifier(QObject *parent)
void DBusNotifier::showMessage(const QString &title, const QString &message, const int timeout)
{
// Assign "default" action to notification to make it clickable
const QStringList actions {u"default"_qs, {}};
const QVariantMap hints {{u"desktop-entry"_qs, u"org.qbittorrent.qBittorrent"_qs}};
const QDBusPendingReply<uint> reply = m_notificationsInterface->notify(u"qBittorrent"_qs, 0
, u"qbittorrent"_qs, title, message, actions, hints, timeout);
const QStringList actions {u"default"_s, {}};
const QVariantMap hints {{u"desktop-entry"_s, u"org.qbittorrent.qBittorrent"_s}};
const QDBusPendingReply<uint> reply = m_notificationsInterface->notify(u"qBittorrent"_s, 0
, u"qbittorrent"_s, title, message, actions, hints, timeout);
auto *watcher = new QDBusPendingCallWatcher(reply, this);
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self)
{