OpenCoverage

qqmlcomponent.h #2

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlcomponent.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQml module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#ifndef QQMLCOMPONENT_H-
41#define QQMLCOMPONENT_H-
42-
43#include <QtQml/qqml.h>-
44#include <QtQml/qqmlerror.h>-
45-
46#include <QtCore/qobject.h>-
47#include <QtCore/qstring.h>-
48#include <QtQml/qjsvalue.h>-
49-
50QT_BEGIN_NAMESPACE-
51-
52-
53class QByteArray;-
54class QQmlEngine;-
55class QQmlComponent;-
56class QQmlIncubator;-
57class QQmlV4Function;-
58class QQmlComponentPrivate;-
59class QQmlComponentAttached;-
60-
61namespace QV4 {-
62namespace CompiledData {-
63struct CompilationUnit;-
64}-
65}-
66-
67class Q_QML_EXPORT QQmlComponent : public QObject-
68{-
69 Q_OBJECT-
70 Q_DECLARE_PRIVATE(QQmlComponent)
executed 388580 times by 142 tests: return reinterpret_cast<QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
executed 312505 times by 142 tests: return reinterpret_cast<const QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • ...
312505-388580
71-
72 Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)-
73 Q_PROPERTY(Status status READ status NOTIFY statusChanged)-
74 Q_PROPERTY(QUrl url READ url CONSTANT)-
75-
76public:-
77 enum CompilationMode { PreferSynchronous, Asynchronous };-
78 Q_ENUM(CompilationMode)-
79-
80 QQmlComponent(QObject *parent = nullptr);-
81 QQmlComponent(QQmlEngine *, QObject *parent = nullptr);-
82 QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = nullptr);-
83 QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = nullptr);-
84 QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = nullptr);-
85 QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = nullptr);-
86 ~QQmlComponent() override;-
87-
88 enum Status { Null, Ready, Loading, Error };-
89 Q_ENUM(Status)-
90 Status status() const;-
91-
92 bool isNull() const;-
93 bool isReady() const;-
94 bool isError() const;-
95 bool isLoading() const;-
96-
97 QList<QQmlError> errors() const;-
98 Q_INVOKABLE QString errorString() const;-
99-
100 qreal progress() const;-
101-
102 QUrl url() const;-
103-
104 virtual QObject *create(QQmlContext *context = nullptr);-
105 virtual QObject *beginCreate(QQmlContext *);-
106 virtual void completeCreate();-
107-
108 void create(QQmlIncubator &, QQmlContext *context = nullptr,-
109 QQmlContext *forContext = nullptr);-
110-
111 QQmlContext *creationContext() const;-
112-
113 static QQmlComponentAttached *qmlAttachedProperties(QObject *);-
114-
115public Q_SLOTS:-
116 void loadUrl(const QUrl &url);-
117 void loadUrl(const QUrl &url, CompilationMode mode);-
118 void setData(const QByteArray &, const QUrl &baseUrl);-
119-
120Q_SIGNALS:-
121 void statusChanged(QQmlComponent::Status);-
122 void progressChanged(qreal);-
123-
124protected:-
125 QQmlComponent(QQmlComponentPrivate &dd, QObject* parent);-
126 Q_INVOKABLE void createObject(QQmlV4Function *);-
127 Q_INVOKABLE void incubateObject(QQmlV4Function *);-
128-
129private:-
130 QQmlComponent(QQmlEngine *, QV4::CompiledData::CompilationUnit *compilationUnit, int, QObject *parent);-
131-
132 Q_DISABLE_COPY(QQmlComponent)-
133 friend class QQmlTypeData;-
134 friend class QQmlObjectCreator;-
135};-
136-
137QT_END_NAMESPACE-
138-
139QML_DECLARE_TYPE(QQmlComponent)-
140QML_DECLARE_TYPEINFO(QQmlComponent, QML_HAS_ATTACHED_PROPERTIES)-
141-
142#endif // QQMLCOMPONENT_H-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0