summary refs log tree commit diff
path: root/src/dbus/NhekoDBusBackend.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2022-04-18 12:50:15 -0400
committerGitHub <noreply@github.com>2022-04-18 16:50:15 +0000
commitda6b3eb8f44f9257aa7f7eb1b0e6a1b2f20cd0a5 (patch)
treea4b5da31b3587d104ac8dd93e6237fa581d7719d /src/dbus/NhekoDBusBackend.cpp
parentMerge pull request #1046 from tastytea/zsh-completion (diff)
downloadnheko-da6b3eb8f44f9257aa7f7eb1b0e6a1b2f20cd0a5.tar.xz
D-Bus fixes (#1048)
According to LorenDB's First Law of Software Development, once a developer has committed or merged a new feature, he will find at least one problem with the implementation.

I realized that I was constructing the room info items with some parameters out of order, which required a rather urgent fix. Furthermore, I fixed the image decoding algorithms in the QDBusArgument operator. Finally, I switched the API version parameter back to QString, since passing it as a QVersionNumber would create a problem for non-Qt API users.

On the general improvements side of things, I added some handy wrappers for D-Bus calls so that other devs that copy the NhekoDBusApi files to use for their own applications won't have to go to the effort of making the D-Bus calls themselves.
Diffstat (limited to 'src/dbus/NhekoDBusBackend.cpp')
-rw-r--r--src/dbus/NhekoDBusBackend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus/NhekoDBusBackend.cpp b/src/dbus/NhekoDBusBackend.cpp

index 7c1c77f8..f0ed9df1 100644 --- a/src/dbus/NhekoDBusBackend.cpp +++ b/src/dbus/NhekoDBusBackend.cpp
@@ -19,7 +19,7 @@ NhekoDBusBackend::NhekoDBusBackend(RoomlistModel *parent) {} QVector<nheko::dbus::RoomInfoItem> -NhekoDBusBackend::getRooms(const QDBusMessage &message) +NhekoDBusBackend::rooms(const QDBusMessage &message) { const auto roomListModel = m_parent->models; QSharedPointer<QVector<nheko::dbus::RoomInfoItem>> model{ @@ -39,7 +39,7 @@ NhekoDBusBackend::getRooms(const QDBusMessage &message) } model->push_back(nheko::dbus::RoomInfoItem{ - room->roomId(), room->roomName(), alias, image, room->notificationCount()}); + room->roomId(), alias, room->roomName(), image, room->notificationCount()}); if (model->length() == roomListModelSize) { auto reply = message.createReply(); @@ -81,7 +81,7 @@ NhekoDBusBackend::joinRoom(const QString &alias) const } void -NhekoDBusBackend::startDirectChat(const QString &userId) const +NhekoDBusBackend::directChat(const QString &userId) const { bringWindowToTop(); ChatPage::instance()->startChat(userId);