diff options
Diffstat (limited to 'installerbuilder')
-rw-r--r-- | installerbuilder/common/repository.cpp | 13 | ||||
-rw-r--r-- | installerbuilder/common/repository.h | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/installerbuilder/common/repository.cpp b/installerbuilder/common/repository.cpp index cb22a746b..dfcfdb756 100644 --- a/installerbuilder/common/repository.cpp +++ b/installerbuilder/common/repository.cpp @@ -152,8 +152,8 @@ void Repository::setPassword(const QString &password) } /*! - Compares the value of this repository to \a other and returns true if they are equal (same server, - default state, enabled state as well as username and password). + Compares the values of this repository to \a other and returns true if they are equal (same server, + default state, enabled state as well as username and password). \sa operator!=() */ bool Repository::operator==(const Repository &other) const { @@ -162,6 +162,15 @@ bool Repository::operator==(const Repository &other) const } /*! + Returns true if the \a other repository is not equal to this repository; otherwise returns false. Two + repositories are considered equal if they contain the same elements. \sa operator==() +*/ +bool Repository::operator!=(const Repository &other) const +{ + return !(*this == other); +} + +/*! Assigns the values of repository \a other to this repository. */ const Repository &Repository::operator=(const Repository &other) diff --git a/installerbuilder/common/repository.h b/installerbuilder/common/repository.h index 8438df20b..9110725ad 100644 --- a/installerbuilder/common/repository.h +++ b/installerbuilder/common/repository.h @@ -61,8 +61,10 @@ public: QString password() const; void setPassword(const QString &password); - uint qHash(const Repository &repository); bool operator==(const Repository &other) const; + bool operator!=(const Repository &other) const; + + uint qHash(const Repository &repository); const Repository &operator=(const Repository &other); friend QDataStream &operator>>(QDataStream &istream, Repository &repository); |