Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmldebug.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:critical reason:enables-debug-framework
4
5
#
ifndef
QQMLDEBUG_H
6
#
define
QQMLDEBUG_H
7
8
#
include
<
QtQml
/
qtqmlglobal
.
h
>
9
#
include
<
QtCore
/
qstring
.
h
>
10
#
include
<
QtCore
/
qvariant
.
h
>
11
#
include
<
QtCore
/
qhash
.
h
>
// QVariantHash
12
13
QT_BEGIN_NAMESPACE
14
15
#
if
QT_CONFIG
(
qml_debug
)
16
17
struct
Q_QML_EXPORT
QQmlDebuggingEnabler
18
{
19
enum
StartMode
{
20
DoNotWaitForClient
,
21
WaitForClient
22
};
23
24
static
void
enableDebugging
(
bool
printWarning
);
25
26
#
if
QT_DEPRECATED_SINCE
(
6
,
4
)
27
QT_DEPRECATED_VERSION_X_6_4
(
"Use QQmlTriviallyDestructibleDebuggingEnabler instead "
28
"or just call QQmlDebuggingEnabler::enableDebugging()."
)
29
QQmlDebuggingEnabler
(
bool
printWarning
=
true
);
30
#
endif
31
32
static
QStringList
debuggerServices
();
33
static
QStringList
inspectorServices
();
34
static
QStringList
profilerServices
();
35
static
QStringList
nativeDebuggerServices
();
36
37
static
void
setServices
(
const
QStringList
&
services
);
38
39
static
bool
startTcpDebugServer
(
int
port
,
StartMode
mode
=
DoNotWaitForClient
,
40
const
QString
&
hostName
=
QString
());
41
static
bool
connectToLocalDebugger
(
const
QString
&
socketFileName
,
42
StartMode
mode
=
DoNotWaitForClient
);
43
static
bool
startDebugConnector
(
const
QString
&
pluginName
,
44
const
QVariantHash
&
configuration
=
QVariantHash
());
45
};
46
47
// Unnamed namespace to signal the compiler that we
48
// indeed want each TU to have its own QQmlDebuggingEnabler.
49
namespace
{
50
struct
QQmlTriviallyDestructibleDebuggingEnabler
{
51
QQmlTriviallyDestructibleDebuggingEnabler
(
bool
printWarning
=
true
)
52
{
53
static_assert
(
std
::
is_trivially_destructible_v
<
QQmlTriviallyDestructibleDebuggingEnabler
>);
54
QQmlDebuggingEnabler
::
enableDebugging
(
printWarning
);
55
}
56
};
57
// Execute code in constructor before first QQmlEngine is instantiated
58
#
if
defined
(
QT_QML_DEBUG_NO_WARNING
)
59
static
QQmlTriviallyDestructibleDebuggingEnabler
qQmlEnableDebuggingHelper
(
false
);
60
#
elif
defined
(
QT_QML_DEBUG
)
61
static
QQmlTriviallyDestructibleDebuggingEnabler
qQmlEnableDebuggingHelper
(
true
);
62
#
endif
63
}
// unnamed namespace
64
65
#
endif
66
67
QT_END_NAMESPACE
68
69
#
endif
// QQMLDEBUG_H
QSqlRelationalDelegate
\inmodule QtSql
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
HookCount
@ HookCount
Definition
qqmldebug.cpp:202
Q_ATOMIC_FLAG_INIT
#define Q_ATOMIC_FLAG_INIT
Definition
qqmldebug.cpp:22
s_printedWarning
static Q_CONSTINIT std::atomic_flag s_printedWarning
Definition
qqmldebug.cpp:40
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(qml_debug)
operator<<
QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error)
Definition
qqmlerror.cpp:282
Q_STATIC_ASSERT
Q_STATIC_ASSERT(sizeof(SharedImageHeader) % 4==0)
qtdeclarative
src
qml
debugger
qqmldebug.h
Generated on
for Qt by
1.14.0