From d3324bfab2ac5855e620853d636f14d1262ef7ee Mon Sep 17 00:00:00 2001 From: John Gibbon Date: Sat, 24 Oct 2020 19:28:20 +0200 Subject: [PATCH] slot/primitive considerations from #103 --- src/tdlibreceiver.h | 2 +- src/tdlibwrapper.cpp | 7 +------ src/tdlibwrapper.h | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/tdlibreceiver.h b/src/tdlibreceiver.h index 663ce87..e3eadbc 100644 --- a/src/tdlibreceiver.h +++ b/src/tdlibreceiver.h @@ -80,7 +80,7 @@ signals: void userProfilePhotos(const QString &extra, const QVariantList &photos, const int &totalPhotos); void chatPermissionsUpdated(const QString &chatId, const QVariantMap &chatPermissions); void chatTitleUpdated(const QString &chatId, const QString &title); - void usersReceived(const QString &extra, const QVariantList &userIds, const int &totalUsers); + void usersReceived(const QString &extra, const QVariantList &userIds, int totalUsers); private: typedef void (TDLibReceiver::*Handler)(const QVariantMap &); diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp index eb3dec1..193a91c 100644 --- a/src/tdlibwrapper.cpp +++ b/src/tdlibwrapper.cpp @@ -105,7 +105,7 @@ TDLibWrapper::TDLibWrapper(QObject *parent) : QObject(parent) connect(this->tdLibReceiver, SIGNAL(userProfilePhotos(QString, QVariantList, int)), this, SLOT(handleUserProfilePhotos(QString, QVariantList, int))); connect(this->tdLibReceiver, SIGNAL(chatPermissionsUpdated(QString, QVariantMap)), this, SLOT(handleChatPermissionsUpdated(QString, QVariantMap))); connect(this->tdLibReceiver, SIGNAL(chatTitleUpdated(QString, QString)), this, SLOT(handleChatTitleUpdated(QString, QString))); - connect(this->tdLibReceiver, SIGNAL(usersReceived(QString, QVariantList, int)), this, SLOT(handleUsersReceived(QString, QVariantList, int))); + connect(this->tdLibReceiver, SIGNAL(usersReceived(QString, QVariantList, int)), this, SIGNAL(usersReceived(QString, QVariantList, int))); connect(&emojiSearchWorker, SIGNAL(searchCompleted(QString, QVariantList)), this, SLOT(handleEmojiSearchCompleted(QString, QVariantList))); @@ -1124,11 +1124,6 @@ void TDLibWrapper::handleChatTitleUpdated(const QString &chatId, const QString & emit this->chatTitleUpdated(chatId, title); } -void TDLibWrapper::handleUsersReceived(const QString &extra, const QVariantList &userIds, const int &totalUsers) -{ - emit this->usersReceived(extra, userIds, totalUsers); -} - void TDLibWrapper::setInitialParameters() { LOG("Sending initial parameters to TD Lib"); diff --git a/src/tdlibwrapper.h b/src/tdlibwrapper.h index 5603ba3..e093ce0 100644 --- a/src/tdlibwrapper.h +++ b/src/tdlibwrapper.h @@ -202,7 +202,7 @@ signals: void userProfilePhotosReceived(const QString &extra, const QVariantList &photos, const int &totalPhotos); void chatPermissionsUpdated(const QString &chatId, const QVariantMap &permissions); void chatTitleUpdated(const QString &chatId, const QString &title); - void usersReceived(const QString &extra, const QVariantList &userIds, const int &totalUsers); + void usersReceived(const QString &extra, const QVariantList &userIds, int totalUsers); public slots: void handleVersionDetected(const QString &version); @@ -250,7 +250,6 @@ public slots: void handleUserProfilePhotos(const QString &extra, const QVariantList &photos, const int &totalPhotos); void handleChatPermissionsUpdated(const QString &chatId, const QVariantMap &permissions); void handleChatTitleUpdated(const QString &chatId, const QString &title); - void handleUsersReceived(const QString &extra, const QVariantList &userIds, const int &totalUsers);