Browse Source

fix: remove unused variables

reviewable/pr5993/r2
sudden6 5 years ago committed by Anthony Bilinski
parent
commit
7e4f7f0489
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 5
      src/widget/form/genericchatform.cpp
  2. 2
      src/widget/form/genericchatform.h

5
src/widget/form/genericchatform.cpp

@ -623,7 +623,6 @@ void GenericChatForm::setColorizedNames(bool enable) @@ -623,7 +623,6 @@ void GenericChatForm::setColorizedNames(bool enable)
void GenericChatForm::addSystemInfoMessage(const QString& message, ChatMessage::SystemMessageType type,
const QDateTime& datetime)
{
previousId = ToxPk();
insertChatMessage(ChatMessage::createChatInfoMessage(message, type, datetime));
}
@ -632,7 +631,6 @@ void GenericChatForm::addSystemDateMessage(const QDate& date) @@ -632,7 +631,6 @@ void GenericChatForm::addSystemDateMessage(const QDate& date)
const Settings& s = Settings::getInstance();
QString dateText = date.toString(s.getDateFormat());
previousId = ToxPk();
insertChatMessage(ChatMessage::createChatInfoMessage(dateText, ChatMessage::INFO, QDateTime()));
}
@ -791,7 +789,6 @@ void GenericChatForm::clearChatArea(bool confirm, bool inform) @@ -791,7 +789,6 @@ void GenericChatForm::clearChatArea(bool confirm, bool inform)
}
chatWidget->clear();
previousId = ToxPk();
if (inform)
addSystemInfoMessage(tr("Cleared"), ChatMessage::INFO, QDateTime::currentDateTime());
@ -1148,7 +1145,7 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end, @@ -1148,7 +1145,7 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end,
if (onCompletion) {
auto connection = std::make_shared<QMetaObject::Connection>();
*connection = connect(chatWidget, &ChatLog::workerTimeoutFinished,
[onCompletion, connection, this] {
[onCompletion, connection] {
onCompletion();
disconnect(*connection);
});

2
src/widget/form/genericchatform.h

@ -173,8 +173,6 @@ protected: @@ -173,8 +173,6 @@ protected:
QAction* exportChatAction;
QAction* goCurrentDateAction;
ToxPk previousId;
QMenu menu;
QPushButton* emoteButton;

Loading…
Cancel
Save