[TOC]# 判断Debug还是Realease ```C++ #ifdef QT_NO_DEBUG qDebug() << "release mode"; #else qDebug() << "debug mode"; #endif ``` # 判断操作系统是什么系统 ``` /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or (at your option) the GNU General ** Public license version 3 or any later version approved by the KDE Free ** Qt Foundation. The licenses are as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-2.0.html and ** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/#ifndef QGLOBAL_H # include #endif#ifndef QSYSTEMDETECTION_H #define QSYSTEMDETECTION_H/*The operating system, must be one of: (Q_OS_x)DARWIN - Any Darwin system (macOS, iOS, watchOS, tvOS)MACOS - macOSIOS - iOSWATCHOS - watchOSTVOS - tvOSWIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008)WINRT - WinRT (Windows Runtime)CYGWIN - CygwinSOLARIS - Sun SolarisHPUX - HP-UXLINUX - Linux [has variants]FREEBSD - FreeBSD [has variants]NETBSD - NetBSDOPENBSD - OpenBSDINTERIX - InterixAIX - AIXHURD - GNU HurdQNX - QNX [has variants]QNX6 - QNX RTP 6.1LYNX - LynxOSBSD4 - Any BSD 4.4 systemUNIX - Any UNIX BSD/SYSV systemANDROID - Android platformHAIKU - HaikuThe following operating systems have variants:LINUX - both Q_OS_LINUX and Q_OS_ANDROID are defined when building for Android- only Q_OS_LINUX is defined if building for other Linux systemsFREEBSD - Q_OS_FREEBSD is defined only when building for FreeBSD with a BSD userland- Q_OS_FREEBSD_KERNEL is always defined on FreeBSD, even if the userland is from GNU */#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__)) # include # if defined(TARGET_OS_MAC) && TARGET_OS_MAC # define Q_OS_DARWIN # define Q_OS_BSD4 # ifdef __LP64__ # define Q_OS_DARWIN64 # else # define Q_OS_DARWIN32 # endif # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE # define QT_PLATFORM_UIKIT # if defined(TARGET_OS_WATCH) && TARGET_OS_WATCH # define Q_OS_WATCHOS # elif defined(TARGET_OS_TV) && TARGET_OS_TV # define Q_OS_TVOS # else # // TARGET_OS_IOS is only available in newer SDKs, # // so assume any other iOS-based platform is iOS for now # define Q_OS_IOS # endif # else # // TARGET_OS_OSX is only available in newer SDKs, # // so assume any non iOS-based platform is macOS for now # define Q_OS_MACOS # endif # else # error "Qt has not been ported to this Apple platform - see http://www.qt.io/developers" # endif #elif defined(__ANDROID__) || defined(ANDROID) # define Q_OS_ANDROID # define Q_OS_LINUX #elif defined(__CYGWIN__) # define Q_OS_CYGWIN #elif !defined(SAG_COM) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY==WINAPI_FAMILY_DESKTOP_APP) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) # define Q_OS_WIN32 # define Q_OS_WIN64 #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) # if defined(WINAPI_FAMILY) # ifndef WINAPI_FAMILY_PC_APP # define WINAPI_FAMILY_PC_APP WINAPI_FAMILY_APP # endif # if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP # define Q_OS_WINRT # elif WINAPI_FAMILY==WINAPI_FAMILY_PC_APP # define Q_OS_WINRT # else # define Q_OS_WIN32 # endif # else # define Q_OS_WIN32 # endif #elif defined(__sun) || defined(sun) # define Q_OS_SOLARIS #elif defined(hpux) || defined(__hpux) # define Q_OS_HPUX #elif defined(__native_client__) # define Q_OS_NACL #elif defined(__EMSCRIPTEN__) # define Q_OS_WASM #elif defined(__linux__) || defined(__linux) # define Q_OS_LINUX #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) # ifndef __FreeBSD_kernel__ # define Q_OS_FREEBSD # endif # define Q_OS_FREEBSD_KERNEL # define Q_OS_BSD4 #elif defined(__NetBSD__) # define Q_OS_NETBSD # define Q_OS_BSD4 #elif defined(__OpenBSD__) # define Q_OS_OPENBSD # define Q_OS_BSD4 #elif defined(__INTERIX) # define Q_OS_INTERIX # define Q_OS_BSD4 #elif defined(_AIX) # define Q_OS_AIX #elif defined(__Lynx__) # define Q_OS_LYNX #elif defined(__GNU__) # define Q_OS_HURD #elif defined(__QNXNTO__) # define Q_OS_QNX #elif defined(__INTEGRITY) # define Q_OS_INTEGRITY #elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */ # define Q_OS_VXWORKS #elif defined(__HAIKU__) # define Q_OS_HAIKU #elif defined(__MAKEDEPEND__) #else # error "Qt has not been ported to this OS - see http://www.qt-project.org/" #endif#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT) # define Q_OS_WIN #endif#if defined(Q_OS_WIN) # undef Q_OS_UNIX #elif !defined(Q_OS_UNIX) # define Q_OS_UNIX #endif// Compatibility synonyms #ifdef Q_OS_DARWIN #define Q_OS_MAC #endif #ifdef Q_OS_DARWIN32 #define Q_OS_MAC32 #endif #ifdef Q_OS_DARWIN64 #define Q_OS_MAC64 #endif #ifdef Q_OS_MACOS #define Q_OS_MACX #define Q_OS_OSX #endif#ifdef Q_OS_DARWIN # include # include # # ifdef Q_OS_MACOS # if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 # undef __MAC_OS_X_VERSION_MIN_REQUIRED # define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6 # endif # if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 # undef MAC_OS_X_VERSION_MIN_REQUIRED # define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 # endif # endif # # // Numerical checks are preferred to named checks, but to be safe # // we define the missing version names in case Qt uses them. # # if !defined(__MAC_10_11) # define __MAC_10_11 101100 # endif # if !defined(__MAC_10_12) # define __MAC_10_12 101200 # endif # if !defined(__MAC_10_13) # define __MAC_10_13 101300 # endif # if !defined(__MAC_10_14) # define __MAC_10_14 101400 # endif # if !defined(MAC_OS_X_VERSION_10_11) # define MAC_OS_X_VERSION_10_11 101100 # endif # if !defined(MAC_OS_X_VERSION_10_12) # define MAC_OS_X_VERSION_10_12 101200 # endif # if !defined(MAC_OS_X_VERSION_10_13) # define MAC_OS_X_VERSION_10_13 101300 # endif # if !defined(MAC_OS_X_VERSION_10_14) # define MAC_OS_X_VERSION_10_14 101400 # endif # # if !defined(__IPHONE_10_0) # define __IPHONE_10_0 100000 # endif # if !defined(__IPHONE_10_1) # define __IPHONE_10_1 100100 # endif # if !defined(__IPHONE_10_2) # define __IPHONE_10_2 100200 # endif # if !defined(__IPHONE_10_3) # define __IPHONE_10_3 100300 # endif # if !defined(__IPHONE_11_0) # define __IPHONE_11_0 110000 # endif # if !defined(__IPHONE_12_0) # define __IPHONE_12_0 120000 # endif #endif#ifdef __LSB_VERSION__ # if __LSB_VERSION__ < 40 # error "This version of the Linux Standard Base is unsupported" # endif #ifndef QT_LINUXBASE # define QT_LINUXBASE #endif #endif#endif // QSYSTEMDETECTION_H```
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
Duilib中list控件支持ctrl和shif多行选中的实现
[ICML2015]Batch Normalization:Accelerating Deep Network Training by Reducing Internal Covariate Shif
win10系统 微软输入法 于eclipse ctrl+shif+f冲突间接处理办法
Codeforces Round #259 (Div. 2) B. Little Pony and Sort by Shif
读LDD3,内存映射与DMA--PAGE_SHIF…
VMware虚拟机安装XP【要先分区,再设置BOOT 启动CD,shif+上移】
更换iBus五笔的左与右Shif
sublime ctrl+shif+f 没用解决办法
idea 对 ctrl + z 的撤销 是 ctrl + shif + z
计算机最早的设计师应用于,计算机应用基础选择题doc.doc
win10自带截图神器:Win+Shift+S
Python基础之文件目录操作
python简述目录_Python基础之文件目录操作(示例代码)
tp5 如何做数据采集
任务2-7(服务器字体+阿里巴巴矢量库)
html标签(1):h1~h6,p,br,pre,hr
TI 电量计介绍与芯片选型指南
几款TI电源芯片简介
TI DSP芯片C2000系列读取FLASH数据
德州仪器(Ti)平台嵌入式开发基础
TI三相电机智能栅极驱动芯片特点分类
省选模拟(12.08) T3 圈圈圈圈圈圈圈圈
Hadoop生态圈技术栈(上)
大数据开发基础入门与项目实战(三)Hadoop核心及生态圈技术栈之6.Impala交互式查询
小猿圈之Linux下Mysql 操作命令
大数据Hadoop生态圈常用面试题
大数据开发基础入门与项目实战(三)Hadoop核心及生态圈技术栈之4.Hive DDL、DQL和数据操作
备战Noip2018模拟赛11(B组)T3 Monogatari 物语
【智能优化算法-圆圈搜索算法】基于圆圈搜索算法Circle Search Algorithm求解单目标优化问题附matlab代码
NYOJ 78 圈水池
递归问题 跑道 汽车 绕圈问题 Python实现
Hadoop生态圈(三):MapReduce
微信公众账号
微信扫一扫加关注