Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmldebugmessageclient.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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
5
6#include <QtCore/qdatastream.h>
7
9
21 : QQmlDebugClient(QLatin1String("DebugMessages"), client)
22{
23}
24
26{
27 QDataStream ds(data);
28 QByteArray command;
29 ds >> command;
30
31 if (command == "MESSAGE") {
32 int type;
33 int line;
34 QByteArray debugMessage;
37 ds >> type >> debugMessage >> file >> line >> function;
39 info.line = line;
42 info.timestamp = -1;
43 if (!ds.atEnd()) {
45 ds >> category;
47 if (!ds.atEnd())
48 ds >> info.timestamp;
49 }
51 }
52}
53
55
56#include "moc_qqmldebugmessageclient_p.cpp"
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore\reentrant
Definition qdatastream.h:30
bool atEnd() const
Returns true if the I/O device has reached the end position (end of the stream or file) or if there i...
QQmlDebugMessageClient(QQmlDebugConnection *client)
virtual void messageReceived(const QByteArray &) override
void message(QtMsgType, const QString &, const QQmlDebugContextInfo &)
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5857
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
QtMsgType
Definition qlogging.h:29
GLenum type
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define emit
QFile file
[0]
QFileInfo info(fileName)
[8]