OpenCoverage

qquickutilmodule.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickutilmodule.cpp
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 QtQuick 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#include "qquickutilmodule_p.h"-
41#include "qquickanimation_p.h"-
42#include "qquickanimation_p_p.h"-
43#include "qquickbehavior_p.h"-
44#include "qquicksmoothedanimation_p.h"-
45#include "qquickfontloader_p.h"-
46#include "qquickfontmetrics_p.h"-
47#include "qquickpropertychanges_p.h"-
48#include "qquickspringanimation_p.h"-
49#include "qquickstategroup_p.h"-
50#include "qquickstatechangescript_p.h"-
51#include "qquickstate_p.h"-
52#include "qquickstate_p_p.h"-
53#include "qquicksystempalette_p.h"-
54#include "qquicktextmetrics_p.h"-
55#include "qquicktransition_p.h"-
56#include "qquickanimator_p.h"-
57#if QT_CONFIG(shortcut)-
58#include "qquickshortcut_p.h"-
59#endif-
60#include "qquickvalidator_p.h"-
61#include <qqmlinfo.h>-
62#include <private/qqmltypenotavailable_p.h>-
63#include <private/qquickanimationcontroller_p.h>-
64#include <QtCore/qcoreapplication.h>-
65#include <QtGui/QInputMethod>-
66#include <QtGui/QKeySequence>-
67-
68#if QT_CONFIG(shortcut)-
69Q_DECLARE_METATYPE(QKeySequence::StandardKey)
executed 86 times by 2 tests: return id;
Executed by:
  • tst_qqmlenginecleanup
  • tst_qqmltypeloader
executed 288 times by 132 tests: return newId;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
const int id =....loadAcquire()Description
TRUEevaluated 86 times by 2 tests
Evaluated by:
  • tst_qqmlenginecleanup
  • tst_qqmltypeloader
FALSEevaluated 288 times by 132 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
86-288
70#endif-
71-
72void QQuickUtilModule::defineModule()-
73{-
74#if QT_CONFIG(im)-
75 qmlRegisterUncreatableType<QInputMethod>("QtQuick",2,0,"InputMethod",-
76 QInputMethod::tr("InputMethod is an abstract class"));-
77#endif-
78 qmlRegisterUncreatableType<QQuickAbstractAnimation>("QtQuick",2,0,"Animation",QQuickAbstractAnimation::tr("Animation is an abstract class"));-
79-
80 qmlRegisterType<QQuickBehavior>("QtQuick",2,0,"Behavior");-
81 qmlRegisterType<QQuickColorAnimation>("QtQuick",2,0,"ColorAnimation");-
82 qmlRegisterType<QQuickSmoothedAnimation>("QtQuick",2,0,"SmoothedAnimation");-
83 qmlRegisterType<QQuickFontLoader>("QtQuick",2,0,"FontLoader");-
84 qmlRegisterType<QQuickNumberAnimation>("QtQuick",2,0,"NumberAnimation");-
85 qmlRegisterType<QQuickParallelAnimation>("QtQuick",2,0,"ParallelAnimation");-
86 qmlRegisterType<QQuickPauseAnimation>("QtQuick",2,0,"PauseAnimation");-
87 qmlRegisterType<QQuickPropertyAction>("QtQuick",2,0,"PropertyAction");-
88 qmlRegisterType<QQuickPropertyAnimation>("QtQuick",2,0,"PropertyAnimation");-
89 qmlRegisterType<QQuickRotationAnimation>("QtQuick",2,0,"RotationAnimation");-
90 qmlRegisterType<QQuickScriptAction>("QtQuick",2,0,"ScriptAction");-
91 qmlRegisterType<QQuickSequentialAnimation>("QtQuick",2,0,"SequentialAnimation");-
92 qmlRegisterType<QQuickSpringAnimation>("QtQuick",2,0,"SpringAnimation");-
93 qmlRegisterType<QQuickAnimationController>("QtQuick",2,0,"AnimationController");-
94 qmlRegisterType<QQuickStateChangeScript>("QtQuick",2,0,"StateChangeScript");-
95 qmlRegisterType<QQuickStateGroup>("QtQuick",2,0,"StateGroup");-
96 qmlRegisterType<QQuickState>("QtQuick",2,0,"State");-
97 qmlRegisterType<QQuickSystemPalette>("QtQuick",2,0,"SystemPalette");-
98 qmlRegisterType<QQuickTransition>("QtQuick",2,0,"Transition");-
99 qmlRegisterType<QQuickVector3dAnimation>("QtQuick",2,0,"Vector3dAnimation");-
100-
101#if QT_CONFIG(validator)-
102 qmlRegisterType<QValidator>();-
103 qmlRegisterType<QQuickIntValidator>("QtQuick",2,0,"IntValidator");-
104 qmlRegisterType<QQuickDoubleValidator>("QtQuick",2,0,"DoubleValidator");-
105 qmlRegisterType<QRegExpValidator>("QtQuick",2,0,"RegExpValidator");-
106#endif-
107-
108 qmlRegisterUncreatableType<QQuickAnimator>("QtQuick", 2, 2, "Animator", QQuickAbstractAnimation::tr("Animator is an abstract class"));-
109 qmlRegisterType<QQuickXAnimator>("QtQuick", 2, 2, "XAnimator");-
110 qmlRegisterType<QQuickYAnimator>("QtQuick", 2, 2, "YAnimator");-
111 qmlRegisterType<QQuickScaleAnimator>("QtQuick", 2, 2, "ScaleAnimator");-
112 qmlRegisterType<QQuickRotationAnimator>("QtQuick", 2, 2, "RotationAnimator");-
113 qmlRegisterType<QQuickOpacityAnimator>("QtQuick", 2, 2, "OpacityAnimator");-
114#if QT_CONFIG(quick_shadereffect) && QT_CONFIG(opengl)-
115 qmlRegisterType<QQuickUniformAnimator>("QtQuick", 2, 2, "UniformAnimator");-
116#endif-
117 qmlRegisterType<QQuickStateOperation>();-
118-
119 qmlRegisterCustomType<QQuickPropertyChanges>("QtQuick",2,0,"PropertyChanges", new QQuickPropertyChangesParser);-
120-
121#if QT_CONFIG(shortcut)-
122 qRegisterMetaType<QKeySequence::StandardKey>();-
123 qmlRegisterUncreatableType<QKeySequence, 2>("QtQuick", 2, 2, "StandardKey", QStringLiteral("Cannot create an instance of StandardKey."));
executed 374 times by 132 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
124#endif-
125-
126 qmlRegisterType<QQuickFontMetrics>("QtQuick", 2, 4, "FontMetrics");-
127 qmlRegisterType<QQuickTextMetrics>("QtQuick", 2, 4, "TextMetrics");-
128-
129#if QT_CONFIG(shortcut)-
130 qmlRegisterType<QQuickShortcut>("QtQuick", 2, 5, "Shortcut");-
131 qmlRegisterType<QQuickShortcut,1>("QtQuick", 2, 6, "Shortcut");-
132-
133 qmlRegisterType<QQuickShortcut,9>("QtQuick", 2, 9, "Shortcut");-
134#endif-
135-
136 qmlRegisterUncreatableType<QQuickAbstractAnimation, 12>("QtQuick", 2, 12, "Animation",-
137 QQuickAbstractAnimation::tr("Animation is an abstract class"));-
138}
executed 374 times by 132 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0