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 | |
4 | #ifndef QTVERSION_H |
5 | #define QTVERSION_H |
6 | |
7 | #if 0 |
8 | #pragma qt_class(QtVersion) |
9 | #pragma qt_sync_stop_processing |
10 | #endif |
11 | |
12 | #ifndef __ASSEMBLER__ |
13 | |
14 | #include <QtCore/qcompilerdetection.h> |
15 | #include <QtCore/qtconfigmacros.h> |
16 | #include <QtCore/qtcoreexports.h> |
17 | |
18 | QT_BEGIN_NAMESPACE |
19 | |
20 | /* |
21 | * If we're compiling C++ code: |
22 | * - and this is a non-namespace build, declare qVersion as extern "C" |
23 | * - and this is a namespace build, declare it as a regular function |
24 | * (we're already inside QT_BEGIN_NAMESPACE / QT_END_NAMESPACE) |
25 | * If we're compiling C code, simply declare the function. If Qt was compiled |
26 | * in a namespace, qVersion isn't callable anyway. |
27 | */ |
28 | #if !defined(QT_NAMESPACE) && defined(__cplusplus) && !defined(Q_QDOC) |
29 | extern "C" |
30 | #endif |
31 | /* defined in qlibraryinfo.cpp */ |
32 | Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOEXCEPT; |
33 | |
34 | QT_END_NAMESPACE |
35 | |
36 | #endif // __ASSEMBLER__ |
37 | |
38 | #endif // QTVERSION_H |
39 | |