OpenCoverage

qqmlengine.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlengine.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QQmlAbstractUrlInterceptor;-
5-
6class __attribute__((visibility("default"))) QQmlImageProviderBase-
7{-
8public:-
9 enum ImageType {-
10 Image,-
11 Pixmap,-
12 Texture,-
13 Invalid,-
14 ImageResponse-
15-
16 };-
17-
18 enum Flag {-
19 ForceAsynchronousImageLoading = 0x01-
20 };-
21 typedef QFlags<Flag> Flags;-
22-
23 virtual ~QQmlImageProviderBase();-
24-
25 virtual ImageType imageType() const = 0;-
26 virtual Flags flags() const = 0;-
27-
28private:-
29 friend class QQuickImageProvider;-
30 QQmlImageProviderBase();-
31};-
32constexpr inline QFlags<QQmlImageProviderBase::Flags::enum_type> operator|(QQmlImageProviderBase::Flags::enum_type f1, QQmlImageProviderBase::Flags::enum_type f2) noexcept { return QFlags<QQmlImageProviderBase::Flags::enum_type>(f1) | f2; } constexpr inline QFlags<QQmlImageProviderBase::Flags::enum_type> operator|(QQmlImageProviderBase::Flags::enum_type f1, QFlags<QQmlImageProviderBase::Flags::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQmlImageProviderBase::Flags::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); }-
33-
34class QQmlComponent;-
35class QQmlEnginePrivate;-
36class QQmlImportsPrivate;-
37class QQmlExpression;-
38class QQmlContext;-
39class QQmlType;-
40class QUrl;-
41-
42class QNetworkAccessManager;-
43class QQmlNetworkAccessManagerFactory;-
44-
45class QQmlIncubationController;-
46class __attribute__((visibility("default"))) QQmlEngine : public QJSEngine-
47{-
48 -
49 public:-
50#pragma GCC diagnostic push-
51 -
52#pragma GCC diagnostic ignored "-Wsuggest-override"-
53 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
54#pragma GCC diagnostic ignored "-Wattributes"-
55 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
56#pragma GCC diagnostic pop-
57 struct QPrivateSignal {};-
58public:-
59 explicit QQmlEngine(QObject *p = nullptr);-
60 ~QQmlEngine() override;-
61-
62 QQmlContext *rootContext() const;-
63-
64 void clearComponentCache();-
65 void trimComponentCache();-
66-
67 QStringList importPathList() const;-
68 void setImportPathList(const QStringList &paths);-
69 void addImportPath(const QString& dir);-
70-
71 QStringList pluginPathList() const;-
72 void setPluginPathList(const QStringList &paths);-
73 void addPluginPath(const QString& dir);-
74-
75 bool addNamedBundle(const QString &name, const QString &fileName);-
76-
77 bool importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors);-
78-
79-
80 void setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory *);-
81 QQmlNetworkAccessManagerFactory *networkAccessManagerFactory() const;-
82-
83 QNetworkAccessManager *networkAccessManager() const;-
84-
85-
86 void setUrlInterceptor(QQmlAbstractUrlInterceptor* urlInterceptor);-
87 QQmlAbstractUrlInterceptor* urlInterceptor() const;-
88-
89 void addImageProvider(const QString &id, QQmlImageProviderBase *);-
90 QQmlImageProviderBase *imageProvider(const QString &id) const;-
91 void removeImageProvider(const QString &id);-
92-
93 void setIncubationController(QQmlIncubationController *);-
94 QQmlIncubationController *incubationController() const;-
95-
96 void setOfflineStoragePath(const QString& dir);-
97 QString offlineStoragePath() const;-
98 QString offlineStorageDatabaseFilePath(const QString &databaseName) const;-
99-
100 QUrl baseUrl() const;-
101 void setBaseUrl(const QUrl &);-
102-
103 bool outputWarningsToStandardError() const;-
104 void setOutputWarningsToStandardError(bool);-
105-
106 template<typename T>-
107 T singletonInstance(int qmlTypeId);-
108-
109public :-
110 void retranslate();-
111-
112public:-
113 static QQmlContext *contextForObject(const QObject *);-
114 static void setContextForObject(QObject *, QQmlContext *);-
115-
116 enum ObjectOwnership { CppOwnership, JavaScriptOwnership };-
117 static void setObjectOwnership(QObject *, ObjectOwnership);-
118 static ObjectOwnership objectOwnership(QObject *);-
119protected:-
120 QQmlEngine(QQmlEnginePrivate &dd, QObject *p);-
121 bool event(QEvent *) override;-
122-
123public :-
124 void quit();-
125 void exit(int retCode);-
126 void warnings(const QList<QQmlError> &warnings);-
127-
128private:-
129 QQmlEngine(const QQmlEngine &) = delete; QQmlEngine &operator=(const QQmlEngine &) = delete;-
130 inline QQmlEnginePrivate* d_func() { return
executed 16341040 times by 146 tests: return reinterpret_cast<QQmlEnginePrivate *>(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_qqmldebuglocal
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
reinterpret_cast<QQmlEnginePrivate *>(qGetPtrHelper(d_ptr));
executed 16341040 times by 146 tests: return reinterpret_cast<QQmlEnginePrivate *>(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_qqmldebuglocal
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • ...
} inline const QQmlEnginePrivate* d_func() const { return
executed 4173 times by 96 tests: return reinterpret_cast<const QQmlEnginePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlopenmetaobject
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • ...
reinterpret_cast<const QQmlEnginePrivate *>(qGetPtrHelper(d_ptr));
executed 4173 times by 96 tests: return reinterpret_cast<const QQmlEnginePrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlopenmetaobject
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • ...
} friend class QQmlEnginePrivate;
4173-16341040
131};-
132-
133template<>-
134__attribute__((visibility("default"))) QJSValue QQmlEngine::singletonInstance<QJSValue>(int qmlTypeId);-
135-
136template<typename T>-
137T QQmlEngine::singletonInstance(int qmlTypeId) {-
138 QJSValue instance = singletonInstance<QJSValue>(qmlTypeId);-
139 if (!instance.isQObject()
!instance.isQObject()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
140 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
141-
142 QObject *object = instance.toQObject();-
143 return
never executed: return qobject_cast<T>(object);
qobject_cast<T>(object);
never executed: return qobject_cast<T>(object);
0
144}-
145-
146-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0