mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: Rename signal and remove unused params
This commit is contained in:
parent
7c76bebebe
commit
9ac5f881c6
|
@ -677,10 +677,9 @@ void Core::sendGroupMessageWithType(int groupId, const QString& message, TOX_MES
|
|||
TOX_ERR_CONFERENCE_SEND_MESSAGE error;
|
||||
bool ok = tox_conference_send_message(tox, groupId, type, cMsg.data(), cMsg.size(), &error);
|
||||
if (!ok || !parseConferenceSendMessageError(error)) {
|
||||
emit groupSentResult(groupId, message, -1);
|
||||
emit groupSentFailed(groupId);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ signals:
|
|||
void idSet(const ToxId& id);
|
||||
|
||||
void messageSentResult(uint32_t friendId, const QString& message, int messageId);
|
||||
void groupSentResult(int groupId, const QString& message, int result);
|
||||
void groupSentFailed(int groupId);
|
||||
void actionSentResult(uint32_t friendId, const QString& action, int success);
|
||||
|
||||
void receiptRecieved(int friedId, int receipt);
|
||||
|
|
|
@ -228,7 +228,7 @@ void Nexus::showMainGUI()
|
|||
connect(core, &Core::emptyGroupCreated, widget, &Widget::onEmptyGroupCreated);
|
||||
connect(core, &Core::friendTypingChanged, widget, &Widget::onFriendTypingChanged);
|
||||
connect(core, &Core::messageSentResult, widget, &Widget::onMessageSendResult);
|
||||
connect(core, &Core::groupSentResult, widget, &Widget::onGroupSendResult);
|
||||
connect(core, &Core::groupSentFailed, widget, &Widget::onGroupSendFailed);
|
||||
|
||||
connect(widget, &Widget::statusSet, core, &Core::setStatus);
|
||||
connect(widget, &Widget::friendRequested, core, &Core::requestFriendship);
|
||||
|
|
|
@ -2040,19 +2040,16 @@ void Widget::onMessageSendResult(uint32_t friendId, const QString& message, int
|
|||
}
|
||||
}
|
||||
|
||||
void Widget::onGroupSendResult(int groupId, const QString& message, int result)
|
||||
void Widget::onGroupSendFailed(int groupId)
|
||||
{
|
||||
Q_UNUSED(message)
|
||||
Group* g = GroupList::findGroup(groupId);
|
||||
if (!g) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (result == -1) {
|
||||
QString message = tr("Message failed to send");
|
||||
QDateTime curTime = QDateTime::currentDateTime();
|
||||
g->getChatForm()->addSystemInfoMessage(message, ChatMessage::INFO, curTime);
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::onFriendTypingChanged(int friendId, bool isTyping)
|
||||
|
|
|
@ -170,7 +170,7 @@ public slots:
|
|||
void onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t change);
|
||||
void onGroupTitleChanged(int groupnumber, const QString& author, const QString& title);
|
||||
void onGroupPeerAudioPlaying(int groupnumber, int peernumber);
|
||||
void onGroupSendResult(int groupId, const QString& message, int result);
|
||||
void onGroupSendFailed(int groupId);
|
||||
void onFriendTypingChanged(int friendId, bool isTyping);
|
||||
void nextContact();
|
||||
void previousContact();
|
||||
|
|
Loading…
Reference in New Issue
Block a user