Applied project style to multiple files

This commit is contained in:
fourtf 2018-07-06 18:10:21 +02:00
parent 3993708164
commit 535c0616a3
26 changed files with 149 additions and 157 deletions

View file

@ -17,10 +17,10 @@
namespace chatterino {
Channel::Channel(const QString &_name, Type _type)
Channel::Channel(const QString &_name, Type type)
: name(_name)
, completionModel(this->name)
, type_(_type)
, type_(type)
{
QObject::connect(&this->clearCompletionModelTimer_, &QTimer::timeout, [this]() {
this->completionModel.clearExpiredStrings(); //

View file

@ -29,7 +29,7 @@ public:
Misc
};
explicit Channel(const QString &_name, Type type_);
explicit Channel(const QString &name, Type type);
virtual ~Channel();
pajlada::Signals::Signal<const QString &, const QString &, bool &> sendMessageSignal;

View file

@ -11,14 +11,14 @@ template <typename Type>
class ChatterinoSetting : public pajlada::Settings::Setting<Type>
{
public:
ChatterinoSetting(const std::string &_path)
: pajlada::Settings::Setting<Type>(_path)
ChatterinoSetting(const std::string &path)
: pajlada::Settings::Setting<Type>(path)
{
_registerSetting(this->data);
}
ChatterinoSetting(const std::string &_path, const Type &_defaultValue)
: pajlada::Settings::Setting<Type>(_path, _defaultValue)
ChatterinoSetting(const std::string &path, const Type &defaultValue)
: pajlada::Settings::Setting<Type>(path, defaultValue)
{
_registerSetting(this->data);
}

View file

@ -73,8 +73,8 @@ bool CompletionModel::TaggedString::operator<(const TaggedString &that) const
// -- CompletionModel
CompletionModel::CompletionModel(const QString &_channelName)
: channelName_(_channelName)
CompletionModel::CompletionModel(const QString &channelName)
: channelName_(channelName)
{
}

View file

@ -45,7 +45,7 @@ class CompletionModel : public QAbstractListModel
};
public:
CompletionModel(const QString &_channelName);
CompletionModel(const QString &channelName);
virtual int columnCount(const QModelIndex &) const override;
virtual QVariant data(const QModelIndex &index, int) const override;

View file

@ -5,8 +5,8 @@
namespace chatterino {
EmoteData::EmoteData(Image *_image)
: image1x(_image)
EmoteData::EmoteData(Image *image)
: image1x(image)
{
}

View file

@ -8,7 +8,7 @@ namespace chatterino {
struct EmoteData {
EmoteData() = default;
EmoteData(Image *_image);
EmoteData(Image *image);
// Emotes must have a 1x image to be valid
bool isValid() const;

View file

@ -24,9 +24,9 @@ void NetworkRequest::setRequestType(RequestType newRequestType)
this->data.requestType = newRequestType;
}
void NetworkRequest::setCaller(const QObject *_caller)
void NetworkRequest::setCaller(const QObject *caller)
{
this->data.caller = _caller;
this->data.caller = caller;
}
void NetworkRequest::setOnReplyCreated(std::function<void(QNetworkReply *)> f)

View file

@ -135,7 +135,7 @@ public:
}
void setUseQuickLoadCache(bool value);
void setCaller(const QObject *_caller);
void setCaller(const QObject *caller);
void setOnReplyCreated(std::function<void(QNetworkReply *)> f);
void setRawHeader(const char *headerName, const char *value);
void setRawHeader(const char *headerName, const QByteArray &value);

View file

@ -12,23 +12,23 @@ public:
{
}
Property(const T &_value)
: value(_value)
Property(const T &value)
: value_(value)
{
}
T &operator=(const T &f)
{
return value = f;
return value_ = f;
}
operator T const &() const
{
return value;
return value_;
}
protected:
T value;
T value_;
};
} // namespace chatterino

View file

@ -10,9 +10,7 @@ template <>
struct Serialize<QString> {
static rapidjson::Value get(const QString &value, rapidjson::Document::AllocatorType &a)
{
rapidjson::Value ret(value.toUtf8(), a);
return ret;
return rapidjson::Value(value.toUtf8(), a);
}
};
@ -27,10 +25,7 @@ struct Deserialize<QString> {
}
try {
const char *str = value.GetString();
auto strLen = value.GetStringLength();
return QString::fromUtf8(str, strLen);
return QString::fromUtf8(value.GetString(), value.GetStringLength());
} catch (const std::exception &) {
// int x = 5;
} catch (...) {

View file

@ -23,10 +23,10 @@ class ReadOnlySignalVector : boost::noncopyable
public:
ReadOnlySignalVector()
{
QObject::connect(&this->itemsChangedTimer, &QTimer::timeout,
QObject::connect(&this->itemsChangedTimer_, &QTimer::timeout,
[this] { this->delayedItemsChanged.invoke(); });
this->itemsChangedTimer.setInterval(100);
this->itemsChangedTimer.setSingleShot(true);
this->itemsChangedTimer_.setInterval(100);
this->itemsChangedTimer_.setSingleShot(true);
}
virtual ~ReadOnlySignalVector() = default;
@ -38,23 +38,23 @@ public:
{
assertInGuiThread();
return this->vector;
return this->vector_;
}
void invokeDelayedItemsChanged()
{
assertInGuiThread();
if (!this->itemsChangedTimer.isActive()) {
itemsChangedTimer.start();
if (!this->itemsChangedTimer_.isActive()) {
this->itemsChangedTimer_.start();
}
}
virtual bool isSorted() const = 0;
protected:
std::vector<TVectorItem> vector;
QTimer itemsChangedTimer;
std::vector<TVectorItem> vector_;
QTimer itemsChangedTimer_;
};
template <typename TVectorItem>
@ -68,10 +68,10 @@ public:
void removeItem(int index, void *caller = nullptr)
{
assertInGuiThread();
assert(index >= 0 && index < this->vector.size());
assert(index >= 0 && index < this->vector_.size());
TVectorItem item = this->vector[index];
this->vector.erase(this->vector.begin() + index);
TVectorItem item = this->vector_[index];
this->vector_.erase(this->vector_.begin() + index);
SignalVectorItemArgs<TVectorItem> args{item, index, caller};
this->itemRemoved.invoke(args);
@ -92,12 +92,12 @@ public:
{
assertInGuiThread();
if (index == -1) {
index = this->vector.size();
index = this->vector_.size();
} else {
assert(index >= 0 && index <= this->vector.size());
assert(index >= 0 && index <= this->vector_.size());
}
this->vector.insert(this->vector.begin() + index, item);
this->vector_.insert(this->vector_.begin() + index, item);
SignalVectorItemArgs<TVectorItem> args{item, index, caller};
this->itemInserted.invoke(args);
@ -119,9 +119,9 @@ public:
{
assertInGuiThread();
auto it = std::lower_bound(this->vector.begin(), this->vector.end(), item, Compare{});
int index = it - this->vector.begin();
this->vector.insert(it, item);
auto it = std::lower_bound(this->vector_.begin(), this->vector_.end(), item, Compare{});
int index = it - this->vector_.begin();
this->vector_.insert(it, item);
SignalVectorItemArgs<TVectorItem> args{item, index, caller};
this->itemInserted.invoke(args);

View file

@ -16,16 +16,16 @@ class SignalVectorModel : public QAbstractTableModel, pajlada::Signals::SignalHo
public:
SignalVectorModel(int columnCount, QObject *parent = nullptr)
: QAbstractTableModel(parent)
, _columnCount(columnCount)
, columnCount_(columnCount)
{
for (int i = 0; i < columnCount; i++) {
this->_headerData.emplace_back();
this->headerData_.emplace_back();
}
}
void init(BaseSignalVector<TVectorItem> *vec)
{
this->vector = vec;
this->vector_ = vec;
auto insert = [this](const SignalVectorItemArgs<TVectorItem> &args) {
if (args.caller == this) {
@ -33,7 +33,7 @@ public:
}
// get row index
int index = this->getModelIndexFromVectorIndex(args.index);
assert(index >= 0 && index <= this->rows.size());
assert(index >= 0 && index <= this->rows_.size());
// get row items
std::vector<QStandardItem *> row = this->createRow();
@ -43,7 +43,7 @@ public:
index = this->beforeInsert(args.item, row, index);
this->beginInsertRows(QModelIndex(), index, index);
this->rows.insert(this->rows.begin() + index, Row(row, args.item));
this->rows_.insert(this->rows_.begin() + index, Row(row, args.item));
this->endInsertRows();
};
@ -62,13 +62,13 @@ public:
}
int row = this->getModelIndexFromVectorIndex(args.index);
assert(row >= 0 && row <= this->rows.size());
assert(row >= 0 && row <= this->rows_.size());
// remove row
std::vector<QStandardItem *> items = std::move(this->rows[row].items);
std::vector<QStandardItem *> items = std::move(this->rows_[row].items);
this->beginRemoveRows(QModelIndex(), row, row);
this->rows.erase(this->rows.begin() + row);
this->rows_.erase(this->rows_.begin() + row);
this->endRemoveRows();
this->afterRemoved(args.item, items, row);
@ -83,7 +83,7 @@ public:
virtual ~SignalVectorModel()
{
for (Row &row : this->rows) {
for (Row &row : this->rows_) {
for (QStandardItem *item : row.items) {
delete item;
}
@ -92,28 +92,28 @@ public:
int rowCount(const QModelIndex &parent) const override
{
return this->rows.size();
return this->rows_.size();
}
int columnCount(const QModelIndex &parent) const override
{
return this->_columnCount;
return this->columnCount_;
}
QVariant data(const QModelIndex &index, int role) const override
{
int row = index.row(), column = index.column();
assert(row >= 0 && row < this->rows.size() && column >= 0 && column < this->_columnCount);
assert(row >= 0 && row < this->rows_.size() && column >= 0 && column < this->columnCount_);
return rows[row].items[column]->data(role);
return rows_[row].items[column]->data(role);
}
bool setData(const QModelIndex &index, const QVariant &value, int role) override
{
int row = index.row(), column = index.column();
assert(row >= 0 && row < this->rows.size() && column >= 0 && column < this->_columnCount);
assert(row >= 0 && row < this->rows_.size() && column >= 0 && column < this->columnCount_);
Row &rowItem = this->rows[row];
Row &rowItem = this->rows_[row];
rowItem.items[column]->setData(value, role);
@ -121,12 +121,12 @@ public:
this->customRowSetData(rowItem.items, column, value, role);
} else {
int vecRow = this->getVectorIndexFromModelIndex(row);
this->vector->removeItem(vecRow, this);
this->vector_->removeItem(vecRow, this);
assert(this->rows[row].original);
assert(this->rows_[row].original);
TVectorItem item =
this->getItemFromRow(this->rows[row].items, this->rows[row].original.get());
this->vector->insertItem(item, vecRow, this);
this->getItemFromRow(this->rows_[row].items, this->rows_[row].original.get());
this->vector_->insertItem(item, vecRow, this);
}
return true;
@ -138,8 +138,8 @@ public:
return QVariant();
}
auto it = this->_headerData[section].find(role);
if (it == this->_headerData[section].end()) {
auto it = this->headerData_[section].find(role);
if (it == this->headerData_[section].end()) {
return QVariant();
} else {
return it.value();
@ -153,7 +153,7 @@ public:
return false;
}
this->_headerData[section][role] = value;
this->headerData_[section][role] = value;
emit this->headerDataChanged(Qt::Horizontal, section, section);
return true;
@ -162,22 +162,22 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const override
{
int row = index.row(), column = index.column();
assert(row >= 0 && row < this->rows.size() && column >= 0 && column < this->_columnCount);
assert(row >= 0 && row < this->rows_.size() && column >= 0 && column < this->columnCount_);
return this->rows[index.row()].items[index.column()]->flags();
return this->rows_[index.row()].items[index.column()]->flags();
}
QStandardItem *getItem(int row, int column)
{
assert(row >= 0 && row < this->rows.size() && column >= 0 && column < this->_columnCount);
assert(row >= 0 && row < this->rows_.size() && column >= 0 && column < this->columnCount_);
return rows[row].items[column];
return rows_[row].items[column];
}
void deleteRow(int row)
{
int signalVectorRow = this->getVectorIndexFromModelIndex(row);
this->vector->removeItem(signalVectorRow);
this->vector_->removeItem(signalVectorRow);
}
bool removeRows(int row, int count, const QModelIndex &parent) override
@ -186,10 +186,10 @@ public:
return false;
}
assert(row >= 0 && row < this->rows.size());
assert(row >= 0 && row < this->rows_.size());
int signalVectorRow = this->getVectorIndexFromModelIndex(row);
this->vector->removeItem(signalVectorRow);
this->vector_->removeItem(signalVectorRow);
return true;
}
@ -223,27 +223,27 @@ protected:
void insertCustomRow(std::vector<QStandardItem *> row, int index)
{
assert(index >= 0 && index <= this->rows.size());
assert(index >= 0 && index <= this->rows_.size());
this->beginInsertRows(QModelIndex(), index, index);
this->rows.insert(this->rows.begin() + index, Row(std::move(row), true));
this->rows_.insert(this->rows_.begin() + index, Row(std::move(row), true));
this->endInsertRows();
}
void removeCustomRow(int index)
{
assert(index >= 0 && index <= this->rows.size());
assert(this->rows[index].isCustomRow);
assert(index >= 0 && index <= this->rows_.size());
assert(this->rows_[index].isCustomRow);
this->beginRemoveRows(QModelIndex(), index, index);
this->rows.erase(this->rows.begin() + index);
this->rows_.erase(this->rows_.begin() + index);
this->endRemoveRows();
}
std::vector<QStandardItem *> createRow()
{
std::vector<QStandardItem *> row;
for (int i = 0; i < this->_columnCount; i++) {
for (int i = 0; i < this->columnCount_; i++) {
row.push_back(new QStandardItem());
}
return row;
@ -268,20 +268,20 @@ protected:
{
}
};
std::vector<Row> rows;
private:
std::vector<QMap<int, QVariant>> _headerData;
BaseSignalVector<TVectorItem> *vector;
std::vector<QMap<int, QVariant>> headerData_;
BaseSignalVector<TVectorItem> *vector_;
std::vector<Row> rows_;
int _columnCount;
int columnCount_;
// returns the related index of the SignalVector
int getVectorIndexFromModelIndex(int index)
{
int i = 0;
for (auto &row : this->rows) {
for (auto &row : this->rows_) {
if (row.isCustomRow) {
index--;
continue;
@ -301,7 +301,7 @@ private:
{
int i = 0;
for (auto &row : this->rows) {
for (auto &row : this->rows_) {
if (row.isCustomRow) {
index++;
}

View file

@ -13,7 +13,7 @@ class SimpleSignalVector
public:
SimpleSignalVector &operator=(std::vector<TValue> &other)
{
this->data = other;
this->data_ = other;
this->updated.invoke();
@ -22,13 +22,13 @@ public:
operator std::vector<TValue> &()
{
return this->data;
return this->data_;
}
pajlada::Signals::NoArgSignal updated;
private:
std::vector<TValue> data;
std::vector<TValue> data_;
};
} // namespace chatterino

View file

@ -4,13 +4,13 @@
namespace chatterino {
Account::Account(ProviderId _providerId)
: providerId(_providerId)
Account::Account(ProviderId providerId)
: providerId_(providerId)
{
static QString twitch("Twitch");
this->category = [&]() {
switch (_providerId) {
this->category_ = [&]() {
switch (providerId) {
case ProviderId::Twitch:
return twitch;
}
@ -20,12 +20,12 @@ Account::Account(ProviderId _providerId)
const QString &Account::getCategory() const
{
return this->category;
return this->category_;
}
ProviderId Account::getProviderId() const
{
return this->providerId;
return this->providerId_;
}
bool Account::operator<(const Account &other) const
@ -33,7 +33,7 @@ bool Account::operator<(const Account &other) const
QString a = this->toString();
QString b = other.toString();
return std::tie(this->category, a) < std::tie(other.category, b);
return std::tie(this->category_, a) < std::tie(other.category_, b);
}
} // namespace chatterino

View file

@ -19,8 +19,8 @@ public:
bool operator<(const Account &other) const;
private:
ProviderId providerId;
QString category;
ProviderId providerId_;
QString category_;
};
} // namespace chatterino

View file

@ -7,7 +7,7 @@ namespace chatterino {
AccountController::AccountController()
{
this->twitch.accounts.itemInserted.connect([this](const auto &args) {
this->accounts.insertItem(std::dynamic_pointer_cast<Account>(args.item));
this->accounts_.insertItem(std::dynamic_pointer_cast<Account>(args.item));
});
this->twitch.accounts.itemRemoved.connect([this](const auto &args) {
@ -16,11 +16,11 @@ AccountController::AccountController()
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->accounts.removeItem(it - accs.begin());
this->accounts_.removeItem(it - accs.begin());
}
});
this->accounts.itemRemoved.connect([this](const auto &args) {
this->accounts_.itemRemoved.connect([this](const auto &args) {
switch (args.item->getProviderId()) {
case ProviderId::Twitch: {
auto &accs = this->twitch.accounts.getVector();
@ -42,7 +42,7 @@ AccountModel *AccountController::createModel(QObject *parent)
{
AccountModel *model = new AccountModel(parent);
model->init(&this->accounts);
model->init(&this->accounts_);
return model;
}

View file

@ -23,7 +23,7 @@ public:
TwitchAccountManager twitch;
private:
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>> accounts;
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>> accounts_;
};
} // namespace chatterino

View file

@ -27,7 +27,7 @@ void AccountModel::getRowFromItem(const std::shared_ptr<Account> &item,
int AccountModel::beforeInsert(const std::shared_ptr<Account> &item,
std::vector<QStandardItem *> &row, int proposedIndex)
{
if (this->categoryCount[item->getCategory()]++ == 0) {
if (this->categoryCount_[item->getCategory()]++ == 0) {
auto row = this->createRow();
setStringItem(row[0], item->getCategory(), false, false);
@ -44,11 +44,11 @@ int AccountModel::beforeInsert(const std::shared_ptr<Account> &item,
void AccountModel::afterRemoved(const std::shared_ptr<Account> &item,
std::vector<QStandardItem *> &row, int index)
{
auto it = this->categoryCount.find(item->getCategory());
assert(it != this->categoryCount.end());
auto it = this->categoryCount_.find(item->getCategory());
assert(it != this->categoryCount_.end());
if (it->second <= 1) {
this->categoryCount.erase(it);
this->categoryCount_.erase(it);
this->removeCustomRow(index - 1);
} else {
it->second--;

View file

@ -33,7 +33,7 @@ protected:
friend class AccountController;
private:
std::unordered_map<QString, int> categoryCount;
std::unordered_map<QString, int> categoryCount_;
};
} // namespace chatterino

View file

@ -28,11 +28,11 @@ namespace chatterino {
CommandController::CommandController()
{
auto addFirstMatchToMap = [this](auto args) {
this->commandsMap.remove(args.item.name);
this->commandsMap_.remove(args.item.name);
for (const Command &cmd : this->items.getVector()) {
if (cmd.name == args.item.name) {
this->commandsMap[cmd.name] = cmd;
this->commandsMap_[cmd.name] = cmd;
break;
}
}
@ -45,9 +45,9 @@ CommandController::CommandController()
void CommandController::load()
{
auto app = getApp();
this->filePath = app->paths->settingsDirectory + "/commands.txt";
this->filePath_ = app->paths->settingsDirectory + "/commands.txt";
QFile textFile(this->filePath);
QFile textFile(this->filePath_);
if (!textFile.open(QIODevice::ReadOnly)) {
// No commands file created yet
return;
@ -68,9 +68,9 @@ void CommandController::load()
void CommandController::save()
{
QFile textFile(this->filePath);
QFile textFile(this->filePath_);
if (!textFile.open(QIODevice::WriteOnly)) {
Log("[CommandController::saveCommands] Unable to open {} for writing", this->filePath);
Log("[CommandController::saveCommands] Unable to open {} for writing", this->filePath_);
return;
}
@ -95,7 +95,7 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
Command command;
{
std::lock_guard<std::mutex> lock(this->mutex);
std::lock_guard<std::mutex> lock(this->mutex_);
if (words.length() == 0) {
return text;
@ -202,8 +202,8 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
}
// check if custom command exists
auto it = this->commandsMap.find(commandName);
if (it == this->commandsMap.end()) {
auto it = this->commandsMap_.find(commandName);
if (it == this->commandsMap_.end()) {
return text;
}

View file

@ -28,10 +28,10 @@ public:
UnsortedSignalVector<Command> items;
private:
QMap<QString, Command> commandsMap;
QMap<QString, Command> commandsMap_;
std::mutex mutex;
QString filePath;
std::mutex mutex_;
QString filePath_;
QString execCustomCommand(const QStringList &words, const Command &command);
};

View file

@ -13,10 +13,6 @@ namespace chatterino {
class HighlightBlacklistUser
{
QString pattern_;
bool isRegex_;
QRegularExpression regex_;
public:
bool operator==(const HighlightBlacklistUser &other) const
{
@ -58,6 +54,11 @@ public:
return subject.toLower() == this->pattern_.toLower();
}
private:
QString pattern_;
bool isRegex_;
QRegularExpression regex_;
};
} // namespace chatterino

View file

@ -14,15 +14,15 @@ HighlightController::HighlightController()
void HighlightController::initialize()
{
assert(!this->initialized);
this->initialized = true;
assert(!this->initialized_);
this->initialized_ = true;
for (const HighlightPhrase &phrase : this->highlightsSetting.getValue()) {
for (const HighlightPhrase &phrase : this->highlightsSetting_.getValue()) {
this->phrases.appendItem(phrase);
}
this->phrases.delayedItemsChanged.connect([this] { //
this->highlightsSetting.setValue(this->phrases.getVector());
this->highlightsSetting_.setValue(this->phrases.getVector());
});
}

View file

@ -33,11 +33,11 @@ public:
void addHighlight(const MessagePtr &msg);
private:
bool initialized = false;
bool initialized_ = false;
ChatterinoSetting<std::vector<HighlightPhrase>> highlightsSetting = {
ChatterinoSetting<std::vector<HighlightPhrase>> highlightsSetting_ = {
"/highlighting/highlights"};
ChatterinoSetting<std::vector<HighlightPhrase>> blacklistSetting = {"/highlighting/blacklist"};
ChatterinoSetting<std::vector<HighlightPhrase>> blacklistSetting_ = {"/highlighting/blacklist"};
};
} // namespace chatterino

View file

@ -11,25 +11,19 @@ namespace chatterino {
class HighlightPhrase
{
QString pattern;
bool alert;
bool sound;
bool _isRegex;
QRegularExpression regex;
public:
bool operator==(const HighlightPhrase &other) const
{
return std::tie(this->pattern, this->sound, this->alert, this->_isRegex) ==
std::tie(other.pattern, other.sound, other.alert, other._isRegex);
return std::tie(this->pattern_, this->sound_, this->alert_, this->isRegex_) ==
std::tie(other.pattern_, other.sound_, other.alert_, other.isRegex_);
}
HighlightPhrase(const QString &_pattern, bool _alert, bool _sound, bool isRegex)
: pattern(_pattern)
, alert(_alert)
, sound(_sound)
, _isRegex(isRegex)
, regex(_isRegex ? _pattern : "\\b" + QRegularExpression::escape(_pattern) + "\\b",
HighlightPhrase(const QString &pattern, bool alert, bool sound, bool isRegex)
: pattern_(pattern)
, alert_(alert)
, sound_(sound)
, isRegex_(isRegex)
, regex_(isRegex_ ? pattern : "\\b" + QRegularExpression::escape(pattern) + "\\b",
QRegularExpression::CaseInsensitiveOption |
QRegularExpression::UseUnicodePropertiesOption)
{
@ -37,35 +31,37 @@ public:
const QString &getPattern() const
{
return this->pattern;
return this->pattern_;
}
bool getAlert() const
{
return this->alert;
return this->alert_;
}
bool getSound() const
{
return this->sound;
return this->sound_;
}
bool isRegex() const
{
return this->_isRegex;
return this->isRegex_;
}
bool isValid() const
{
return !this->pattern.isEmpty() && this->regex.isValid();
return !this->pattern_.isEmpty() && this->regex_.isValid();
}
bool isMatch(const QString &subject) const
{
return this->isValid() && this->regex.match(subject).hasMatch();
return this->isValid() && this->regex_.match(subject).hasMatch();
}
// const QRegularExpression &getRegex() const
// {
// return this->regex;
// }
private:
QString pattern_;
bool alert_;
bool sound_;
bool isRegex_;
QRegularExpression regex_;
};
} // namespace chatterino