4#ifndef QPLACESEARCHRESULT_P_H
5#define QPLACESEARCHRESULT_P_H
22#include <QtLocation/QPlaceIcon>
27#define Q_IMPLEMENT_SEARCHRESULT_D_FUNC(Class) \
28 Class##Private *Class::d_func() { return reinterpret_cast<Class##Private *>(d_ptr.data()); } \
29 const Class##Private *Class::d_func() const { return reinterpret_cast<const Class##Private *>(d_ptr.constData()); } \
31#define Q_IMPLEMENT_SEARCHRESULT_COPY_CTOR(Class) \
32 Class::Class(const QPlaceSearchResult &other) : QPlaceSearchResult() { Class##Private::copyIfPossible(d_ptr, other); }
34#define Q_DEFINE_SEARCHRESULT_PRIVATE_HELPER(Class, ResultType) \
35 QPlaceSearchResultPrivate *clone() const override { return new Class##Private(*this); } \
36 QPlaceSearchResult::SearchResultType type() const override {return ResultType;} \
37 static void copyIfPossible(QSharedDataPointer<QPlaceSearchResultPrivate> &d_ptr, const QPlaceSearchResult &other) \
39 if (other.type() == ResultType) \
40 d_ptr = extract_d(other); \
42 d_ptr = new Class##Private; \
virtual QPlaceSearchResultPrivate * clone() const
static void copyIfPossible(QSharedDataPointer< QPlaceSearchResultPrivate > &d_ptr, const QPlaceSearchResult &other)
virtual bool compare(const QPlaceSearchResultPrivate *other) const
virtual ~QPlaceSearchResultPrivate()
static const QSharedDataPointer< QPlaceSearchResultPrivate > & extract_d(const QPlaceSearchResult &other)
QPlaceSearchResultPrivate()
virtual QPlaceSearchResult::SearchResultType type() const
SearchResultType
Defines the type of search result.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.