Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmldebugtranslationclient.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 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:significant
4
5
#
include
"qqmldebugtranslationclient_p.h"
6
#
include
"qqmldebugconnection_p.h"
7
8
#
include
<
QDebug
>
9
10
#
include
<
private
/
qqmldebugconnector_p
.
h
>
11
#
include
<
private
/
qversionedpacket_p
.
h
>
12
13
QT_BEGIN_NAMESPACE
14
15
QQmlDebugTranslationClient
::
QQmlDebugTranslationClient
(QQmlDebugConnection *client)
16
:
QQmlDebugClient
(QLatin1String(
"DebugTranslation"
), client)
17
{
18
}
19
20
void
QQmlDebugTranslationClient
::
messageReceived
(
const
QByteArray &message)
21
{
22
QVersionedPacket<QQmlDebugConnector> packet(message);
23
QQmlDebugTranslation::Reply type;
24
25
packet >> type;
26
switch
(type) {
27
case
QQmlDebugTranslation::Reply::TranslationIssues: {
28
packet >> translationIssues;
29
break
;
30
}
31
case
QQmlDebugTranslation::Reply::LanguageChanged: {
32
languageChanged
=
true
;
33
break
;
34
}
35
case
QQmlDebugTranslation::Reply::TranslatableTextOccurrences: {
36
packet >> qmlElements;
37
break
;
38
}
39
case
QQmlDebugTranslation::Reply::StateList: {
40
packet >> qmlStates;
41
break
;
42
}
43
44
default
:
45
qWarning() <<
"TestDebugTranslationClient: received unknown command: "
<<
static_cast
<
int
>(type);
46
break
;
47
}
48
}
49
50
QT_END_NAMESPACE
51
52
#
include
"moc_qqmldebugtranslationclient_p.cpp"
QQmlDebugClient
Definition
qqmldebugclient_p.h:27
QQmlDebugTranslationClient
Definition
qqmldebugtranslationclient_p.h:26
QQmlDebugTranslationClient::messageReceived
virtual void messageReceived(const QByteArray &message) override
Definition
qqmldebugtranslationclient.cpp:20
QQmlDebugTranslationClient::languageChanged
bool languageChanged
Definition
qqmldebugtranslationclient_p.h:34
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
qmldebug
qqmldebugtranslationclient.cpp
Generated on
for Qt by
1.18.0