expire non-recent chatters

This commit is contained in:
Rasmus Karlsson
2018-03-30 13:50:43 +02:00
committed by fourtf
parent e34cbd741c
commit 45841953da
4 changed files with 91 additions and 24 deletions
+8
View File
@@ -22,11 +22,19 @@ Channel::Channel(const QString &_name)
: name(_name)
, completionModel(this->name)
{
this->clearCompletionModelTimer = new QTimer;
QObject::connect(this->clearCompletionModelTimer, &QTimer::timeout, [this]() {
this->completionModel.ClearExpiredStrings(); //
});
this->clearCompletionModelTimer->start(60 * 1000);
}
Channel::~Channel()
{
this->destroyed.invoke();
this->clearCompletionModelTimer->stop();
this->clearCompletionModelTimer->deleteLater();
}
bool Channel::isEmpty() const