fixed: build against QT 6.8

This commit is contained in:
Arne Morten Kvarving
2024-12-02 11:30:13 +01:00
committed by Magne Sjaastad
parent bd3ef3f775
commit 6d4824b204
2 changed files with 5 additions and 0 deletions

View File

@@ -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 ) std::strong_ordering operator<=>( const QString& lhs, const QString& rhs )
{ {
return lhs.compare( rhs ) <=> 0; return lhs.compare( rhs ) <=> 0;
} }
#endif

View File

@@ -21,6 +21,7 @@
#include <QRegularExpression> #include <QRegularExpression>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QtGlobal>
#include <map> #include <map>
@@ -47,6 +48,7 @@ bool isNumber( const QString& text, const QString& decimalPoint );
} // namespace RiaTextStringTools } // namespace RiaTextStringTools
#if QT_VERSION < QT_VERSION_CHECK( 6, 8, 0 )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
// //
// Add operator<=> for QString to global scope // 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 ); std::strong_ordering operator<=>( const QString& lhs, const QString& rhs );
#endif