fix compatibility issue with Qt4 (Ticket #62)

This commit is contained in:
Volker Fischer 2020-04-12 21:19:41 +02:00
parent b4eae44b7c
commit af32867216

View file

@ -324,6 +324,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
// Qt countryToString does not use spaces in between country name // Qt countryToString does not use spaces in between country name
// parts but they use upper case letters which we can detect and // parts but they use upper case letters which we can detect and
// insert spaces as a post processing // insert spaces as a post processing
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
if ( !strCountryToString.contains ( " " ) ) if ( !strCountryToString.contains ( " " ) )
{ {
QRegularExpressionMatchIterator reMatchIt = QRegularExpression ( "[A-Z][^A-Z]*" ).globalMatch ( strCountryToString ); QRegularExpressionMatchIterator reMatchIt = QRegularExpression ( "[A-Z][^A-Z]*" ).globalMatch ( strCountryToString );
@ -334,6 +335,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
} }
strCountryToString = slNames.join ( " " ); strCountryToString = slNames.join ( " " );
} }
#endif
strLocation += strCountryToString; strLocation += strCountryToString;
} }