summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtversionchecks.h
blob: b02849e96da6536513e61d1cc9c8a1a6371f389f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QTVERSIONCHECKS_H
#define QTVERSIONCHECKS_H

#if 0
#pragma qt_class(QtVersionChecks)
#pragma qt_sync_stop_processing
#endif

/*
   QT_VERSION is (major << 16) | (minor << 8) | patch.
*/
#define QT_VERSION      QT_VERSION_CHECK(QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH)
/*
   can be used like #if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
*/
#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))

#endif /* QTVERSIONCHECKS_H */