Remove "CompletionManager". Completion models are now stored in Channel

Chatters list is now updated every 5 minutes
This commit is contained in:
Rasmus Karlsson
2018-03-24 12:02:07 +01:00
parent ad12a818b2
commit d9bd39e8a4
12 changed files with 65 additions and 95 deletions
+19 -11
View File
@@ -1,15 +1,16 @@
#pragma once
#include <QAbstractListModel>
#include <set>
#include <map>
#include <string>
#include "common.hpp"
#include <QAbstractListModel>
#include <map>
#include <set>
#include <string>
namespace chatterino {
namespace singletons {
class CompletionModel : public QAbstractListModel
{
public:
@@ -50,17 +51,23 @@ private:
if (this->isEmote) {
if (that.isEmote) {
int k = QString::compare(this->str, that.str, Qt::CaseInsensitive);
if (k == 0) return this->str > that.str;
else return k < 0;
if (k == 0) {
return this->str > that.str;
} else {
return k < 0;
}
} else
return true;
} else {
if (that.isEmote)
return false;
else {
int k = QString::compare(this->str, that.str, Qt::CaseInsensitive);;
if (k == 0) return this->str > that.str;
else return k < 0;
int k = QString::compare(this->str, that.str, Qt::CaseInsensitive);
if (k == 0) {
return this->str > that.str;
} else {
return k < 0;
}
}
}
}
@@ -81,5 +88,6 @@ private:
QString channelName;
};
} // namespace singletons
} // namespace chatterino