Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplacecontent_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QPLACECONTENT_P_H
6#define QPLACECONTENT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qplacecontent.h"
20#include "qplacesupplier.h"
21#include "qplaceuser.h"
22
23#include <QtCore/QSharedData>
24#include <QtCore/QString>
25#include <QtCore/QVariant>
26
27QT_BEGIN_NAMESPACE
28
29class QPlaceContentPrivate : public QSharedData
30{
31public:
32 QPlaceContentPrivate(QPlaceContent::Type type)
33 : m_type(type)
34 {}
35 bool compare(const QPlaceContentPrivate *other) const;
36 QPlaceContent::Type type() const { return m_type; }
37
38 QMap<QPlaceContent::DataTag, QVariant> data;
39 const QPlaceContent::Type m_type = QPlaceContent::NoType;
40};
41
42#define Q_IMPLEMENT_CONTENT_COPY_CTOR(ContentClass, ContentType) ContentClass
43 ::ContentClass(const QPlaceContent &other)
44 : QPlaceContent(other.type() == ContentType ? other : QPlaceContent(ContentType)) \
45{ \
46}
47
48
49QT_END_NAMESPACE
50
51#endif
\inmodule QtLocation