From 8511c8b02fded7e3d698e38798aff1334bd38da6 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 17 Sep 2021 15:40:08 +0200 Subject: Convert all QT_VERSION checks to compare against QT_VERSION_CHECK() The result is generally more readable. Change-Id: I507f67954ecd38516de1b7a6f8244c233ee45ddf Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 7 ++++--- src/corelib/serialization/qdatastream.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 84b918bd48..727fc825e0 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -141,10 +141,11 @@ QT_BEGIN_NAMESPACE extern QString qAppFileName(); #endif -#if QT_VERSION >= 0x070000 -# error "Bump QCoreApplicatoinPrivate::app_compile_version to 0x070000" +#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) +# error "Bump QCoreApplicatoinPrivate::app_compile_version to QT_VERSION_CHECK(7, 0, 0)" #endif -int QCoreApplicationPrivate::app_compile_version = 0x060000; //we don't know exactly, but it's at least 6.0.0 +// We don't know exactly, but it's at least 6.0.0: +int QCoreApplicationPrivate::app_compile_version = QT_VERSION_CHECK(6, 0, 0); bool QCoreApplicationPrivate::setuidAllowed = false; diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h index 28984d8ba9..24b5d82606 100644 --- a/src/corelib/serialization/qdatastream.h +++ b/src/corelib/serialization/qdatastream.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -101,7 +101,7 @@ public: Qt_6_2 = Qt_6_0, Qt_6_3 = Qt_6_0, Qt_DefaultCompiledVersion = Qt_6_3 -#if QT_VERSION >= 0x060400 +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) #error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion #endif }; -- cgit v1.2.3