From 8a3e8856e5606ec616d4420ff8c4f77969432390 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Sat, 7 Jan 2017 12:23:47 +0300 Subject: qmake: Add test functions for comparing version numbers qmake really lacks version comparing functions: users either use ugly constructions to compare versions by components, such as greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4): or even incorrectly compare versions as strings: !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): Add test functions versionAtLeast and versionAtMost which use QVersionNumber to compare version numbers by components. Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc Reviewed-by: Oswald Buddenhagen --- qmake/qmake.pri | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmake/qmake.pri') diff --git a/qmake/qmake.pri b/qmake/qmake.pri index b9ed9ce96a..77c190bb9a 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -68,6 +68,7 @@ bootstrap { #Qt code qlibraryinfo.cpp \ qsystemerror.cpp \ qvariant.cpp \ + qversionnumber.cpp \ qvsnprintf.cpp \ qxmlstream.cpp \ qxmlutils.cpp \ @@ -119,6 +120,7 @@ bootstrap { #Qt code qtextstream.h \ quuid.h \ qvector.h \ + qversionnumber.h \ qxmlstream.h \ qxmlutils.h \ qjson.h \ -- cgit v1.2.3