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
qqmlerror.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4
5#ifndef QQMLERROR_H
6#define QQMLERROR_H
7
8#include <QtQml/qtqmlglobal.h>
9
10#include <QtCore/qurl.h>
11#include <QtCore/qstring.h>
12
14
15// ### Qt 7: should this be called QQmlMessage, since it can have a message type?
16class QDebug;
18class Q_QML_EXPORT QQmlError
19{
20public:
21 QQmlError();
22 QQmlError(const QQmlError &);
23 QQmlError(QQmlError &&other) noexcept
24 : d(std::exchange(other.d, nullptr))
25 {}
26
27 QQmlError &operator=(const QQmlError &);
28 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QQmlError)
29 ~QQmlError();
30
31 void swap(QQmlError &other)
32 { qt_ptr_swap(d, other.d); }
33
34 bool isValid() const;
35
36 QUrl url() const;
37 void setUrl(const QUrl &);
38 QString description() const;
39 void setDescription(const QString &);
40 int line() const;
41 void setLine(int);
42 int column() const;
43 void setColumn(int);
44
45 QObject *object() const;
46 void setObject(QObject *);
47
48 QtMsgType messageType() const;
49 void setMessageType(QtMsgType messageType);
50
51 QString toString() const;
52 friend bool Q_QML_EXPORT operator==(const QQmlError &a, const QQmlError &b);
53private:
54 QQmlErrorPrivate *d;
55};
56
57QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error);
58
59Q_DECLARE_TYPEINFO(QQmlError, Q_RELOCATABLE_TYPE);
60
61QT_END_NAMESPACE
62
63#endif // QQMLERROR_H
\inmodule QtCore
Definition qobject.h:106
void setInitialState(QObject *o) override
Called after the object is first created, but before complex property bindings are evaluated and,...
void statusChanged(Status s) override
Called when the status of the incubator changes.
QQmlComponentIncubator(QV4::Heap::QmlIncubatorObject *inc, IncubationMode mode)
QV4::PersistentValue incubatorObject
The QQmlComponent class encapsulates a QML component definition.
The QQmlError class encapsulates a QML error.
Definition qqmlerror.h:19
Status
Specifies the status of the QQmlIncubator.
Combined button and popup list for selecting options.
DECLARE_HEAP_OBJECT(QmlContext, ExecutionContext)
Definition qjsvalue.h:24
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
static void removePendingQPropertyBinding(QV4::Value *object, const QString &propertyName, const QQmlObjectCreator *creator)
static void QQmlComponent_setQmlParent(QObject *me, QObject *parent)
DEFINE_OBJECT_VTABLE(QV4::QmlIncubatorObject)
V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension)
static QQmlParserStatus * parserStatusCast(const QQmlType &type, QObject *rv)
QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error)
static ReturnedValue method_set_statusChanged(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_status(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_object(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void statusChanged(QQmlIncubator::Status)
void setInitialState(QObject *, RequiredProperties *requiredProperties)
static ReturnedValue method_forceCompletion(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)