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
qqmlprofilereventlocation_p.h
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
#
ifndef
QQMLPROFILEREVENTLOCATION_P_H
6
#
define
QQMLPROFILEREVENTLOCATION_P_H
7
8
#
include
<
QtCore
/
qstring
.
h
>
9
#
include
<
QtCore
/
qhash
.
h
>
10
#
include
<
QtCore
/
qdatastream
.
h
>
11
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
12
13
//
14
// W A R N I N G
15
// -------------
16
//
17
// This file is not part of the Qt API. It exists purely as an
18
// implementation detail. This header file may change from version to
19
// version without notice, or even be removed.
20
//
21
// We mean it.
22
//
23
24
QT_BEGIN_NAMESPACE
25
26
class
QQmlProfilerEventLocation
27
{
28
public
:
29
QQmlProfilerEventLocation() : m_line(-1),m_column(-1) {}
30
QQmlProfilerEventLocation(
const
QString &file,
int
lineNumber,
int
columnNumber) :
31
m_filename(file), m_line(lineNumber), m_column(columnNumber)
32
{}
33
34
void
clear()
35
{
36
m_filename.clear();
37
m_line = m_column = -1;
38
}
39
40
bool
isValid()
const
41
{
42
return
!m_filename.isEmpty();
43
}
44
45
QString filename()
const
{
return
m_filename; }
46
int
line()
const
{
return
m_line; }
47
int
column()
const
{
return
m_column; }
48
49
private
:
50
friend
QDataStream
&
operator
>>(QDataStream &stream, QQmlProfilerEventLocation &location);
51
friend
QDataStream
&
operator
<<(QDataStream &stream,
const
QQmlProfilerEventLocation &location);
52
53
friend
size_t qHash(
const
QQmlProfilerEventLocation &key, size_t seed = 0)
noexcept
54
{
return
qHashMulti(seed, key.m_filename, key.m_line, key.m_column); }
55
56
QString m_filename;
57
int
m_line;
58
int
m_column;
59
};
60
61
inline
bool
operator
==(
const
QQmlProfilerEventLocation &location1,
62
const
QQmlProfilerEventLocation &location2)
63
{
64
// compare filename last as it's expensive.
65
return
location1.line() == location2.line() && location1.column() == location2.column()
66
&& location1.filename() == location2.filename();
67
}
68
69
inline
bool
operator
!=(
const
QQmlProfilerEventLocation &location1,
70
const
QQmlProfilerEventLocation &location2)
71
{
72
return
!(location1
==
location2);
73
}
74
75
QDataStream
&
operator
>>(QDataStream &stream, QQmlProfilerEventLocation &location);
76
QDataStream
&
operator
<<(QDataStream &stream,
const
QQmlProfilerEventLocation &location);
77
78
Q_DECLARE_TYPEINFO
(QQmlProfilerEventLocation,
Q_RELOCATABLE_TYPE
);
79
80
QT_END_NAMESPACE
81
82
#
endif
// QQMLPROFILEREVENTLOCATION_P_H
QQmlDebugClient
Definition
qqmldebugclient_p.h:27
QQmlDebugConnection
Definition
qqmldebugconnection_p.h:28
QQmlProfilerClient
Definition
qqmlprofilerclient_p.h:31
QQmlProfilerClient::setFlushInterval
void setFlushInterval(quint32 flushInterval)
Definition
qqmlprofilerclient.cpp:271
QQmlProfilerClient::recordedFeatures
quint64 recordedFeatures() const
Definition
qqmlprofilerclient.cpp:231
QQmlProfilerClient::isRecording
bool isRecording() const
Definition
qqmlprofilerclient.cpp:211
QQmlProfilerClient::traceFinished
void traceFinished(qint64 timestamp, const QList< int > &engineIds)
QQmlProfilerClient::setRequestedFeatures
void setRequestedFeatures(quint64 features)
Definition
qqmlprofilerclient.cpp:252
QQmlProfilerClient::clearEvents
void clearEvents()
Definition
qqmlprofilerclient.cpp:171
QQmlProfilerClient::cleared
void cleared()
QQmlProfilerClient::recordedFeaturesChanged
void recordedFeaturesChanged(quint64 features)
QQmlProfilerClient::traceStarted
void traceStarted(qint64 timestamp, const QList< int > &engineIds)
QQmlProfilerClient::clearAll
void clearAll()
Definition
qqmlprofilerclient.cpp:184
QQmlProfilerClient::messageReceived
virtual void messageReceived(const QByteArray &) override
Definition
qqmlprofilerclient.cpp:309
QQmlProfilerClient::recordingChanged
void recordingChanged(bool arg)
QQmlProfilerClient::QQmlProfilerClient
QQmlProfilerClient(QQmlProfilerClientPrivate &dd)
Definition
qqmlprofilerclient.cpp:277
QQmlProfilerClient::setRecording
void setRecording(bool)
Definition
qqmlprofilerclient.cpp:217
QQmlProfilerClient::onStateChanged
void onStateChanged(State status)
Definition
qqmlprofilerclient.cpp:298
QQmlProfilerClient::sendRecordingStatus
void sendRecordingStatus(int engineId=-1)
Definition
qqmlprofilerclient.cpp:205
QQmlProfilerClient::~QQmlProfilerClient
~QQmlProfilerClient()
Definition
qqmlprofilerclient.cpp:163
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
ProfileDebugMessages
@ ProfileDebugMessages
Definition
qqmlprofilerclientdefinitions_p.h:123
operator<<
QDataStream & operator<<(QDataStream &stream, const QQmlProfilerEventLocation &location)
Definition
qqmlprofilereventlocation.cpp:16
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QQmlProfilerEventLocation, Q_RELOCATABLE_TYPE)
operator!=
bool operator!=(const QQmlProfilerEventLocation &location1, const QQmlProfilerEventLocation &location2)
Definition
qqmlprofilereventlocation_p.h:69
operator==
bool operator==(const QQmlProfilerEventLocation &location1, const QQmlProfilerEventLocation &location2)
Definition
qqmlprofilereventlocation_p.h:61
operator>>
QDataStream & operator>>(QDataStream &stream, QQmlProfilerEventLocation &location)
Definition
qqmlprofilereventlocation.cpp:11
QQmlDebugContextInfo
Definition
qqmldebugmessageclient_p.h:24
qtdeclarative
src
qmldebug
qqmlprofilereventlocation_p.h
Generated on
for Qt by
1.18.0