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