Commit 9ae3ea63 authored by Nicolas Fella's avatar Nicolas Fella

Use qdbus_cast

Let Qt do the boilerplat for us.

Does virtually the same under the hood (https://code.woboq.org/qt5/qtbase/src/dbus/qdbusargument.h.html#_Z10qdbus_castRK13QDBusArgumentPT_)
parent 8f41be36
Pipeline #28797 passed with stage
in 9 minutes and 55 seconds
...@@ -113,10 +113,7 @@ void ConversationListModel::prepareConversationsList() ...@@ -113,10 +113,7 @@ void ConversationListModel::prepareConversationsList()
setWhenAvailable(validThreadIDsReply, [this](const QVariantList& convs) { setWhenAvailable(validThreadIDsReply, [this](const QVariantList& convs) {
clear(); // If we clear before we receive the reply, there might be a (several second) visual gap! clear(); // If we clear before we receive the reply, there might be a (several second) visual gap!
for (const QVariant& headMessage : convs) { for (const QVariant& headMessage : convs) {
const QDBusArgument data = headMessage.value<QDBusArgument>(); createRowFromMessage(qdbus_cast<ConversationMessage>(headMessage));
ConversationMessage message;
data >> message;
createRowFromMessage(message);
} }
displayContacts(); displayContacts();
}, this); }, this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment