split country names by upper case latters by inserting a space
This commit is contained in:
parent
1fd00130ab
commit
8fd59dd93f
2 changed files with 29 additions and 5 deletions
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
3.4.8git
|
3.4.8git
|
||||||
|
|
||||||
TODO split country names by upper case latters by inserting a space
|
* refresh server list if the Central Server address type is changed
|
||||||
|
|
||||||
|
|
||||||
TODO fix UpdateCurLevel() for new 64 samples frame size
|
TODO fix UpdateCurLevel() for new 64 samples frame size
|
||||||
|
|
||||||
|
@ -16,10 +17,10 @@ TODO for different frame sizes (64/128) the start value of 6 for the jitter buff
|
||||||
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f)
|
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f)
|
||||||
|
|
||||||
TODO client: larger sound card buffers are managed by conversion buffer, not in processintern for loop (note iSndCrdFrameSizeFactor!)
|
TODO client: larger sound card buffers are managed by conversion buffer, not in processintern for loop (note iSndCrdFrameSizeFactor!)
|
||||||
|
maybe let the use select all possible sound card buffer sizes, this should solve Ticket #53
|
||||||
TODO should LHostAddr be QHostAddress instead of CHostAddress?
|
|
||||||
|
|
||||||
TODO store Central Server jamulus.server start scripts on the Repo (one for Central Server, one for Central Server North America)
|
TODO store Central Server jamulus.server start scripts on the Repo (one for Central Server, one for Central Server North America)
|
||||||
|
TODO should LHostAddr be QHostAddress instead of CHostAddress? See https://github.com/corrados/jamulus/pull/48#issuecomment-612594981
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,12 @@ CConnectDlg::CConnectDlg ( const bool bNewShowCompleteRegList,
|
||||||
// make sure the connect button has the focus
|
// make sure the connect button has the focus
|
||||||
butConnect->setFocus();
|
butConnect->setFocus();
|
||||||
|
|
||||||
|
// for "show all servers" mode make sort by click on header possible
|
||||||
|
if ( bShowCompleteRegList )
|
||||||
|
{
|
||||||
|
lvwServers->setSortingEnabled ( true );
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
// for the android version maximize the window
|
// for the android version maximize the window
|
||||||
setWindowState ( Qt::WindowMaximized );
|
setWindowState ( Qt::WindowMaximized );
|
||||||
|
@ -288,7 +294,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
|
||||||
// in case of all servers shown, add the registration number at the beginning
|
// in case of all servers shown, add the registration number at the beginning
|
||||||
if ( bShowCompleteRegList )
|
if ( bShowCompleteRegList )
|
||||||
{
|
{
|
||||||
pNewListViewItem->setText ( 0, QString ( "%1: " ).arg ( 1 + iIdx ) + pNewListViewItem->text ( 0 ) );
|
pNewListViewItem->setText ( 0, QString ( "%1: " ).arg ( 1 + iIdx, 3 ) + pNewListViewItem->text ( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// show server name in bold font if it is a permanent server
|
// show server name in bold font if it is a permanent server
|
||||||
|
@ -309,9 +315,26 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
|
||||||
{
|
{
|
||||||
strLocation += ", ";
|
strLocation += ", ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( vecServerInfo[iIdx].eCountry != QLocale::AnyCountry )
|
if ( vecServerInfo[iIdx].eCountry != QLocale::AnyCountry )
|
||||||
{
|
{
|
||||||
strLocation += QLocale::countryToString ( vecServerInfo[iIdx].eCountry );
|
QString strCountryToString = QLocale::countryToString ( vecServerInfo[iIdx].eCountry );
|
||||||
|
|
||||||
|
// 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 ( !strCountryToString.contains ( " " ) )
|
||||||
|
{
|
||||||
|
QRegularExpressionMatchIterator reMatchIt = QRegularExpression ( "[A-Z][^A-Z]*" ).globalMatch ( strCountryToString );
|
||||||
|
QStringList slNames;
|
||||||
|
while ( reMatchIt.hasNext() )
|
||||||
|
{
|
||||||
|
slNames << reMatchIt.next().capturedTexts();
|
||||||
|
}
|
||||||
|
strCountryToString = slNames.join ( " " );
|
||||||
|
}
|
||||||
|
|
||||||
|
strLocation += strCountryToString;
|
||||||
}
|
}
|
||||||
|
|
||||||
pNewListViewItem->setText ( 3, strLocation );
|
pNewListViewItem->setText ( 3, strLocation );
|
||||||
|
|
Loading…
Reference in a new issue