diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-27 14:50:32 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-27 14:15:05 +0000 |
commit | 689eb95e94736e4d1aba1fe5bca4193413ddd4f8 (patch) | |
tree | bb7f7df12891d974f230525662d41e0b98b3e9c6 /src/assistant | |
parent | da6c83745fad37229f879d6e0b4fc74c114d5c2b (diff) |
QHelpFilterData, QCompressedHelpInfo: Add swap() method
Change-Id: I4be504cc4de6a6552b61108d0dd00d79d46308b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/assistant')
-rw-r--r-- | src/assistant/help/qcompressedhelpinfo.cpp | 7 | ||||
-rw-r--r-- | src/assistant/help/qcompressedhelpinfo.h | 3 | ||||
-rw-r--r-- | src/assistant/help/qhelpfilterdata.cpp | 7 | ||||
-rw-r--r-- | src/assistant/help/qhelpfilterdata.h | 3 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/assistant/help/qcompressedhelpinfo.cpp b/src/assistant/help/qcompressedhelpinfo.cpp index a94562297..bbdc64157 100644 --- a/src/assistant/help/qcompressedhelpinfo.cpp +++ b/src/assistant/help/qcompressedhelpinfo.cpp @@ -120,6 +120,13 @@ QCompressedHelpInfo &QCompressedHelpInfo::operator=(const QCompressedHelpInfo &) QCompressedHelpInfo &QCompressedHelpInfo::operator=(QCompressedHelpInfo &&) = default; /*! + \fn void QCompressedHelpInfo::swap(QCompressedHelpInfo &other) + + Swaps the compressed help file \a other with this compressed help file. This + operation is very fast and never fails. +*/ + +/*! Returns the namespace name of the compressed help file. */ QString QCompressedHelpInfo::namespaceName() const diff --git a/src/assistant/help/qcompressedhelpinfo.h b/src/assistant/help/qcompressedhelpinfo.h index 33f6ab097..4e9185145 100644 --- a/src/assistant/help/qcompressedhelpinfo.h +++ b/src/assistant/help/qcompressedhelpinfo.h @@ -60,6 +60,9 @@ public: QCompressedHelpInfo &operator=(const QCompressedHelpInfo &other); QCompressedHelpInfo &operator=(QCompressedHelpInfo &&other); + void swap(QCompressedHelpInfo &other) Q_DECL_NOTHROW + { d.swap(other.d); } + QString namespaceName() const; QString component() const; QVersionNumber version() const; diff --git a/src/assistant/help/qhelpfilterdata.cpp b/src/assistant/help/qhelpfilterdata.cpp index c4a12db64..0e3a28574 100644 --- a/src/assistant/help/qhelpfilterdata.cpp +++ b/src/assistant/help/qhelpfilterdata.cpp @@ -108,6 +108,13 @@ QHelpFilterData &QHelpFilterData::operator=(const QHelpFilterData &) = default; */ QHelpFilterData &QHelpFilterData::operator=(QHelpFilterData &&) = default; +/*! + \fn void QHelpFilterData::swap(QCompressedHelpInfo &other) + + Swaps the filter \a other with this filter. This + operation is very fast and never fails. +*/ + bool QHelpFilterData::operator==(const QHelpFilterData &other) const { return (d->m_components == other.d->m_components && diff --git a/src/assistant/help/qhelpfilterdata.h b/src/assistant/help/qhelpfilterdata.h index ea7f7ded9..5f69aaa63 100644 --- a/src/assistant/help/qhelpfilterdata.h +++ b/src/assistant/help/qhelpfilterdata.h @@ -61,6 +61,9 @@ public: QHelpFilterData &operator=(QHelpFilterData &&other); bool operator==(const QHelpFilterData &other) const; + void swap(QHelpFilterData &other) Q_DECL_NOTHROW + { d.swap(other.d); } + void setComponents(const QStringList &components); void setVersions(const QList<QVersionNumber> &versions); |