Move comparison operator out of class

This commit is contained in:
Chocobo1
2022-04-04 15:10:19 +08:00
parent 9318f05e2b
commit 39c34078d6
4 changed files with 66 additions and 59 deletions

View File

@@ -53,6 +53,8 @@ namespace RSS
AutoDownloadRule(const AutoDownloadRule &other);
~AutoDownloadRule();
AutoDownloadRule &operator=(const AutoDownloadRule &other);
QString name() const;
void setName(const QString &name);
@@ -91,9 +93,7 @@ namespace RSS
bool matches(const QVariantHash &articleData) const;
bool accepts(const QVariantHash &articleData);
AutoDownloadRule &operator=(const AutoDownloadRule &other);
bool operator==(const AutoDownloadRule &other) const;
bool operator!=(const AutoDownloadRule &other) const;
friend bool operator==(const AutoDownloadRule &left, const AutoDownloadRule &right);
QJsonObject toJsonObject() const;
static AutoDownloadRule fromJsonObject(const QJsonObject &jsonObj, const QString &name = u""_qs);
@@ -111,4 +111,6 @@ namespace RSS
QSharedDataPointer<AutoDownloadRuleData> m_dataPtr;
};
bool operator!=(const AutoDownloadRule &left, const AutoDownloadRule &right);
}