| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/debugger/qqmldebug.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | static_assert(bool(1 == 1), "Required feature " "qml_debug" " for file " __FILE__ " not available."); | - | ||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool printWarning) | - | ||||||
| 8 | { | - | ||||||
| 9 | if (!QQmlEnginePrivate::qml_debugging_enabled
| 52-58 | ||||||
| 10 | && printWarning
| 2-56 | ||||||
| 11 | QMessageLogger(__FILE__, 55, __PRETTY_FUNCTION__).debug("QML debugging is enabled. Only use this in a safe environment."); | - | ||||||
| 12 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 13 | QQmlEnginePrivate::qml_debugging_enabled = true; | - | ||||||
| 14 | } executed 110 times by 15 tests: end of blockExecuted by:
| 110 | ||||||
| 15 | - | |||||||
| 16 | - | |||||||
| 17 | - | |||||||
| 18 | - | |||||||
| 19 | - | |||||||
| 20 | - | |||||||
| 21 | - | |||||||
| 22 | QStringList QQmlDebuggingEnabler::debuggerServices() | - | ||||||
| 23 | { | - | ||||||
| 24 | return executed 12 times by 3 tests: QStringList() << QV4DebugService::s_key << QQmlEngineDebugService::s_keyreturn QStringList() << QV4DebugService::s_key << QQmlEngineDebugService::s_key << QDebugMessageService::s_key;Executed by:
executed 12 times by 3 tests: return QStringList() << QV4DebugService::s_key << QQmlEngineDebugService::s_key << QDebugMessageService::s_key;Executed by:
| 12 | ||||||
| 25 | << QDebugMessageService::s_key; executed 12 times by 3 tests: return QStringList() << QV4DebugService::s_key << QQmlEngineDebugService::s_key << QDebugMessageService::s_key;Executed by:
| 12 | ||||||
| 26 | } | - | ||||||
| 27 | - | |||||||
| 28 | - | |||||||
| 29 | - | |||||||
| 30 | - | |||||||
| 31 | - | |||||||
| 32 | - | |||||||
| 33 | QStringList QQmlDebuggingEnabler::inspectorServices() | - | ||||||
| 34 | { | - | ||||||
| 35 | return executed 12 times by 3 tests: QStringList() << QQmlInspectorService::s_key;return QStringList() << QQmlInspectorService::s_key;Executed by:
executed 12 times by 3 tests: return QStringList() << QQmlInspectorService::s_key;Executed by:
| 12 | ||||||
| 36 | } | - | ||||||
| 37 | - | |||||||
| 38 | - | |||||||
| 39 | - | |||||||
| 40 | - | |||||||
| 41 | - | |||||||
| 42 | - | |||||||
| 43 | - | |||||||
| 44 | QStringList QQmlDebuggingEnabler::profilerServices() | - | ||||||
| 45 | { | - | ||||||
| 46 | return executed 8 times by 3 tests: QStringList() << QQmlProfilerService::s_key << QQmlEngineControlService::s_keyreturn QStringList() << QQmlProfilerService::s_key << QQmlEngineControlService::s_key << QDebugMessageService::s_key;Executed by:
executed 8 times by 3 tests: return QStringList() << QQmlProfilerService::s_key << QQmlEngineControlService::s_key << QDebugMessageService::s_key;Executed by:
| 8 | ||||||
| 47 | << QDebugMessageService::s_key; executed 8 times by 3 tests: return QStringList() << QQmlProfilerService::s_key << QQmlEngineControlService::s_key << QDebugMessageService::s_key;Executed by:
| 8 | ||||||
| 48 | } | - | ||||||
| 49 | - | |||||||
| 50 | - | |||||||
| 51 | - | |||||||
| 52 | - | |||||||
| 53 | - | |||||||
| 54 | - | |||||||
| 55 | - | |||||||
| 56 | QStringList QQmlDebuggingEnabler::nativeDebuggerServices() | - | ||||||
| 57 | { | - | ||||||
| 58 | return executed 4 times by 1 test: QStringList() << QQmlNativeDebugService::s_key;return QStringList() << QQmlNativeDebugService::s_key;Executed by:
executed 4 times by 1 test: return QStringList() << QQmlNativeDebugService::s_key;Executed by:
| 4 | ||||||
| 59 | } | - | ||||||
| 60 | void QQmlDebuggingEnabler::setServices(const QStringList &services) | - | ||||||
| 61 | { | - | ||||||
| 62 | QQmlDebugConnector::setServices(services); | - | ||||||
| 63 | } never executed: end of block | 0 | ||||||
| 64 | bool QQmlDebuggingEnabler::startTcpDebugServer(int port, StartMode mode, const QString &hostName) | - | ||||||
| 65 | { | - | ||||||
| 66 | QVariantHash configuration; | - | ||||||
| 67 | configuration[QLatin1String("portFrom")] = configuration[QLatin1String("portTo")] = port; | - | ||||||
| 68 | configuration[QLatin1String("block")] = (mode == WaitForClient); | - | ||||||
| 69 | configuration[QLatin1String("hostAddress")] = hostName; | - | ||||||
| 70 | return executed 4 times by 2 tests: startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);return startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);Executed by:
executed 4 times by 2 tests: return startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);Executed by:
| 4 | ||||||
| 71 | } | - | ||||||
| 72 | bool QQmlDebuggingEnabler::connectToLocalDebugger(const QString &socketFileName, StartMode mode) | - | ||||||
| 73 | { | - | ||||||
| 74 | QVariantHash configuration; | - | ||||||
| 75 | configuration[QLatin1String("fileName")] = socketFileName; | - | ||||||
| 76 | configuration[QLatin1String("block")] = (mode == WaitForClient); | - | ||||||
| 77 | return executed 2 times by 1 test: startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);return startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);Executed by:
executed 2 times by 1 test: return startDebugConnector(QLatin1String("QQmlDebugServer"), configuration);Executed by:
| 2 | ||||||
| 78 | } | - | ||||||
| 79 | bool QQmlDebuggingEnabler::startDebugConnector(const QString &pluginName, | - | ||||||
| 80 | const QVariantHash &configuration) | - | ||||||
| 81 | { | - | ||||||
| 82 | QQmlDebugConnector::setPluginKey(pluginName); | - | ||||||
| 83 | QQmlDebugConnector *connector = QQmlDebugConnector::instance(); | - | ||||||
| 84 | return executed 6 times by 3 tests: connector ? connector->open(configuration) : false;return connector ? connector->open(configuration) : false;Executed by:
executed 6 times by 3 tests: return connector ? connector->open(configuration) : false;Executed by:
| 6 | ||||||
| 85 | } | - | ||||||
| 86 | - | |||||||
| 87 | enum { HookCount = 4 }; | - | ||||||
| 88 | - | |||||||
| 89 | - | |||||||
| 90 | quintptr __attribute__((visibility("default"))) qtDeclarativeHookData[] = { | - | ||||||
| 91 | - | |||||||
| 92 | 2, | - | ||||||
| 93 | - | |||||||
| 94 | - | |||||||
| 95 | HookCount, | - | ||||||
| 96 | - | |||||||
| 97 | - | |||||||
| 98 | - | |||||||
| 99 | - | |||||||
| 100 | 3, | - | ||||||
| 101 | - | |||||||
| 102 | - | |||||||
| 103 | 0x19 | - | ||||||
| 104 | }; | - | ||||||
| 105 | - | |||||||
| 106 | static_assert(bool(HookCount == sizeof(qtDeclarativeHookData) / sizeof(qtDeclarativeHookData[0])), "HookCount == sizeof(qtDeclarativeHookData) / sizeof(qtDeclarativeHookData[0])"); | - | ||||||
| 107 | - | |||||||
| 108 | - | |||||||
| Switch to Source code | Preprocessed file |