removed namespaces
This commit is contained in:
@@ -13,14 +13,14 @@ class IgnoreController
|
||||
public:
|
||||
void initialize();
|
||||
|
||||
util::UnsortedSignalVector<IgnorePhrase> phrases;
|
||||
UnsortedSignalVector<IgnorePhrase> phrases;
|
||||
|
||||
IgnoreModel *createModel(QObject *parent);
|
||||
|
||||
private:
|
||||
bool initialized = false;
|
||||
|
||||
singletons::ChatterinoSetting<std::vector<ignores::IgnorePhrase>> ignoresSetting = {
|
||||
chatterino::ChatterinoSetting<std::vector<IgnorePhrase>> ignoresSetting = {
|
||||
"/ignore/phrases"};
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace chatterino {
|
||||
|
||||
// commandmodel
|
||||
IgnoreModel::IgnoreModel(QObject *parent)
|
||||
: util::SignalVectorModel<IgnorePhrase>(2, parent)
|
||||
: SignalVectorModel<IgnorePhrase>(2, parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ IgnorePhrase IgnoreModel::getItemFromRow(std::vector<QStandardItem *> &row,
|
||||
// turns a row in the model into a vector item
|
||||
void IgnoreModel::getRowFromItem(const IgnorePhrase &item, std::vector<QStandardItem *> &row)
|
||||
{
|
||||
util::setStringItem(row[0], item.getPattern());
|
||||
util::setBoolItem(row[1], item.isRegex());
|
||||
setStringItem(row[0], item.getPattern());
|
||||
setBoolItem(row[1], item.isRegex());
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace chatterino {
|
||||
|
||||
class IgnoreController;
|
||||
|
||||
class IgnoreModel : public util::SignalVectorModel<IgnorePhrase>
|
||||
class IgnoreModel : public SignalVectorModel<IgnorePhrase>
|
||||
{
|
||||
explicit IgnoreModel(QObject *parent);
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ namespace pajlada {
|
||||
namespace Settings {
|
||||
|
||||
template <>
|
||||
struct Serialize<chatterino::controllers::ignores::IgnorePhrase> {
|
||||
static rapidjson::Value get(const chatterino::controllers::ignores::IgnorePhrase &value,
|
||||
struct Serialize<chatterino::IgnorePhrase> {
|
||||
static rapidjson::Value get(const chatterino::IgnorePhrase &value,
|
||||
rapidjson::Document::AllocatorType &a)
|
||||
{
|
||||
rapidjson::Value ret(rapidjson::kObjectType);
|
||||
@@ -71,11 +71,11 @@ struct Serialize<chatterino::controllers::ignores::IgnorePhrase> {
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Deserialize<chatterino::controllers::ignores::IgnorePhrase> {
|
||||
static chatterino::controllers::ignores::IgnorePhrase get(const rapidjson::Value &value)
|
||||
struct Deserialize<chatterino::IgnorePhrase> {
|
||||
static chatterino::IgnorePhrase get(const rapidjson::Value &value)
|
||||
{
|
||||
if (!value.IsObject()) {
|
||||
return chatterino::controllers::ignores::IgnorePhrase(QString(), false);
|
||||
return chatterino::IgnorePhrase(QString(), false);
|
||||
}
|
||||
|
||||
QString _pattern;
|
||||
@@ -84,7 +84,7 @@ struct Deserialize<chatterino::controllers::ignores::IgnorePhrase> {
|
||||
chatterino::rj::getSafe(value, "pattern", _pattern);
|
||||
chatterino::rj::getSafe(value, "regex", _isRegex);
|
||||
|
||||
return chatterino::controllers::ignores::IgnorePhrase(_pattern, _isRegex);
|
||||
return chatterino::IgnorePhrase(_pattern, _isRegex);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user