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