Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QQMLERROR_H
5#define QQMLERROR_H
6
7#include <QtQml/qtqmlglobal.h>
8
9#include <QtCore/qurl.h>
10#include <QtCore/qstring.h>
11
13
14// ### Qt 7: should this be called QQmlMessage, since it can have a message type?
15class QDebug;
17class Q_QML_EXPORT QQmlError
18{
19public:
20 QQmlError();
21 QQmlError(const QQmlError &);
23 : d(std::exchange(other.d, nullptr))
24 {}
25
26 QQmlError &operator=(const QQmlError &);
27 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QQmlError)
28 ~QQmlError();
29
31 { qt_ptr_swap(d, other.d); }
32
33 bool isValid() const;
34
35 QUrl url() const;
36 void setUrl(const QUrl &);
37 QString description() const;
38 void setDescription(const QString &);
39 int line() const;
40 void setLine(int);
41 int column() const;
42 void setColumn(int);
43
44 QObject *object() const;
45 void setObject(QObject *);
46
47 QtMsgType messageType() const;
48 void setMessageType(QtMsgType messageType);
49
50 QString toString() const;
51 friend bool Q_QML_EXPORT operator==(const QQmlError &a, const QQmlError &b);
52private:
54};
55
56QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error);
57
59
61
62#endif // QQMLERROR_H
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
The QQmlError class encapsulates a QML error.
Definition qqmlerror.h:18
void swap(QQmlError &other)
Definition qqmlerror.h:30
QQmlError(QQmlError &&other) noexcept
Definition qqmlerror.h:22
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
QtMsgType
Definition qlogging.h:29
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint object
[3]
GLenum GLenum GLsizei void GLsizei void * column
QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error)
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
constexpr void qt_ptr_swap(T *&lhs, T *&rhs) noexcept
Definition qswap.h:29
request setUrl(QUrl("http://qt-project.org"))
@ Q_RELOCATABLE_TYPE
Definition qtypeinfo.h:158
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:180
QUrl url("example.com")
[constructor-url-reference]
QSharedPointer< T > other(t)
[5]
char * toString(const MyType &t)
[31]