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
4
#
ifndef
QQMLDEBUG_H
5
#
define
QQMLDEBUG_H
6
7
#
include
<
QtQml
/
qtqmlglobal
.
h
>
8
#
include
<
QtCore
/
qstring
.
h
>
9
#
include
<
QtCore
/
qvariant
.
h
>
10
#
include
<
QtCore
/
qhash
.
h
>
// QVariantHash
11
12
QT_BEGIN_NAMESPACE
13
14
#
if
QT_CONFIG
(
qml_debug
)
15
16
struct
Q_QML_EXPORT
QQmlDebuggingEnabler
17
{
18
enum
StartMode
{
19
DoNotWaitForClient
,
20
WaitForClient
21
};
22
23
static
void
enableDebugging
(
bool
printWarning
);
24
25
#
if
QT_DEPRECATED_SINCE
(
6
,
4
)
26
QT_DEPRECATED_VERSION_X_6_4
(
"Use QQmlTriviallyDestructibleDebuggingEnabler instead "
27
"or just call QQmlDebuggingEnabler::enableDebugging()."
)
28
QQmlDebuggingEnabler
(
bool
printWarning
=
true
);
29
#
endif
30
31
static
QStringList
debuggerServices
();
32
static
QStringList
inspectorServices
();
33
static
QStringList
profilerServices
();
34
static
QStringList
nativeDebuggerServices
();
35
36
static
void
setServices
(
const
QStringList
&
services
);
37
38
static
bool
startTcpDebugServer
(
int
port
,
StartMode
mode
=
DoNotWaitForClient
,
39
const
QString
&
hostName
=
QString
());
40
static
bool
connectToLocalDebugger
(
const
QString
&
socketFileName
,
41
StartMode
mode
=
DoNotWaitForClient
);
42
static
bool
startDebugConnector
(
const
QString
&
pluginName
,
43
const
QVariantHash
&
configuration
=
QVariantHash
());
44
};
45
46
// Unnamed namespace to signal the compiler that we
47
// indeed want each TU to have its own QQmlDebuggingEnabler.
48
namespace
{
49
struct
QQmlTriviallyDestructibleDebuggingEnabler
{
50
QQmlTriviallyDestructibleDebuggingEnabler
(
bool
printWarning
=
true
)
51
{
52
static_assert
(
std
::
is_trivially_destructible_v
<
QQmlTriviallyDestructibleDebuggingEnabler
>);
53
QQmlDebuggingEnabler
::
enableDebugging
(
printWarning
);
54
}
55
};
56
// Execute code in constructor before first QQmlEngine is instantiated
57
#
if
defined
(
QT_QML_DEBUG_NO_WARNING
)
58
static
QQmlTriviallyDestructibleDebuggingEnabler
qQmlEnableDebuggingHelper
(
false
);
59
#
elif
defined
(
QT_QML_DEBUG
)
60
static
QQmlTriviallyDestructibleDebuggingEnabler
qQmlEnableDebuggingHelper
(
true
);
61
#
endif
62
}
// unnamed namespace
63
64
#
endif
65
66
QT_END_NAMESPACE
67
68
#
endif
// QQMLDEBUG_H
QSqlRelationalDelegate
\inmodule QtSql
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
HookCount
@ HookCount
Definition
qqmldebug.cpp:167
Q_ATOMIC_FLAG_INIT
#define Q_ATOMIC_FLAG_INIT
Definition
qqmldebug.cpp:21
s_printedWarning
static Q_CONSTINIT std::atomic_flag s_printedWarning
Definition
qqmldebug.cpp:24
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