qt源码相关

qglobal.h

__cplusplus //判断是否是c++编译器
include <type_traits> // [https://learn.microsoft.com/zh-cn/cpp/standard-library/type-traits?view=msvc-170]
include <cstddef> // [https://www.apiref.com/cpp-zh/cpp/header/cstddef.html#google_vignette]
include <utility> // utility里包含两样东西:通用关系比较操作符和pair。

// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
// Despite its file name, this really is not a public header.
// It is an implementation detail of the private bootstrap library.
include <QtCore/qconfig-bootstrapped.h>

qconfig.h qtcore-config.h // qt常量定义
_MSC_VER // microsoft编译器版本

/*
    The QT_CONFIG macro implements a safe compile time check for features of Qt.
    Features can be in three states:
        0 or undefined: This will lead to a compile error when testing for it
        -1: The feature is not available
        1: The feature is available
*/
#define QT_CONFIG(feature) (1/QT_FEATURE_##feature == 1)

/* These two macros makes it possible to turn the builtin line expander into a
 * string literal. */
#define QT_STRINGIFY2(x) #x
#define QT_STRINGIFY(x) QT_STRINGIFY2(x)
posted @ 2024-04-02 17:41  奔付山河  阅读(23)  评论(0编辑  收藏  举报