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
unsupportedreplies_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 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
4#ifndef UNSUPPORTEDREPLIES_P_H
5#define UNSUPPORTEDREPLIES_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtLocation/private/qlocationglobal_p.h>
23#include "qplaceidreply.h"
24
27
29
30class Q_LOCATION_EXPORT QPlaceDetailsReplyUnsupported : public QPlaceDetailsReply
31{
32 Q_OBJECT
33
34public:
35 QPlaceDetailsReplyUnsupported(QPlaceManagerEngine *parent)
36 : QPlaceDetailsReply(parent)
37 {
38 setError(QPlaceReply::UnsupportedError,
39 QStringLiteral("Getting place details is not supported."));
40 setFinished(true);
41 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
42 Q_ARG(QPlaceReply::Error, error()),
43 Q_ARG(QString, errorString()));
44 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
45 Q_ARG(QPlaceReply *, this),
46 Q_ARG(QPlaceReply::Error, error()),
47 Q_ARG(QString, errorString()));
48 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
49 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
50 Q_ARG(QPlaceReply *, this));
51 }
52};
53
54class Q_LOCATION_EXPORT QPlaceContentReplyUnsupported : public QPlaceContentReply
55{
56 Q_OBJECT
57
58public:
59 QPlaceContentReplyUnsupported(QPlaceManagerEngine *parent)
60 : QPlaceContentReply(parent)
61 {
62 setError(QPlaceReply::UnsupportedError,
63 QStringLiteral("Place content is not supported."));
64 setFinished(true);
65 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
66 Q_ARG(QPlaceReply::Error, error()),
67 Q_ARG(QString, errorString()));
68 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
69 Q_ARG(QPlaceReply *, this),
70 Q_ARG(QPlaceReply::Error, error()),
71 Q_ARG(QString, errorString()));
72 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
73 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
74 Q_ARG(QPlaceReply *, this));
75 }
76};
77
78class Q_LOCATION_EXPORT QPlaceSearchReplyUnsupported : public QPlaceSearchReply
79{
80 Q_OBJECT
81
82public:
83 QPlaceSearchReplyUnsupported(QPlaceReply::Error errorCode, const QString &message,
84 QPlaceManagerEngine *parent)
85 : QPlaceSearchReply(parent)
86 {
87 setError(errorCode, message);
88 setFinished(true);
89 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
90 Q_ARG(QPlaceReply::Error, error()),
91 Q_ARG(QString, errorString()));
92 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
93 Q_ARG(QPlaceReply *, this),
94 Q_ARG(QPlaceReply::Error, error()),
95 Q_ARG(QString, errorString()));
96 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
97 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
98 Q_ARG(QPlaceReply *, this));
99 }
100};
101
102class Q_LOCATION_EXPORT QPlaceSearchSuggestionReplyUnsupported : public QPlaceSearchSuggestionReply
103{
104 Q_OBJECT
105
106public:
107 QPlaceSearchSuggestionReplyUnsupported(QPlaceManagerEngine *parent)
108 : QPlaceSearchSuggestionReply(parent)
109 {
110 setError(QPlaceReply::UnsupportedError,
111 QStringLiteral("Place search suggestions are not supported."));
112 setFinished(true);
113 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
114 Q_ARG(QPlaceReply::Error, error()),
115 Q_ARG(QString, errorString()));
116 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
117 Q_ARG(QPlaceReply *, this),
118 Q_ARG(QPlaceReply::Error, error()),
119 Q_ARG(QString, errorString()));
120 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
121 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
122 Q_ARG(QPlaceReply *, this));
123 }
124};
125
126class Q_LOCATION_EXPORT QPlaceIdReplyUnsupported : public QPlaceIdReply
127{
128 Q_OBJECT
129
130public:
131 QPlaceIdReplyUnsupported(const QString &message, QPlaceIdReply::OperationType type,
132 QPlaceManagerEngine *parent)
133 : QPlaceIdReply(type, parent)
134 {
135 setError(QPlaceReply::UnsupportedError, message);
136 setFinished(true);
137 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
138 Q_ARG(QPlaceReply::Error, error()),
139 Q_ARG(QString, errorString()));
140 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
141 Q_ARG(QPlaceReply *, this),
142 Q_ARG(QPlaceReply::Error, error()),
143 Q_ARG(QString, errorString()));
144 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
145 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
146 Q_ARG(QPlaceReply *, this));
147 }
148};
149
150class Q_LOCATION_EXPORT QPlaceReplyUnsupported : public QPlaceReply
151{
152 Q_OBJECT
153
154public:
155 QPlaceReplyUnsupported(const QString &message, QPlaceManagerEngine *parent)
156 : QPlaceReply(parent)
157 {
158 setError(QPlaceReply::UnsupportedError, message);
159 setFinished(true);
160 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
161 Q_ARG(QPlaceReply::Error, error()),
162 Q_ARG(QString, errorString()));
163 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
164 Q_ARG(QPlaceReply *, this),
165 Q_ARG(QPlaceReply::Error, error()),
166 Q_ARG(QString, errorString()));
167 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
168 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
169 Q_ARG(QPlaceReply *, this));
170 }
171};
172
173class Q_LOCATION_EXPORT QPlaceMatchReplyUnsupported : public QPlaceMatchReply
174{
175 Q_OBJECT
176
177public:
178 QPlaceMatchReplyUnsupported(QPlaceManagerEngine *parent)
179 : QPlaceMatchReply(parent)
180 {
181 setError(QPlaceReply::UnsupportedError,
182 QStringLiteral("Place matching is not supported."));
183 setFinished(true);
184 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
185 Q_ARG(QPlaceReply::Error, error()),
186 Q_ARG(QString, errorString()));
187 QMetaObject::invokeMethod(parent, "errorOccurred", Qt::QueuedConnection,
188 Q_ARG(QPlaceReply *, this),
189 Q_ARG(QPlaceReply::Error, error()),
190 Q_ARG(QString, errorString()));
191 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
192 QMetaObject::invokeMethod(parent, "finished", Qt::QueuedConnection,
193 Q_ARG(QPlaceReply *, this));
194 }
195};
196
197QT_END_NAMESPACE
198
199#endif