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
qdebugmessageservice.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:significant
4
5#ifndef QDEBUGMESSAGESERVICE_H
6#define QDEBUGMESSAGESERVICE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qqmldebugserviceinterfaces_p.h>
20
21#include <QtCore/qlogging.h>
22#include <QtCore/qmutex.h>
23#include <QtCore/qelapsedtimer.h>
24
25QT_BEGIN_NAMESPACE
26
27class QDebugMessageServiceImpl : public QDebugMessageService
28{
29 Q_OBJECT
30public:
31 QDebugMessageServiceImpl(QObject *parent = nullptr);
32 ~QDebugMessageServiceImpl();
33
34 void sendDebugMessage(QtMsgType type, const QMessageLogContext &ctxt, const QString &buf);
35 void synchronizeTime(const QElapsedTimer &otherTimer) override;
36
37protected:
38 void stateChanged(State) override;
39
40private:
41 void restoreOldMessageHandler();
42
43 friend class QQmlDebuggerServiceFactory;
44
45 QtMessageHandler oldMsgHandler;
46 QQmlDebugService::State prevState;
47 QMutex initMutex;
48 QElapsedTimer timer;
49};
50
52
53#endif // QDEBUGMESSAGESERVICE_H
void synchronizeTime(const QElapsedTimer &otherTimer) override
void sendDebugMessage(QtMsgType type, const QMessageLogContext &ctxt, const QString &buf)
void stateChanged(State) override
Combined button and popup list for selecting options.
void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const QString &buf)