aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/room_upgrades.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-17 10:35:22 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-17 10:38:40 +0200
commitf779b235ddac990d17a9a8d8dd222b9e0e7abd49 (patch)
treec56650a322fa5b4a6fc66b9230152e3b8f9d4f9a /lib/csapi/room_upgrades.cpp
parentda5156f5e2da08123549b554d9eafcf366fa4e11 (diff)
downloadlibquotient-f779b235ddac990d17a9a8d8dd222b9e0e7abd49.tar.gz
libquotient-f779b235ddac990d17a9a8d8dd222b9e0e7abd49.zip
Make Connection::sendToDevices() an actual slot
Although Qt 5 didn't complain about that, you could never really use sendToDevices() in its slot (or even invocable) capacity because Qt's meta-type system could not handle move-only UsersToDevicesToEvents. Qt 6 is more stringent; the build fails at trying to instantiate QMetaType for that type (with a rather unhelpful error message thrown by Clang, and more helpful but very verbose diagnostic from MSVC) because it does not provide a copy constructor. However, sendToDevice doesn't really need to have full-blown events in that parameter; just the content of the event is equally fine. This commit does exactly that: replaces UsersToDevicesToEvents with UsersToDevicesToContent that contains QJsonObject's instead of EventPtr's. The code around is updated accordingly. Also: factor out the key event JSON creation from makeMessageEventForSessionKey() because it's the same JSON for each target device; the function therefore is called encryptSessionKeyEvent() now.
Diffstat (limited to 'lib/csapi/room_upgrades.cpp')
0 files changed, 0 insertions, 0 deletions