#include <QString>
#include <QStringList>
#include <QRegExp>
+#include <utility>
#include "expressionmatch.h"
#include "message.h"
SYNCABLE_OBJECT
public:
- inline IgnoreListManager(QObject *parent = 0) : SyncableObject(parent) { setAllowClientUpdates(true); }
+ inline IgnoreListManager(QObject *parent = nullptr) : SyncableObject(parent) { setAllowClientUpdates(true); }
IgnoreListManager &operator=(const IgnoreListManager &other);
enum IgnoreType {
/**
* Construct an empty ignore rule
*/
- IgnoreListItem() {}
+ IgnoreListItem() = default;
/**
* Construct an ignore rule with the given parameters
* @param scopeRule String representing a scope rule expression to match
* @param isEnabled True if enabled, otherwise false
*/
- IgnoreListItem(IgnoreType type, const QString &contents, bool isRegEx,
- StrictnessType strictness, ScopeType scope, const QString &scopeRule,
+ IgnoreListItem(IgnoreType type, QString contents, bool isRegEx,
+ StrictnessType strictness, ScopeType scope, QString scopeRule,
bool isEnabled)
- : _contents(contents), _isRegEx(isRegEx), _strictness(strictness),
- _scope(scope), _scopeRule(scopeRule), _isEnabled(isEnabled)
+ : _contents(std::move(contents)), _isRegEx(isRegEx), _strictness(strictness),
+ _scope(scope), _scopeRule(std::move(scopeRule)), _isEnabled(isEnabled)
{
// Allow passing empty "contents" as they can happen when editing an ignore rule
mutable ExpressionMatch _ctcpSenderMatch = {}; ///< Expression match cache for CTCP nick
};
- typedef QList<IgnoreListItem> IgnoreList;
+ using IgnoreList = QList<IgnoreListItem>;
int indexOf(const QString &ignore) const;
inline bool contains(const QString &ignore) const { return indexOf(ignore) != -1; }