mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: Remove call type from callAccepted signal
This commit is contained in:
parent
7b893346f0
commit
1f8a5619c8
@ -170,9 +170,7 @@ void ChatFormHeader::showCallConfirm(bool video)
|
||||
QWidget* btn = video ? videoButton : callButton;
|
||||
callConfirm = std::unique_ptr<CallConfirmWidget>(new CallConfirmWidget(btn));
|
||||
callConfirm->show();
|
||||
connect(callConfirm.get(), &CallConfirmWidget::accepted, this, [this, video]{
|
||||
emit callAccepted(video);
|
||||
});
|
||||
connect(callConfirm.get(), &CallConfirmWidget::accepted, this, &ChatFormHeader::callAccepted);
|
||||
connect(callConfirm.get(), &CallConfirmWidget::rejected, this, &ChatFormHeader::callRejected);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ signals:
|
||||
|
||||
void nameChanged(const QString& name);
|
||||
|
||||
void callAccepted(bool video);
|
||||
void callAccepted();
|
||||
void callRejected();
|
||||
|
||||
private slots:
|
||||
|
@ -345,7 +345,9 @@ void ChatForm::onAvInvite(uint32_t friendId, bool video)
|
||||
onAvStart(friendId, video);
|
||||
} else {
|
||||
headWidget->showCallConfirm(video);
|
||||
connect(headWidget, &ChatFormHeader::callAccepted, this, &ChatForm::onAnswerCallTriggered);
|
||||
connect(headWidget, &ChatFormHeader::callAccepted, this, [this, video] {
|
||||
onAnswerCallTriggered(video);
|
||||
});
|
||||
connect(headWidget, &ChatFormHeader::callRejected, this, &ChatForm::onRejectCallTriggered);
|
||||
auto msg = ChatMessage::createChatInfoMessage(tr("%1 calling").arg(displayedName),
|
||||
ChatMessage::INFO, QDateTime::currentDateTime());
|
||||
|
Loading…
x
Reference in New Issue
Block a user