diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-14 16:07:30 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-20 13:42:05 +0200 |
commit | 30bb5ed1308b9110a3903bee9d254e5b759d37f5 (patch) | |
tree | 00439b0c1a119a5c0124cd19a7bae0491b8f21bc | |
parent | e534ad70e047f4c9b52f77dc0b740fcaa6208667 (diff) | |
download | qtlocation-30bb5ed1308b9110a3903bee9d254e5b759d37f5.tar.gz |
Cleanup: de-virtualize QPlaceAttributePrivate
The possibility to override this type in plugins is not used anywhere,
and overcomplicates the code. There isn't even a way to create a
QPlaceAttribute with a reimplementation of the private.
So remove this; if this is really needed for anything, then we can bring
it back later.
Change-Id: I4881583b87b775a4bcaf36bc972248b321e0ef2b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 29bf63108f954119a0df6c70dd283367777a7e23)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/location/places/qplaceattribute.cpp | 12 | ||||
-rw-r--r-- | src/location/places/qplaceattribute_p.h | 8 |
2 files changed, 1 insertions, 19 deletions
diff --git a/src/location/places/qplaceattribute.cpp b/src/location/places/qplaceattribute.cpp index 495fcd1c..83b39617 100644 --- a/src/location/places/qplaceattribute.cpp +++ b/src/location/places/qplaceattribute.cpp @@ -44,18 +44,6 @@ QT_USE_NAMESPACE QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QPlaceAttributePrivate) -template<> QPlaceAttributePrivate *QSharedDataPointer<QPlaceAttributePrivate>::clone() -{ - return d->clone(); -} - -QPlaceAttributePrivate::QPlaceAttributePrivate(const QPlaceAttributePrivate &other) - : QSharedData(other), - label(other.label), - text(other.text) -{ -} - bool QPlaceAttributePrivate::operator== (const QPlaceAttributePrivate &other) const { return label == other.label diff --git a/src/location/places/qplaceattribute_p.h b/src/location/places/qplaceattribute_p.h index b1d576c0..849ef29f 100644 --- a/src/location/places/qplaceattribute_p.h +++ b/src/location/places/qplaceattribute_p.h @@ -61,11 +61,7 @@ QT_BEGIN_NAMESPACE class QPlaceAttributePrivate : public QSharedData { public: - QPlaceAttributePrivate(){} - QPlaceAttributePrivate(const QPlaceAttributePrivate &other); - virtual ~QPlaceAttributePrivate(){} - virtual bool operator== (const QPlaceAttributePrivate &other) const; - virtual QPlaceAttributePrivate *clone() const { return new QPlaceAttributePrivate(*this); } + bool operator== (const QPlaceAttributePrivate &other) const; bool isEmpty() const; @@ -73,8 +69,6 @@ public: QString text; }; -template<> QPlaceAttributePrivate *QSharedDataPointer<QPlaceAttributePrivate>::clone(); - QT_END_NAMESPACE #endif |