OpenCoverage

qqmldebugconnector.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/debugger/qqmldebugconnector.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 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#include "qqmldebugpluginmanager_p.h"-
41#include "qqmldebugconnector_p.h"-
42#include "qqmldebugservicefactory_p.h"-
43#include <QtCore/QPluginLoader>-
44#include <QtCore/QCoreApplication>-
45#include <QtCore/QDir>-
46#include <QtCore/QDebug>-
47#include <QtCore/QJsonArray>-
48#include <QtCore/QDataStream>-
49-
50#include <private/qcoreapplication_p.h>-
51#include <private/qqmlengine_p.h>-
52-
53QT_BEGIN_NAMESPACE-
54-
55// Connectors. We could add more plugins here, and distinguish by arguments to instance()-
56Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector)
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 32 times by 7 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 32 times by 7 tests: return &holder.value;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 32 times by 7 tests: return qLoadPlugin<QQmlDebugConnector, QQmlDebugConnectorFactory>(QQmlDebugConnectorLoader(), key);
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
never executed: return QQmlDebugConnectorLoader()->metaData();
guard.load() =...c::InitializedDescription
TRUEevaluated 32 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEnever evaluated
0-32
57-
58// Services-
59Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService)
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 32 times by 7 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 180 times by 7 tests: return &holder.value;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 148 times by 5 tests: return qLoadPlugin<QQmlDebugService, QQmlDebugServiceFactory>(QQmlDebugServiceLoader(), key);
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
executed 32 times by 7 tests: return QQmlDebugServiceLoader()->metaData();
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
guard.load() =...c::InitializedDescription
TRUEevaluated 32 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEnever evaluated
0-180
60-
61int QQmlDebugConnector::s_dataStreamVersion = QDataStream::Qt_4_7;-
62-
63struct QQmlDebugConnectorParams {-
64 QString pluginKey;-
65 QStringList services;-
66 QString arguments;-
67 QQmlDebugConnector *instance;-
68-
69 QQmlDebugConnectorParams() : instance(nullptr)-
70 {-
71 if (qApp) {
QCoreApplication::instance()Description
TRUEevaluated 336 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
FALSEnever evaluated
0-336
72 QCoreApplicationPrivate *appD =-
73 static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp));-
74 if (appD)
appDDescription
TRUEevaluated 336 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
FALSEnever evaluated
0-336
75 arguments = appD->qmljsDebugArgumentsString();
executed 336 times by 152 tests: arguments = appD->qmljsDebugArgumentsString();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
336
76 }
executed 336 times by 152 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
336
77 }
executed 336 times by 152 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
336
78};-
79-
80Q_GLOBAL_STATIC(QQmlDebugConnectorParams, qmlDebugConnectorParams)
executed 336 times by 152 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
executed 336 times by 152 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
executed 440896 times by 152 tests: return &holder.value;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 336 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
FALSEnever evaluated
0-440896
81-
82void QQmlDebugConnector::setPluginKey(const QString &key)-
83{-
84 QQmlDebugConnectorParams *params = qmlDebugConnectorParams();-
85 if (params && params->pluginKey != key) {
paramsDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
FALSEnever evaluated
params->pluginKey != keyDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
0-12
86 if (params->instance)
params->instanceDescription
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
0-6
87 qWarning() << "QML debugger: Cannot set plugin key after loading the plugin.";
never executed: QMessageLogger(__FILE__, 87, __PRETTY_FUNCTION__).warning() << "QML debugger: Cannot set plugin key after loading the plugin.";
0
88 else-
89 params->pluginKey = key;
executed 6 times by 3 tests: params->pluginKey = key;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
6
90 }-
91}
executed 12 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
12
92-
93void QQmlDebugConnector::setServices(const QStringList &services)-
94{-
95 QQmlDebugConnectorParams *params = qmlDebugConnectorParams();-
96 if (params)
paramsDescription
TRUEevaluated 30 times by 6 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEnever evaluated
0-30
97 params->services = services;
executed 30 times by 6 tests: params->services = services;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
30
98}
executed 30 times by 6 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
30
99-
100QString QQmlDebugConnector::commandLineArguments()-
101{-
102 QQmlDebugConnectorParams *params = qmlDebugConnectorParams();-
103 if (!params)
!paramsDescription
TRUEnever evaluated
FALSEevaluated 32 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
0-32
104 return QString();
never executed: return QString();
0
105 return params->arguments;
executed 32 times by 7 tests: return params->arguments;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
32
106}-
107-
108QQmlDebugConnector *QQmlDebugConnector::instance()-
109{-
110 QQmlDebugConnectorParams *params = qmlDebugConnectorParams();-
111 if (!params)
!paramsDescription
TRUEnever evaluated
FALSEevaluated 440790 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • ...
0-440790
112 return nullptr;
never executed: return nullptr;
0
113-
114 if (!QQmlEnginePrivate::qml_debugging_enabled) {
!QQmlEnginePri...ugging_enabledDescription
TRUEevaluated 430777 times by 142 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • ...
FALSEevaluated 10013 times by 14 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
10013-430777
115 if (!params->arguments.isEmpty()) {
!params->arguments.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 430777 times by 142 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • ...
0-430777
116 qWarning().noquote() << QString::fromLatin1(-
117 "QML Debugger: Ignoring \"-qmljsdebugger=%1\". Debugging "-
118 "has not been enabled.").arg(params->arguments);-
119 params->arguments.clear();-
120 }
never executed: end of block
0
121 return nullptr;
executed 430777 times by 142 tests: return nullptr;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • ...
430777
122 }-
123-
124 if (!params->instance) {
!params->instanceDescription
TRUEevaluated 9283 times by 14 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 730 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
730-9283
125 if (!params->pluginKey.isEmpty()) {
!params->pluginKey.isEmpty()Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
FALSEevaluated 9277 times by 11 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
6-9277
126 params->instance = loadQQmlDebugConnector(params->pluginKey);-
127 } else if (params->arguments.isEmpty()) {
executed 6 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
params->arguments.isEmpty()Description
TRUEevaluated 9251 times by 7 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 26 times by 4 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
6-9251
128 return nullptr; // no explicit class name given and no command line arguments
executed 9251 times by 7 tests: return nullptr;
Executed by:
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
9251
129 } else if (params->arguments.startsWith(QLatin1String("connector:"))) {
params->argume..."connector:"))Description
TRUEnever evaluated
FALSEevaluated 26 times by 4 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
0-26
130 static const int connectorBegin = int(strlen("connector:"));-
131-
132 int connectorEnd = params->arguments.indexOf(QLatin1Char(','), connectorBegin);-
133 if (connectorEnd == -1)
connectorEnd == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
134 connectorEnd = params->arguments.length();
never executed: connectorEnd = params->arguments.length();
0
135-
136 params->instance = loadQQmlDebugConnector(params->arguments.mid(-
137 connectorBegin,-
138 connectorEnd - connectorBegin));-
139 } else {
never executed: end of block
0
140 params->instance = loadQQmlDebugConnector(-
141 params->arguments.startsWith(QLatin1String("native")) ?-
142 QStringLiteral("QQmlNativeDebugConnector") :
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_qqmlnativeconnector
2
143 QStringLiteral("QQmlDebugServer"));
executed 24 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
  • tst_qqmlprofilerservice
24
144 }
executed 26 times by 4 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
26
145-
146 if (params->instance) {
params->instanceDescription
TRUEevaluated 32 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEnever evaluated
0-32
147 const auto metaData = metaDataForQQmlDebugService();-
148 for (const QJsonObject &object : metaData) {-
149 const auto keys = object.value(QLatin1String("MetaData")).toObject()-
150 .value(QLatin1String("Keys")).toArray();-
151 for (const QJsonValue &key : keys) {-
152 QString keyString = key.toString();-
153 if (params->services.isEmpty() || params->services.contains(keyString))
params->services.isEmpty()Description
TRUEevaluated 126 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
FALSEevaluated 98 times by 5 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
params->servic...ins(keyString)Description
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEevaluated 76 times by 5 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
22-126
154 loadQQmlDebugService(keyString);
executed 148 times by 5 tests: loadQQmlDebugService(keyString);
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
148
155 }
executed 224 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
224
156 }
executed 160 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
160
157 }
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
32
158 }
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
32
159-
160 return params->instance;
executed 762 times by 7 tests: return params->instance;
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
762
161}-
162-
163QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()-
164{-
165 // This is triggered when the plugin is unloaded.-
166 QQmlDebugConnectorParams *params = qmlDebugConnectorParams();-
167 if (params) {
paramsDescription
TRUEevaluated 32 times by 7 tests
Evaluated by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
FALSEnever evaluated
0-32
168 params->pluginKey.clear();-
169 params->arguments.clear();-
170 params->services.clear();-
171 delete params->instance;-
172 params->instance = nullptr;-
173 }
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
32
174}
executed 32 times by 7 tests: end of block
Executed by:
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlenginedebugservice
  • tst_qqmlnativeconnector
  • tst_qqmlprofilerservice
32
175-
176QT_END_NAMESPACE-
177-
178#include "moc_qqmldebugconnector_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0