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
qqmlsourcecoordinate_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
QQMLSOURCECOORDINATE_P_H
6
#
define
QQMLSOURCECOORDINATE_P_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
<
QtCore
/
private
/
qglobal_p
.
h
>
20
21
#
include
<
limits
>
22
23
QT_BEGIN_NAMESPACE
24
25
// These methods are needed because in some public methods we historically interpret -1 as the
26
// invalid line or column, even though all the lines and columns are 1-based. Also, the different
27
// integer ranges may turn certain large values into invalid ones on conversion.
28
29
template
<
typename
From,
typename
To>
30
To qmlConvertSourceCoordinate(From n);
31
32
template
<>
33
inline
quint16 qmlConvertSourceCoordinate<
int
, quint16>(
int
n)
34
{
35
return
(n > 0 && n <=
int
(std::numeric_limits<quint16>::max())) ? quint16(n) : 0;
36
}
37
38
template
<>
39
inline
quint32 qmlConvertSourceCoordinate<
int
, quint32>(
int
n)
40
{
41
return
n > 0 ? quint32(n) : 0u;
42
}
43
44
// TODO: In Qt6, change behavior and make the invalid coordinate 0 for the following two methods.
45
46
template
<>
47
inline
int
qmlConvertSourceCoordinate<quint16,
int
>(quint16 n)
48
{
49
return
(n == 0u) ? -1 :
int
(n);
50
}
51
52
template
<>
53
inline
int
qmlConvertSourceCoordinate<quint32,
int
>(quint32 n)
54
{
55
return
(n == 0u || n > quint32(std::numeric_limits<
int
>::max())) ? -1 :
int
(n);
56
}
57
58
QT_END_NAMESPACE
59
60
#
endif
// QQMLSOURCECOORDINATE_P_H
QQmlInfoPrivate
Definition
qqmlinfo.cpp:147
QQmlInfoPrivate::buffer
QString buffer
Definition
qqmlinfo.cpp:158
QQmlInfoPrivate::errors
QList< QQmlError > errors
Definition
qqmlinfo.cpp:159
QQmlInfoPrivate::QQmlInfoPrivate
QQmlInfoPrivate(QtMsgType type)
Definition
qqmlinfo.cpp:149
QQmlInfoPrivate::ref
int ref
Definition
qqmlinfo.cpp:155
QQmlInfoPrivate::object
const QObject * object
Definition
qqmlinfo.cpp:157
QQmlInfoPrivate::msgType
QtMsgType msgType
Definition
qqmlinfo.cpp:156
QQmlMetaType
\inmodule QtQml
Definition
qqmlmetatype_p.h:43
QQmlTypeModule
Definition
qqmltypemodule_p.h:39
QRecursiveMutex
\inmodule QtCore
Definition
qmutex.h:343
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QV4::CompiledData
Definition
qv4compileddata.cpp:22
QV4
Definition
qjsvalue.h:24
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
MESSAGE_FUNCS
#define MESSAGE_FUNCS(FuncName, MessageLevel)
Definition
qqmlinfo.cpp:224
qmlWarning
Q_DECL_COLD_FUNCTION Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QQmlError &error)
dynamicQmlListMarker
const QMetaObject * dynamicQmlListMarker(const QtPrivate::QMetaTypeInterface *)
Definition
qqmlmetatype_p.h:313
dynamicQmlMetaObject
const QMetaObject * dynamicQmlMetaObject(const QtPrivate::QMetaTypeInterface *iface)
Definition
qqmlmetatype_p.h:317
QQmlListMetaTypeInterface
Definition
qqmlmetatype_p.h:359
QQmlListMetaTypeInterface::name
QByteArray name
Definition
qqmlmetatype_p.h:360
QQmlListMetaTypeInterface::valueType
const QtPrivate::QMetaTypeInterface * valueType
Definition
qqmlmetatype_p.h:362
QQmlMetaTypeInterface
Definition
qqmlmetatype_p.h:323
QQmlMetaTypeInterface::name
QByteArray name
Definition
qqmlmetatype_p.h:324
QV4::CompiledData::CompilationUnit::IdToObjectMap
QMap< int, int > IdToObjectMap
Definition
qv4compileddata_p.h:1531
qtdeclarative
src
qml
qml
qqmlsourcecoordinate_p.h
Generated on
for Qt by
1.18.0