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
qtquickglobal_p.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 reason:default
4
5
#
ifndef
QTQUICKGLOBAL_P_H
6
#
define
QTQUICKGLOBAL_P_H
7
8
#
include
<
QtQml
/
private
/
qtqmlglobal_p
.
h
>
9
#
include
<
QtGui
/
private
/
qtguiglobal_p
.
h
>
10
#
include
<
QtQuick
/
private
/
qtquick
-
config_p
.
h
>
11
12
#
include
<
QtCore
/
qloggingcategory
.
h
>
13
14
//
15
// W A R N I N G
16
// -------------
17
//
18
// This file is not part of the Qt API. It exists purely as an
19
// implementation detail. This header file may change from version to
20
// version without notice, or even be removed.
21
//
22
// We mean it.
23
//
24
25
#
include
"qtquickglobal.h"
26
#
include
<
QtQuick
/
qtquickexports
.
h
>
27
28
QT_BEGIN_NAMESPACE
29
30
void
Q_QUICK_EXPORT
qml_register_types_QtQuick();
31
32
void
Q_QUICK_EXPORT
QQuick_initializeModule();
33
34
Q_DECLARE_LOGGING_CATEGORY(lcTouch)
35
Q_DECLARE_LOGGING_CATEGORY(lcMouse)
36
Q_DECLARE_LOGGING_CATEGORY(lcFocus)
37
38
/*
39
This is needed for QuickTestUtils. Q_AUTOTEST_EXPORT checks QT_BUILDING_QT
40
(amongst others) to see if it should export symbols. Until QuickTestUtils
41
was introduced, this was enough, as there weren't any intermediate test
42
helper libraries that used a Qt library and were in turn used by tests.
43
44
Taking QQuickItemViewPrivate as an example: previously it was using
45
Q_AUTOTEST_EXPORT. Since QuickTestUtils is a Qt library (albeit a private
46
one), QT_BUILDING_QT was true and so Q_AUTOTEST_EXPORT evaluated to an
47
export. However, QQuickItemViewPrivate was already exported by the Quick
48
library, so we would get errors like this:
49
50
Qt6Quickd.lib(Qt6Quickd.dll) : error LNK2005: "public: static class
51
QQuickItemViewPrivate * __cdecl QQuickItemViewPrivate::get(class QQuickItemView *)"
52
(?get@QQuickItemViewPrivate@@SAPEAV1@PEAVQQuickItemView@@@Z) already defined
53
in Qt6QuickTestUtilsd.lib(viewtestutils.cpp.obj)
54
55
So, to account for the special case of QuickTestUtils, we need to be more
56
specific about which part of Qt we're building; instead of checking if we're
57
building any Qt library at all, check if we're building the Quick library,
58
and only then export.
59
*/
60
#
if
defined
(
QT_BUILD_INTERNAL
)
&&
defined
(
QT_BUILD_QUICK_LIB
)
&&
defined
(
QT_SHARED
)
61
#
define
Q_QUICK_AUTOTEST_EXPORT
Q_DECL_EXPORT
62
#
elif
defined
(
QT_BUILD_INTERNAL
)
&&
defined
(
QT_SHARED
)
63
#
define
Q_QUICK_AUTOTEST_EXPORT
Q_DECL_IMPORT
64
#
else
65
#
define
Q_QUICK_AUTOTEST_EXPORT
66
#
endif
67
68
QT_END_NAMESPACE
69
70
#
endif
// QTQUICKGLOBAL_P_H
operator<<
QDebug Q_QUICK_EXPORT operator<<(QDebug debug, const QQuickWindow *item)
Definition
qquickwindow.cpp:4690
qtdeclarative
src
quick
qtquickglobal_p.h
Generated on
for Qt by
1.18.0