From f1f2dde92522608b3c4e1a7b693b19554d17791e Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 2 Dec 2024 11:30:13 +0100 Subject: [PATCH] fixed: build against QT 6.8 --- ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp | 2 ++ ApplicationLibCode/Application/Tools/RiaTextStringTools.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp b/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp index 5612ddbc2c..724f4d7caf 100644 --- a/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp @@ -209,7 +209,9 @@ bool RiaTextStringTools::isNumber( const QString& text, const QString& decimalPo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- +#if QT_VERSION < QT_VERSION_CHECK(6,8,0) std::strong_ordering operator<=>( const QString& lhs, const QString& rhs ) { return lhs.compare( rhs ) <=> 0; } +#endif diff --git a/ApplicationLibCode/Application/Tools/RiaTextStringTools.h b/ApplicationLibCode/Application/Tools/RiaTextStringTools.h index 5c4b1ee9a2..3d889d3e55 100644 --- a/ApplicationLibCode/Application/Tools/RiaTextStringTools.h +++ b/ApplicationLibCode/Application/Tools/RiaTextStringTools.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include #include @@ -47,6 +48,7 @@ bool isNumber( const QString& text, const QString& decimalPoint ); } // namespace RiaTextStringTools +#if QT_VERSION < QT_VERSION_CHECK(6,8,0) //-------------------------------------------------------------------------------------------------- // // Add operator<=> for QString to global scope @@ -60,3 +62,4 @@ bool isNumber( const QString& text, const QString& decimalPoint ); // //-------------------------------------------------------------------------------------------------- std::strong_ordering operator<=>( const QString& lhs, const QString& rhs ); +#endif