1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr2821'

This commit is contained in:
tux3 2016-01-20 17:01:23 +01:00
commit 19582c1c69
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
4 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,8 @@ void OfflineMsgEngine::deliverOfflineMsgs()
return;
QMap<int64_t, MsgPtr> msgs = undeliveredMsgs;
removeAllReciepts();
removeAllReceipts();
undeliveredMsgs.clear();
for (auto iter = msgs.begin(); iter != msgs.end(); ++iter)
{
@ -105,10 +106,9 @@ void OfflineMsgEngine::deliverOfflineMsgs()
}
}
void OfflineMsgEngine::removeAllReciepts()
void OfflineMsgEngine::removeAllReceipts()
{
QMutexLocker ml(&mutex);
receipts.clear();
undeliveredMsgs.clear();
}

View File

@ -43,7 +43,7 @@ public:
public slots:
void deliverOfflineMsgs();
void removeAllReciepts();
void removeAllReceipts();
private:
struct MsgPtr {

View File

@ -110,7 +110,7 @@ ChatForm::ChatForm(Friend* chatFriend)
connect(msgEdit, &ChatTextEdit::enterPressed, this, &ChatForm::onSendTriggered);
connect(msgEdit, &ChatTextEdit::textChanged, this, &ChatForm::onTextEditChanged);
connect(core, &Core::fileSendFailed, this, &ChatForm::onFileSendFailed);
connect(this, &ChatForm::chatAreaCleared, getOfflineMsgEngine(), &OfflineMsgEngine::removeAllReciepts);
connect(this, &ChatForm::chatAreaCleared, getOfflineMsgEngine(), &OfflineMsgEngine::removeAllReceipts);
connect(&typingTimer, &QTimer::timeout, this, [=]{
Core::getInstance()->sendTyping(f->getFriendID(), false);
isTyping = false;

View File

@ -1848,7 +1848,7 @@ void Widget::clearAllReceipts()
{
QList<Friend*> frnds = FriendList::getAllFriends();
for (Friend *f : frnds)
f->getChatForm()->getOfflineMsgEngine()->removeAllReciepts();
f->getChatForm()->getOfflineMsgEngine()->removeAllReceipts();
}
void Widget::reloadTheme()