@@ -33,7 +33,7 @@ static QString mapVersionStr ( const QString& versionStr )
3333 QString x = " >" ; // default suffix is later (git, dev, nightly, etc)
3434
3535 // Regex for SemVer: major.minor.patch-suffix
36- QRegularExpression semVerRegex ( R"( ^(\d+)\.(\d+)\.(\d+)-?(.*)$)" );
36+ QRegularExpression semVerRegex ( R"( ^(\d+)\.(\d+)\.(\d+)-?(.*):?(.*) $)" );
3737 QRegularExpressionMatch match = semVerRegex.match ( versionStr );
3838
3939 if ( !match.hasMatch () )
@@ -45,6 +45,7 @@ static QString mapVersionStr ( const QString& versionStr )
4545 int minor = match.captured ( 2 ).toInt ();
4646 int patch = match.captured ( 3 ).toInt ();
4747 QString suffix = match.captured ( 4 ); // may be empty
48+ QString tstamp = match.captured ( 5 ); // may be empty
4849
4950 if ( suffix.isEmpty () )
5051 {
@@ -66,7 +67,7 @@ static QString mapVersionStr ( const QString& versionStr )
6667 .arg ( minor, 3 , 10 , QLatin1Char ( ' 0' ) )
6768 .arg ( patch, 3 , 10 , QLatin1Char ( ' 0' ) )
6869 .arg ( x )
69- .arg ( suffix );
70+ .arg ( tstamp. isEmpty () ? suffix : tstamp );
7071
7172 return key;
7273}
@@ -184,13 +185,13 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
184185 lvwServers->setColumnWidth ( LVC_NAME, 200 );
185186 lvwServers->setColumnWidth ( LVC_PING, 130 );
186187 lvwServers->setColumnWidth ( LVC_CLIENTS, 100 );
187- lvwServers->setColumnWidth ( LVC_VERSION, 110 );
188+ lvwServers->setColumnWidth ( LVC_VERSION, 150 );
188189#else
189190 lvwServers->setColumnWidth ( LVC_NAME, 180 );
190191 lvwServers->setColumnWidth ( LVC_PING, 75 );
191192 lvwServers->setColumnWidth ( LVC_CLIENTS, 70 );
192193 lvwServers->setColumnWidth ( LVC_LOCATION, 220 );
193- lvwServers->setColumnWidth ( LVC_VERSION, 95 );
194+ lvwServers->setColumnWidth ( LVC_VERSION, 135 );
194195#endif
195196 lvwServers->clear ();
196197
@@ -1024,7 +1025,7 @@ void CConnectDlg::SetServerVersionResult ( const CHostAddress& InetAddr, const Q
10241025
10251026 if ( pCurListViewItem )
10261027 {
1027- pCurListViewItem->setText ( LVC_VERSION, strVersion );
1028+ pCurListViewItem->setText ( LVC_VERSION, GetDisplayVersion ( strVersion ) );
10281029
10291030 // and store sortable mapped version number
10301031 pCurListViewItem->setData ( LVC_VERSION, Qt::UserRole, mapVersionStr ( strVersion ) );
0 commit comments