diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-11-30 12:58:56 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-12-09 20:13:39 +0100 |
commit | 8fdf4f62e35e344f23849be5160eb08035ff09e5 (patch) | |
tree | 1d069dea7bb2e325ab4a8447ad3318e2808dcffd /src | |
parent | f72d2a6c62b7f85d5b64717924c982dec1f69f5c (diff) |
Adopt modern QESDP usage
Change-Id: I654c07c3b9925977dd85821a36fd6f8130556cac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/pdf/qpdfdestination.cpp | 23 | ||||
-rw-r--r-- | src/pdf/qpdfdestination.h | 4 | ||||
-rw-r--r-- | src/pdf/qpdfselection.cpp | 23 | ||||
-rw-r--r-- | src/pdf/qpdfselection.h | 4 |
4 files changed, 14 insertions, 40 deletions
diff --git a/src/pdf/qpdfdestination.cpp b/src/pdf/qpdfdestination.cpp index 4eb1507fd..33ec391da 100644 --- a/src/pdf/qpdfdestination.cpp +++ b/src/pdf/qpdfdestination.cpp @@ -71,25 +71,10 @@ QPdfDestination::QPdfDestination(QPdfDestinationPrivate *d) { } -QPdfDestination::QPdfDestination(const QPdfDestination &other) - : d(other.d) -{ -} - -QPdfDestination::QPdfDestination(QPdfDestination &&other) noexcept - : d(std::move(other.d)) -{ -} - -QPdfDestination::~QPdfDestination() -{ -} - -QPdfDestination &QPdfDestination::operator=(const QPdfDestination &other) -{ - d = other.d; - return *this; -} +QPdfDestination::~QPdfDestination() = default; +QPdfDestination::QPdfDestination(const QPdfDestination &other) = default; +QPdfDestination::QPdfDestination(QPdfDestination &&other) noexcept = default; +QPdfDestination &QPdfDestination::operator=(const QPdfDestination &other) = default; /*! \property QPdfDestination::valid diff --git a/src/pdf/qpdfdestination.h b/src/pdf/qpdfdestination.h index f23777944..efc283ade 100644 --- a/src/pdf/qpdfdestination.h +++ b/src/pdf/qpdfdestination.h @@ -62,8 +62,10 @@ public: ~QPdfDestination(); QPdfDestination(const QPdfDestination &other); QPdfDestination &operator=(const QPdfDestination &other); + QPdfDestination(QPdfDestination &&other) noexcept; - QPdfDestination &operator=(QPdfDestination &&other) noexcept { swap(other); return *this; } + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPdfDestination) + void swap(QPdfDestination &other) noexcept { d.swap(other.d); } bool isValid() const; int page() const; diff --git a/src/pdf/qpdfselection.cpp b/src/pdf/qpdfselection.cpp index 494494706..514d8a0e3 100644 --- a/src/pdf/qpdfselection.cpp +++ b/src/pdf/qpdfselection.cpp @@ -80,25 +80,10 @@ QPdfSelection::QPdfSelection(QPdfSelectionPrivate *d) { } -QPdfSelection::QPdfSelection(const QPdfSelection &other) - : d(other.d) -{ -} - -QPdfSelection::QPdfSelection(QPdfSelection &&other) noexcept - : d(std::move(other.d)) -{ -} - -QPdfSelection::~QPdfSelection() -{ -} - -QPdfSelection &QPdfSelection::operator=(const QPdfSelection &other) -{ - d = other.d; - return *this; -} +QPdfSelection::~QPdfSelection() = default; +QPdfSelection::QPdfSelection(const QPdfSelection &other) = default; +QPdfSelection::QPdfSelection(QPdfSelection &&other) noexcept = default; +QPdfSelection &QPdfSelection::operator=(const QPdfSelection &other) = default; /*! \property QPdfSelection::valid diff --git a/src/pdf/qpdfselection.h b/src/pdf/qpdfselection.h index 7e624452b..248c1e4e3 100644 --- a/src/pdf/qpdfselection.h +++ b/src/pdf/qpdfselection.h @@ -65,8 +65,10 @@ public: ~QPdfSelection(); QPdfSelection(const QPdfSelection &other); QPdfSelection &operator=(const QPdfSelection &other); + QPdfSelection(QPdfSelection &&other) noexcept; - QPdfSelection &operator=(QPdfSelection &&other) noexcept { swap(other); return *this; } + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPdfSelection) + void swap(QPdfSelection &other) noexcept { d.swap(other.d); } bool isValid() const; QList<QPolygonF> bounds() const; |