QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
qtserialportexports.h
Go to the documentation of this file.
1// Copyright (C) 2022 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
4#pragma once
5
6#include <QtCore/qcompilerdetection.h>
7#include <QtCore/qtconfigmacros.h> // Q_SERIALPORT_EXPORT
8#include <QtCore/qtdeprecationmarkers.h> // QT_IF_DEPRECATED_SINCE
9
10#if defined(QT_SHARED) || !defined(QT_STATIC)
11# if defined(QT_BUILD_SERIALPORT_LIB)
12# define Q_SERIALPORT_EXPORT Q_DECL_EXPORT
13# else
14# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT
15# endif
16#else
17# define Q_SERIALPORT_EXPORT
18#endif
19
20#if !defined(QT_BUILD_SERIALPORT_LIB) && !defined(QT_STATIC)
21/* outside library -> inline decl + defi */
22/* static builds treat everything as part of the library, so they never inline */
23# define QT_SERIALPORT_INLINE_SINCE(major, minor) inline
24# define QT_SERIALPORT_INLINE_IMPL_SINCE(major, minor) 1
25#elif defined(QT_SERIALPORT_BUILD_REMOVED_API)
26/* inside library, inside removed_api.cpp:
27 * keep deprecated API -> non-inline decl;
28 * remove deprecated API -> inline decl;
29 * definition is always available */
30# define QT_SERIALPORT_INLINE_SINCE(major, minor) \
31 QT_IF_DEPRECATED_SINCE(major, minor, inline, /* not inline */)
32# define QT_SERIALPORT_INLINE_IMPL_SINCE(major, minor) 1
33#else
34/* inside library, outside removed_api.cpp:
35 * keep deprecated API -> non-inline decl, no defi;
36 * remove deprecated API -> inline decl, defi */
37# define QT_SERIALPORT_INLINE_SINCE(major, minor) \
38 QT_IF_DEPRECATED_SINCE(major, minor, inline, /* not inline */)
39# define QT_SERIALPORT_INLINE_IMPL_SINCE(major, minor) \
40 QT_IF_DEPRECATED_SINCE(major, minor, 1, 0)
41#endif
42
43#ifdef QT_SERIALPORT_BUILD_REMOVED_API
44# define QT_SERIALPORT_REMOVED_SINCE(major, minor) QT_DEPRECATED_SINCE(major, minor)
45#else
46# define QT_SERIALPORT_REMOVED_SINCE(major, minor) 0
47#endif