diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 06:01:38 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 06:01:38 +0100 |
commit | 19dc6cadea0168f72daff7c0ed679ccdac71a7d5 (patch) | |
tree | b10a86fcd0ab0f12f5e242996b307bb2cac97940 /src/notifications/ManagerLinux.cpp | |
parent | Reduce allocations required for the palette (diff) | |
download | nheko-19dc6cadea0168f72daff7c0ed679ccdac71a7d5.tar.xz |
Reserve size of some containers we are filling
Diffstat (limited to 'src/notifications/ManagerLinux.cpp')
-rw-r--r-- | src/notifications/ManagerLinux.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index 3f7a6b5d..ea46f5d7 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -108,7 +108,8 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if if (hasImages_ && mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image) { MxcImageProvider::download( - QString::fromStdString(mtx::accessors::url(notification.event)).remove(QStringLiteral("mxc://")), + QString::fromStdString(mtx::accessors::url(notification.event)) + .remove(QStringLiteral("mxc://")), QSize(200, 80), [postNotif, notification, template_](QString, QSize, QImage, QString imgPath) { if (imgPath.isEmpty()) @@ -184,9 +185,9 @@ NotificationsManager::systemPostNotification(const QString &room_id, // TODO(Nico): Look into what to actually put there. argumentList << (QStringList(QStringLiteral("default")) << QLatin1String("") << QStringLiteral("inline-reply") - << QLatin1String("")); // actions - argumentList << hints; // hints - argumentList << (int)-1; // timeout in ms + << QLatin1String("")); // actions + argumentList << hints; // hints + argumentList << (int)-1; // timeout in ms QDBusPendingCall call = dbus.asyncCallWithArgumentList(QStringLiteral("Notify"), argumentList); auto watcher = new QDBusPendingCallWatcher{call, this}; |