From 78dcc3d3cddc3e04ba4d7e38a7e201c618caddd5 Mon Sep 17 00:00:00 2001 From: DonC Date: Thu, 3 Jun 2021 10:31:36 +0200 Subject: [PATCH 01/21] Compiles under Qt6 This compiles and runs under Qt6. There is a problem with the country codes, but it appears otherwise to run well (client). Change list: -All cases of endl changed to Qt::endl -All case of QString::null changed to QString() -enum ESvrRegStatus -> enum class ESvrRegStatus -QVBoxLayout setMargins(0) -> setContentsMargins(0,0,0,0) -QRegExp -> QRegularExpression -QtConcurrent, inverted arguements -in the recorder files some includes added -unneeded include QtConcurrent commented out We need to test everything to be sure it works as expected, but the basics, protocol and audio, appear to be running well. --- src/chatdlg.cpp | 5 ++-- src/clientdlg.cpp | 1 + src/connectdlg.cpp | 2 +- src/levelmeter.cpp | 2 +- src/recorder/creaperproject.cpp | 44 ++++++++++++++++----------------- src/recorder/cwavestream.h | 2 ++ src/recorder/jamcontroller.cpp | 4 +-- src/recorder/jamrecorder.cpp | 10 ++++---- src/server.h | 2 +- src/serverdlg.cpp | 32 ++++++++++++------------ src/serverlist.cpp | 16 ++++++------ src/serverlogging.cpp | 2 +- src/util.h | 25 ++++++++++--------- 13 files changed, 76 insertions(+), 71 deletions(-) diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index e248c5c8e5..832ca65c13 100644 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -23,6 +23,7 @@ \******************************************************************************/ #include "chatdlg.h" +#include /* Implementation *************************************************************/ CChatDlg::CChatDlg ( QWidget* parent ) : CBaseDlg ( parent, Qt::Window ) // use Qt::Window to get min/max window buttons @@ -110,11 +111,11 @@ void CChatDlg::AddChatText ( QString strChatText ) // analyze strChatText to check if hyperlink (limit ourselves to http(s)://) but do not // replace the hyperlinks if any HTML code for a hyperlink was found (the user has done the HTML // coding hisself and we should not mess with that) - if ( !strChatText.contains ( QRegExp ( "href\\s*=|src\\s*=" ) ) ) + if ( !strChatText.contains ( QRegularExpression ( "href\\s*=|src\\s*=" ) ) ) { // searches for all occurrences of http(s) and cuts until a space (\S matches any non-white-space // character and the + means that matches the previous element one or more times.) - strChatText.replace ( QRegExp ( "(https?://\\S+)" ), "\\1" ); + strChatText.replace ( QRegularExpression ( "(https?://\\S+)" ), "\\1" ); } // add new text in chat window diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index b34d9e741c..893e027325 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -23,6 +23,7 @@ \******************************************************************************/ #include "clientdlg.h" +#include /* Implementation *************************************************************/ CClientDlg::CClientDlg ( CClient* pNCliP, diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 4f6d04a59c..693f33c06e 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -690,7 +690,7 @@ void CConnectDlg::OnTimerPing() if ( NetworkUtil().ParseNetworkAddress ( lvwServers->topLevelItem ( iIdx )->data ( 0, Qt::UserRole ).toString(), CurServerAddress ) ) { // if address is valid, send ping message using a new thread - QtConcurrent::run ( this, &CConnectDlg::EmitCLServerListPingMes, CurServerAddress ); + QtConcurrent::run ( &CConnectDlg::EmitCLServerListPingMes, this, CurServerAddress ); } } } diff --git a/src/levelmeter.cpp b/src/levelmeter.cpp index 271e10aabe..64d969f590 100644 --- a/src/levelmeter.cpp +++ b/src/levelmeter.cpp @@ -34,7 +34,7 @@ CLevelMeter::CLevelMeter ( QWidget* parent ) : QWidget ( parent ), eLevelMeterTy QWidget* pLEDMeter = new QWidget(); QVBoxLayout* pLEDLayout = new QVBoxLayout ( pLEDMeter ); pLEDLayout->setAlignment ( Qt::AlignHCenter ); - pLEDLayout->setMargin ( 0 ); + pLEDLayout->setContentsMargins ( 0 , 0, 0, 0 ); pLEDLayout->setSpacing ( 0 ); // create LEDs plus the clip LED diff --git a/src/recorder/creaperproject.cpp b/src/recorder/creaperproject.cpp index 1c03cdf9c6..b8af8d9713 100644 --- a/src/recorder/creaperproject.cpp +++ b/src/recorder/creaperproject.cpp @@ -62,19 +62,19 @@ CReaperItem::CReaperItem ( const QString& name, const STrackItem& trackItem, con QTextStream sOut ( &out ); - sOut << " " << endl; + sOut << " " << Qt::endl; sOut << " >"; @@ -91,14 +91,14 @@ CReaperTrack::CReaperTrack ( QString name, qint32& iid, QList items, { QTextStream sOut ( &out ); - sOut << " > tracks, int fr { QTextStream sOut ( &out ); - sOut << ""; diff --git a/src/recorder/cwavestream.h b/src/recorder/cwavestream.h index 6f2d69a0ca..c9cf5e0e99 100644 --- a/src/recorder/cwavestream.h +++ b/src/recorder/cwavestream.h @@ -25,6 +25,8 @@ #pragma once #include +#include +#include namespace recorder { diff --git a/src/recorder/jamcontroller.cpp b/src/recorder/jamcontroller.cpp index 11ea775d47..3c450591bb 100644 --- a/src/recorder/jamcontroller.cpp +++ b/src/recorder/jamcontroller.cpp @@ -91,7 +91,7 @@ void CJamController::SetRecordingDir ( QString newRecordingDir, int iServerFrame { pJamRecorder = new recorder::CJamRecorder ( newRecordingDir, iServerFrameSizeSamples ); strRecorderErrMsg = pJamRecorder->Init(); - bRecorderInitialised = ( strRecorderErrMsg == QString::null ); + bRecorderInitialised = ( strRecorderErrMsg == QString() ); bEnableRecording = bRecorderInitialised && !bDisableRecording; qInfo() << qUtf8Printable ( QString ( "Recording state: %1" ).arg ( bEnableRecording ? "enabled" : "disabled" ) ); @@ -99,7 +99,7 @@ void CJamController::SetRecordingDir ( QString newRecordingDir, int iServerFrame else { // This is the only time this is ever true - UI needs to handle it - strRecorderErrMsg = QString::null; + strRecorderErrMsg = QString(); bRecorderInitialised = false; bEnableRecording = false; diff --git a/src/recorder/jamrecorder.cpp b/src/recorder/jamrecorder.cpp index 9ae17a7d8b..331ca706cb 100644 --- a/src/recorder/jamrecorder.cpp +++ b/src/recorder/jamrecorder.cpp @@ -359,11 +359,11 @@ QMap> CJamSession::TracksFromSessionDir ( const QStri /** * @brief CJamRecorder::Init Create recording directory, if necessary, and connect signal handlers * @param server Server object emitting signals - * @return QString::null on success else the failure reason + * @return QString::null (Qt6 QString() )on success else the failure reason */ QString CJamRecorder::Init() { - QString errmsg = QString::null; + QString errmsg = QString(); QFileInfo fi ( recordBaseDir.absolutePath() ); fi.setCaching ( false ); @@ -483,7 +483,7 @@ void CJamRecorder::ReaperProjectFromCurrentSession() if ( outf.open ( QFile::WriteOnly ) ) { QTextStream out ( &outf ); - out << CReaperProject ( currentSession->Tracks(), iServerFrameSizeSamples ).toString() << endl; + out << CReaperProject ( currentSession->Tracks(), iServerFrameSizeSamples ).toString() << Qt::endl; qDebug() << "Session RPP:" << reaperProjectFileName; } else @@ -515,7 +515,7 @@ void CJamRecorder::AudacityLofFromCurrentSession() { QFileInfo fi ( item.fileName ); sOut << "file " << '"' << fi.fileName() << '"'; - sOut << " offset " << secondsAt48K ( item.startFrame, iServerFrameSizeSamples ) << endl; + sOut << " offset " << secondsAt48K ( item.startFrame, iServerFrameSizeSamples ) << Qt::endl; } } @@ -560,7 +560,7 @@ void CJamRecorder::SessionDirToReaper ( QString& strSessionDirName, int serverFr out << CReaperProject ( CJamSession::TracksFromSessionDir ( fiSessionDir.absoluteFilePath(), serverFrameSizeSamples ), serverFrameSizeSamples ) .toString() - << endl; + << Qt::endl; qDebug() << "Session RPP:" << reaperProjectFileName; } diff --git a/src/server.h b/src/server.h index 749694bb4f..b0a47fa0f9 100644 --- a/src/server.h +++ b/src/server.h @@ -29,7 +29,7 @@ #include #include #include -#include +//#include #include #ifdef USE_OPUS_SHARED_LIB # include "opus/opus_custom.h" diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 2d71da7ab1..04a91f9772 100644 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -320,7 +320,7 @@ lvwClients->setMinimumHeight ( 140 ); edtRecordingDir->setText ( pServer->GetRecordingDir() ); tbtClearRecordingDir->setText ( u8"\u232B" ); - UpdateRecorderStatus ( QString::null ); + UpdateRecorderStatus ( QString() ); // language combo box (corrects the setting if language not found) cbxLanguage->Init ( pSettings->strLanguage ); @@ -543,19 +543,19 @@ void CServerDlg::OnCentServAddrTypeActivated ( int iTypeIdx ) void CServerDlg::OnServerStarted() { UpdateSystemTrayIcon ( true ); - UpdateRecorderStatus ( QString::null ); + UpdateRecorderStatus ( QString() ); } void CServerDlg::OnServerStopped() { UpdateSystemTrayIcon ( false ); - UpdateRecorderStatus ( QString::null ); + UpdateRecorderStatus ( QString() ); } void CServerDlg::OnStopRecorder() { - UpdateRecorderStatus ( QString::null ); - if ( pServer->GetRecorderErrMsg() != QString::null ) + UpdateRecorderStatus ( QString() ); + if ( pServer->GetRecorderErrMsg() != QString() ) { QMessageBox::warning ( this, APP_NAME, @@ -578,16 +578,16 @@ void CServerDlg::OnRecordingDirClicked() if ( newRecordingDir != currentValue ) { pServer->SetRecordingDir ( newRecordingDir ); - UpdateRecorderStatus ( QString::null ); + UpdateRecorderStatus ( QString() ); } } void CServerDlg::OnClearRecordingDirClicked() { - if ( pServer->GetRecorderErrMsg() != QString::null || pServer->GetRecordingDir() != "" ) + if ( pServer->GetRecorderErrMsg() != QString() || pServer->GetRecordingDir() != "" ) { pServer->SetRecordingDir ( "" ); - UpdateRecorderStatus ( QString::null ); + UpdateRecorderStatus ( QString() ); } } @@ -676,15 +676,15 @@ void CServerDlg::UpdateGUIDependencies() switch ( eSvrRegStatus ) { - case SRS_BAD_ADDRESS: - case SRS_TIME_OUT: - case SRS_CENTRAL_SVR_FULL: - case SRS_VERSION_TOO_OLD: - case SRS_NOT_FULFILL_REQUIREMENTS: + case ESvrRegStatus::SRS_BAD_ADDRESS: + case ESvrRegStatus::SRS_TIME_OUT: + case ESvrRegStatus::SRS_CENTRAL_SVR_FULL: + case ESvrRegStatus::SRS_VERSION_TOO_OLD: + case ESvrRegStatus::SRS_NOT_FULFILL_REQUIREMENTS: strStatus = "" + strStatus + ""; break; - case SRS_REGISTERED: + case ESvrRegStatus::SRS_REGISTERED: strStatus = "" + strStatus + ""; break; @@ -764,7 +764,7 @@ void CServerDlg::UpdateRecorderStatus ( QString sessionDir ) { if ( pServer->IsRunning() ) { - edtCurrentSessionDir->setText ( sessionDir != QString::null ? sessionDir : "" ); + edtCurrentSessionDir->setText ( sessionDir != QString() ? sessionDir : "" ); strRecorderStatus = SREC_RECORDING; bIsRecording = true; @@ -783,7 +783,7 @@ void CServerDlg::UpdateRecorderStatus ( QString sessionDir ) { strRecordingDir = pServer->GetRecorderErrMsg(); - if ( strRecordingDir == QString::null ) + if ( strRecordingDir == QString() ) { strRecordingDir = pServer->GetRecordingDir(); } diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 97cb1e53e5..097ebcd9b6 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -35,7 +35,7 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum, eCentralServerAddressType ( AT_CUSTOM ), // must be AT_CUSTOM for the "no GUI" case strMinServerVersion ( "" ), // disable version check with empty version pConnLessProtocol ( pNConLProt ), - eSvrRegStatus ( SRS_UNREGISTERED ), + eSvrRegStatus ( ESvrRegStatus::SRS_UNREGISTERED ), iSvrRegRetries ( 0 ) { // set the directory server address @@ -160,7 +160,7 @@ void CServerListManager::SetCentralServerAddress ( const QString sNCentServAddr } // if we are registered to a custom directory server, unregister before updating the name - if ( eCentralServerAddressType == AT_CUSTOM && GetSvrRegStatus() == SRS_REGISTERED ) + if ( eCentralServerAddressType == AT_CUSTOM && GetSvrRegStatus() == ESvrRegStatus::SRS_REGISTERED ) { SlaveServerUnregister(); } @@ -179,7 +179,7 @@ void CServerListManager::SetCentralServerAddress ( const QString sNCentServAddr void CServerListManager::SetCentralServerAddressType ( const ECSAddType eNCSAT ) { // if the type is changing, unregister before updating - if ( eNCSAT != eCentralServerAddressType && GetSvrRegStatus() == SRS_REGISTERED ) + if ( eNCSAT != eCentralServerAddressType && GetSvrRegStatus() == ESvrRegStatus::SRS_REGISTERED ) { SlaveServerUnregister(); } @@ -541,13 +541,13 @@ void CServerListManager::OnTimerCLRegisterServerResp() { QMutexLocker locker ( &Mutex ); - if ( eSvrRegStatus == SRS_REQUESTED ) + if ( eSvrRegStatus == ESvrRegStatus::SRS_REQUESTED ) { iSvrRegRetries++; if ( iSvrRegRetries >= REGISTER_SERVER_RETRY_LIMIT ) { - SetSvrRegStatus ( SRS_TIME_OUT ); + SetSvrRegStatus ( ESvrRegStatus::SRS_TIME_OUT ); } else { @@ -583,21 +583,21 @@ void CServerListManager::SlaveServerRegisterServer ( const bool bIsRegister ) if ( bIsRegister ) { // register server - SetSvrRegStatus ( SRS_REQUESTED ); + SetSvrRegStatus ( ESvrRegStatus::SRS_REQUESTED ); pConnLessProtocol->CreateCLRegisterServerExMes ( SlaveCurCentServerHostAddress, SlaveCurLocalHostAddress, ServerList[0] ); } else { // unregister server - SetSvrRegStatus ( SRS_UNREGISTERED ); + SetSvrRegStatus ( ESvrRegStatus::SRS_UNREGISTERED ); pConnLessProtocol->CreateCLUnregisterServerMes ( SlaveCurCentServerHostAddress ); } } else { - SetSvrRegStatus ( SRS_BAD_ADDRESS ); + SetSvrRegStatus ( ESvrRegStatus::SRS_BAD_ADDRESS ); } } diff --git a/src/serverlogging.cpp b/src/serverlogging.cpp index 094f236c04..88685e2098 100644 --- a/src/serverlogging.cpp +++ b/src/serverlogging.cpp @@ -70,7 +70,7 @@ void CServerLogging::operator<< ( const QString& sNewStr ) { // append new line in logging file QTextStream out ( &File ); - out << sNewStr << endl; + out << sNewStr << Qt::endl; File.flush(); } } diff --git a/src/util.h b/src/util.h index 8fac9a931c..bf32519195 100644 --- a/src/util.h +++ b/src/util.h @@ -573,7 +573,7 @@ inline QString csCentServAddrTypeToString ( ECSAddType eAddrType ) } // Slave server registration state --------------------------------------------- -enum ESvrRegStatus +enum class ESvrRegStatus { SRS_UNREGISTERED, SRS_BAD_ADDRESS, @@ -590,35 +590,36 @@ inline QString svrRegStatusToString ( ESvrRegStatus eSvrRegStatus ) { switch ( eSvrRegStatus ) { - case SRS_UNREGISTERED: + case ESvrRegStatus::SRS_UNREGISTERED: return QCoreApplication::translate ( "CServerDlg", "Unregistered" ); - case SRS_BAD_ADDRESS: + case ESvrRegStatus::SRS_BAD_ADDRESS: return QCoreApplication::translate ( "CServerDlg", "Bad address" ); - case SRS_REQUESTED: + case ESvrRegStatus::SRS_REQUESTED: return QCoreApplication::translate ( "CServerDlg", "Registration requested" ); - case SRS_TIME_OUT: + case ESvrRegStatus::SRS_TIME_OUT: return QCoreApplication::translate ( "CServerDlg", "Registration failed" ); - case SRS_UNKNOWN_RESP: + case ESvrRegStatus::SRS_UNKNOWN_RESP: return QCoreApplication::translate ( "CServerDlg", "Check server version" ); - case SRS_REGISTERED: + case ESvrRegStatus::SRS_REGISTERED: return QCoreApplication::translate ( "CServerDlg", "Registered" ); - case SRS_CENTRAL_SVR_FULL: + case ESvrRegStatus::SRS_CENTRAL_SVR_FULL: return QCoreApplication::translate ( "CServerDlg", "Directory Server full" ); - case SRS_VERSION_TOO_OLD: + case ESvrRegStatus::SRS_VERSION_TOO_OLD: return QCoreApplication::translate ( "CServerDlg", "Your server version is too old" ); - case SRS_NOT_FULFILL_REQUIREMENTS: + case ESvrRegStatus::SRS_NOT_FULFILL_REQUIREMENTS: return QCoreApplication::translate ( "CServerDlg", "Requirements not fulfilled" ); } - return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus ); + return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ); +// return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus ); } // Directory server registration outcome --------------------------------------- @@ -1199,7 +1200,7 @@ class CTimingMeas for ( int i = 0; i < iNumMeas; i++ ) { // convert ns in ms and store the value - streamFile << i << " " << static_cast ( vElapsedTimes[i] ) / 1000000 << endl; + streamFile << i << " " << static_cast ( vElapsedTimes[i] ) / 1000000 << Qt::endl; } } } From 4355d704e42e24ed8267cb16faca7c1124a96eb9 Mon Sep 17 00:00:00 2001 From: DonC Date: Thu, 3 Jun 2021 17:27:17 +0200 Subject: [PATCH 02/21] Compiles on both Qt5 and Qt6 QtConcurrent parameter order changes between 5 and 6, in connectdlg, nothing else. Note there is still a problem in the locale mgmt in 6. But it compiles w/o error and runs protokol and audio error free as far as I can see. --- src/connectdlg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 693f33c06e..db4d2a78b0 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -690,7 +690,11 @@ void CConnectDlg::OnTimerPing() if ( NetworkUtil().ParseNetworkAddress ( lvwServers->topLevelItem ( iIdx )->data ( 0, Qt::UserRole ).toString(), CurServerAddress ) ) { // if address is valid, send ping message using a new thread +#if QT_VERSION >= 0x060000 QtConcurrent::run ( &CConnectDlg::EmitCLServerListPingMes, this, CurServerAddress ); +#else + QtConcurrent::run ( this, &CConnectDlg::EmitCLServerListPingMes, CurServerAddress ); +#endif } } } From 035d39fe45ace3159ca74f04e7fa7705eaa25c51 Mon Sep 17 00:00:00 2001 From: DonC Date: Sun, 6 Jun 2021 11:49:52 +0200 Subject: [PATCH 03/21] Modified to compile under Qt5 and Qt6.1 --- src/audiomixerboard.cpp | 9 +- src/connectdlg.cpp | 10 +- src/util.cpp | 15 +++ src/util.h | 272 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 302 insertions(+), 4 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 9a2083efff..e25416dcfb 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -706,8 +706,13 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) // Country flag icon ------------------------------------------------------- if ( cChanInfo.eCountry != QLocale::AnyCountry ) { +#if QT_VERSION >= 0x060000 + QLocale::Country eC = CLocale::LocaleQt5toQt6( cChanInfo.eCountry ); +#else + QLocale::Country eC = cChanInfo.eCountry; +#endif // try to load the country flag icon - QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( cChanInfo.eCountry ) ); + QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( eC ) ); // first check if resource reference was valid if ( CountryFlagPixmap.isNull() ) @@ -719,7 +724,7 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) { // set correct picture plblCountryFlag->setPixmap ( CountryFlagPixmap ); - eTTCountry = cChanInfo.eCountry; + eTTCountry = eC; // enable country flag plblCountryFlag->setVisible ( true ); diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index db4d2a78b0..5b1d39c7bd 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -382,8 +382,11 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr, const CVector= 0x060000 + QString strCountryToString = QLocale::countryToString ( CLocale::LocaleQt5toQt6( vecServerInfo[iIdx].eCountry ) ); +#else QString strCountryToString = QLocale::countryToString ( vecServerInfo[iIdx].eCountry ); - +#endif // 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 @@ -458,8 +461,11 @@ void CConnectDlg::SetConnClientsList ( const CHostAddress& InetAddr, const CVect if ( vecChanInfo[i].eCountry != QLocale::AnyCountry ) { // try to load the country flag icon +#if QT_VERSION >= 0x060000 + QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( CLocale::LocaleQt5toQt6( vecChanInfo[i].eCountry ) ) ); +#else QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( vecChanInfo[i].eCountry ) ); - +#endif // first check if resource reference was valid if ( !CountryFlagPixmap.isNull() ) { diff --git a/src/util.cpp b/src/util.cpp index 3ca37589d0..c56993f0dd 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -24,6 +24,7 @@ #include "util.h" #include "client.h" +#include /* Implementation *************************************************************/ // Input level meter implementation -------------------------------------------- @@ -1028,6 +1029,16 @@ CInstPictures::EInstCategory CInstPictures::GetCategory ( const int iInstrument } // Locale management class ----------------------------------------------------- +#if QT_VERSION >= 0x060000 +QLocale::Country CLocale::LocaleQt5toQt6( const QLocale::Country eCountry ) +{ + return ( (QLocale::Country)slocaletab[(int)eCountry].Qt5toQt6 ); +}; +QLocale::Country CLocale::LocaleQt6toQt5( const QLocale::Country eCountry ) +{ + return ( (QLocale::Country)slocaletab[(int)eCountry].Qt6toQt5 ); +}; +#endif QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country eCountry ) { QString strReturn = ""; @@ -1046,6 +1057,9 @@ QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country e // the new code. // COMPATIBLE FOR OLD QT VERSIONS -> use a table: QString strISO3166 = ""; +#if QT_VERSION >= 0x060000 + strISO3166 = QString(slocaletab[(int)eCountry].flagQt6 ); +#else switch ( static_cast ( eCountry ) ) { case 1: @@ -1595,6 +1609,7 @@ QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country e strISO3166 = "ax"; break; } +#endif strReturn = ":/png/flags/res/flags/" + strISO3166 + ".png"; // check if file actually exists, if not then invalidate reference diff --git a/src/util.h b/src/util.h index bf32519195..79efe2a1ef 100644 --- a/src/util.h +++ b/src/util.h @@ -805,6 +805,278 @@ class CLocale static QMap GetAvailableTranslations(); static QPair FindSysLangTransFileName ( const QMap& TranslMap ); static void LoadTranslation ( const QString strLanguage, QCoreApplication* pApp ); +#if QT_VERSION >= 0x060000 + static QLocale::Country LocaleQt5toQt6( const QLocale::Country eCountry ); + static QLocale::Country LocaleQt6toQt5( const QLocale::Country eCountry ); + struct slocalestruct { int Qt5toQt6; + int Qt6toQt5; + char flagQt6[3]; + }; + constexpr struct slocalestruct const static slocaletab[262] = { + { 0 , 0 ,"." }, + { 1 , 1 ,"af"}, + { 3 , 248 ,"ax"}, + { 4 , 2 ,"al"}, + { 5 , 3 ,"dz"}, + { 6 , 4 ,"." }, + { 7 , 5 ,"ad"}, + { 8 , 6 ,"ao"}, + { 9 , 7 ,"." }, + { 10 , 8 ,"." }, + { 11 , 9 ,"." }, + { 12 , 10 ,"ar"}, + { 13 , 11 ,"am"}, + { 15 , 12 ,"aw"}, + { 16 , 247 ,"." }, + { 17 , 13 ,"au"}, + { 18 , 14 ,"at"}, + { 19 , 15 ,"az"}, + { 20 , 16 ,"." }, + { 21 , 17 ,"bh"}, + { 22 , 18 ,"bd"}, + { 23 , 19 ,"." }, + { 24 , 20 ,"by"}, + { 25 , 21 ,"be"}, + { 26 , 22 ,"." }, + { 27 , 23 ,"bj"}, + { 28 , 24 ,"." }, + { 29 , 25 ,"bt"}, + { 30 , 26 ,"bo"}, + { 31 , 27 ,"ba"}, + { 32 , 28 ,"bw"}, + { 33 , 29 ,"." }, + { 35 , 30 ,"br"}, + { 36 , 31 ,"." }, + { 37 , 233 ,"." }, + { 38 , 32 ,"bn"}, + { 39 , 33 ,"bg"}, + { 40 , 34 ,"bf"}, + { 41 , 35 ,"bi"}, + { 43 , 36 ,"kh"}, + { 45 , 37 ,"cm"}, + { 46 , 38 ,"ca"}, + { 48 , 238 ,"." }, + { 49 , 39 ,"cv"}, + { 50 , 255 ,"." }, + { 51 , 40 ,"." }, + { 53 , 41 ,"cf"}, + { 54 , 250 ,"." }, + { 55 , 42 ,"td"}, + { 57 , 43 ,"cl"}, + { 56 , 44 ,"cn"}, + { 58 , 45 ,"." }, + { 59 , 241 ,"." }, + { 118 , 46 ,"." }, + { 60 , 47 ,"co"}, + { 61 , 48 ,"km"}, + { 63 , 50 ,"cd"}, + { 64 , 49 ,"cg"}, + { 65 , 51 ,"." }, + { 67 , 52 ,"cr"}, + { 68 , 54 ,"hr"}, + { 69 , 55 ,"cu"}, + { 232 , 152 ,"." }, + { 70 , 56 ,"cy"}, + { 71 , 57 ,"cz"}, + { 72 , 58 ,"dk"}, + { 73 , 249 ,"." }, + { 74 , 59 ,"dj"}, + { 75 , 60 ,"." }, + { 77 , 61 ,"do"}, + { 80 , 63 ,"ec"}, + { 81 , 64 ,"eg"}, + { 82 , 65 ,"sv"}, + { 83 , 66 ,"gq"}, + { 84 , 67 ,"er"}, + { 100 , 68 ,"ee"}, + { 85 , 204 ,"sz"}, + { 86 , 69 ,"et"}, + { 87 , 261 ,"." }, + { 88 , 258 ,"." }, + { 89 , 70 ,"." }, + { 90 , 71 ,"fo"}, + { 91 , 72 ,"." }, + { 92 , 73 ,"fi"}, + { 93 , 74 ,"fr"}, + { 94 , 76 ,"gf"}, + { 95 , 77 ,"pf"}, + { 96 , 78 ,"." }, + { 97 , 79 ,"ga"}, + { 98 , 80 ,"." }, + { 99 , 81 ,"ge"}, + { 102 , 82 ,"de"}, + { 101 , 83 ,"gh"}, + { 103 , 84 ,"." }, + { 104 , 85 ,"gr"}, + { 105 , 86 ,"gl"}, + { 106 , 87 ,"." }, + { 107 , 88 ,"gp"}, + { 108 , 89 ,"." }, + { 109 , 90 ,"gt"}, + { 110 , 75 ,"." }, + { 111 , 92 ,"gw"}, + { 112 , 91 ,"gn"}, + { 113 , 93 ,"gy"}, + { 114 , 94 ,"." }, + { 116 , 95 ,"." }, + { 117 , 96 ,"hn"}, + { 119 , 97 ,"hk"}, + { 120 , 98 ,"hu"}, + { 122 , 99 ,"is"}, + { 123 , 100 ,"in"}, + { 124 , 101 ,"id"}, + { 125 , 102 ,"ir"}, + { 174 , 103 ,"iq"}, + { 218 , 104 ,"ie"}, + { 127 , 251 ,"." }, + { 128 , 105 ,"il"}, + { 129 , 106 ,"it"}, + { 131 , 53 ,"ci"}, + { 132 , 107 ,"." }, + { 133 , 108 ,"jp"}, + { 134 , 252 ,"." }, + { 135 , 109 ,"jo"}, + { 136 , 110 ,"kz"}, + { 137 , 111 ,"ke"}, + { 138 , 112 ,"." }, + { 139 , 257 ,"." }, + { 140 , 115 ,"kw"}, + { 141 , 116 ,"kg"}, + { 142 , 117 ,"la"}, + { 143 , 246 ,"." }, + { 144 , 118 ,"lv"}, + { 145 , 119 ,"lb"}, + { 146 , 120 ,"ls"}, + { 147 , 121 ,"."}, + { 148 , 122 ,"ly"}, + { 149 , 123 ,"li"}, + { 150 , 124 ,"lt"}, + { 151 , 125 ,"lu"}, + { 152 , 126 ,"mo"}, + { 153 , 127 ,"mk"}, + { 154 , 128 ,"mg"}, + { 155 , 129 ,"."}, + { 156 , 130 ,"my"}, + { 158 , 131 ,"."}, + { 159 , 132 ,"ml"}, + { 160 , 133 ,"mt"}, + { 161 , 134 ,"."}, + { 162 , 135 ,"mq"}, + { 163 , 136 ,"mr"}, + { 164 , 137 ,"mu"}, + { 165 , 138 ,"yt"}, + { 62 , 139 ,"mx"}, + { 166 , 140 ,"."}, + { 167 , 141 ,"md"}, + { 168 , 142 ,"mc"}, + { 170 , 143 ,"mn"}, + { 169 , 242 ,"me"}, + { 171 , 144 ,"."}, + { 172 , 145 ,"ma"}, + { 173 , 146 ,"mz"}, + { 175 , 147 ,"mm"}, + { 176 , 148 ,"na"}, + { 178 , 149 ,"."}, + { 179 , 150 ,"np"}, + { 180 , 151 ,"nl"}, + { 181 , 153 ,"nc"}, + { 182 , 154 ,"nz"}, + { 183 , 155 ,"ni"}, + { 184 , 157 ,"ng"}, + { 185 , 156 ,"ne"}, + { 186 , 158 ,"."}, + { 187 , 159 ,"."}, + { 188 , 160 ,"."}, + { 189 , 113 ,"kp"}, + { 190 , 161 ,"no"}, + { 191 , 162 ,"om"}, + { 192 , 259 ,"."}, + { 193 , 163 ,"pk"}, + { 194 , 164 ,"."}, + { 197 , 165 ,"ps"}, + { 198 , 166 ,"pa"}, + { 201 , 167 ,"pg"}, + { 202 , 168 ,"py"}, + { 203 , 169 ,"pe"}, + { 204 , 170 ,"ph"}, + { 205 , 171 ,"."}, + { 206 , 172 ,"pl"}, + { 208 , 173 ,"pt"}, + { 209 , 174 ,"pr"}, + { 210 , 175 ,"qa"}, + { 212 , 176 ,"re"}, + { 213 , 177 ,"ro"}, + { 214 , 178 ,"ru"}, + { 215 , 179 ,"rw"}, + { 216 , 244 ,"."}, + { 217 , 199 ,"."}, + { 220 , 180 ,"."}, + { 221 , 181 ,"."}, + { 196 , 245 ,"."}, + { 200 , 200 ,"."}, + { 222 , 182 ,"."}, + { 223 , 183 ,"."}, + { 224 , 184 ,"sm"}, + { 76 , 185 ,"st"}, + { 225 , 186 ,"sa"}, + { 226 , 187 ,"sn"}, + { 227 , 243 ,"rs"}, + { 228 , 188 ,"sc"}, + { 229 , 189 ,"sl"}, + { 230 , 190 ,"sg"}, + { 231 , 256 ,"."}, + { 233 , 191 ,"sk"}, + { 234 , 192 ,"si"}, + { 235 , 193 ,"."}, + { 236 , 194 ,"so"}, + { 238 , 195 ,"za"}, + { 239 , 196 ,"."}, + { 240 , 114 ,"kr"}, + { 241 , 254 ,"."}, + { 242 , 197 ,"es"}, + { 243 , 198 ,"lk"}, + { 244 , 201 ,"sd"}, + { 245 , 202 ,"sr"}, + { 246 , 203 ,"."}, + { 248 , 205 ,"se"}, + { 247 , 206 ,"ch"}, + { 250 , 207 ,"sy"}, + { 251 , 208 ,"tw"}, + { 252 , 209 ,"tj"}, + { 253 , 210 ,"tz"}, + { 254 , 211 ,"th"}, + { 255 , 62 ,"tl"}, + { 34 , 212 ,"tg"}, + { 249 , 213 ,"."}, + { 256 , 214 ,"to"}, + { 257 , 215 ,"."}, + { 259 , 253 ,"."}, + { 42 , 216 ,"tn"}, + { 260 , 217 ,"tr"}, + { 261 , 218 ,"."}, + { 52 , 219 ,"."}, + { 157 , 220 ,"."}, + { 207 , 221 ,"ug"}, + { 195 , 222 ,"ua"}, + { 199 , 223 ,"ae"}, + { 130 , 224 ,"gb"}, + { 14 , 226 ,"."}, + { 2 , 225 ,"us"}, + { 66 , 234 ,"."}, + { 47 , 227 ,"uy"}, + { 115 , 228 ,"uz"}, + { 121 , 229 ,"."}, + { 237 , 230 ,"."}, + { 219 , 231 ,"ve"}, + { 44 , 232 ,"vn"}, + { 211 , 235 ,"."}, + { 126 , 236 ,"eh"}, + { 79 , 260 ,"."}, + { 177 , 237 ,"ye"}, + { 258 , 239 ,"zm"}, + { 78 , 240 ,"."} + }; +#endif }; // Info of a channel ----------------------------------------------------------- From 6810c02763dd854d3a22e4d6ec0940c862acfaee Mon Sep 17 00:00:00 2001 From: DonC Date: Sun, 6 Jun 2021 17:47:11 +0200 Subject: [PATCH 04/21] clang-format --- src/audiomixerboard.cpp | 2 +- src/connectdlg.cpp | 4 +- src/levelmeter.cpp | 2 +- src/main.cpp | 2 +- src/server.h | 2 +- src/util.cpp | 12 +- src/util.h | 315 ++++++---------------------------------- 7 files changed, 55 insertions(+), 284 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index e25416dcfb..9ea7a2b3fa 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -707,7 +707,7 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) if ( cChanInfo.eCountry != QLocale::AnyCountry ) { #if QT_VERSION >= 0x060000 - QLocale::Country eC = CLocale::LocaleQt5toQt6( cChanInfo.eCountry ); + QLocale::Country eC = CLocale::LocaleQt5toQt6 ( cChanInfo.eCountry ); #else QLocale::Country eC = cChanInfo.eCountry; #endif diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 5b1d39c7bd..07eff9a8df 100644 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -383,7 +383,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr, const CVector= 0x060000 - QString strCountryToString = QLocale::countryToString ( CLocale::LocaleQt5toQt6( vecServerInfo[iIdx].eCountry ) ); + QString strCountryToString = QLocale::countryToString ( CLocale::LocaleQt5toQt6 ( vecServerInfo[iIdx].eCountry ) ); #else QString strCountryToString = QLocale::countryToString ( vecServerInfo[iIdx].eCountry ); #endif @@ -462,7 +462,7 @@ void CConnectDlg::SetConnClientsList ( const CHostAddress& InetAddr, const CVect { // try to load the country flag icon #if QT_VERSION >= 0x060000 - QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( CLocale::LocaleQt5toQt6( vecChanInfo[i].eCountry ) ) ); + QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( CLocale::LocaleQt5toQt6 ( vecChanInfo[i].eCountry ) ) ); #else QPixmap CountryFlagPixmap ( CLocale::GetCountryFlagIconsResourceReference ( vecChanInfo[i].eCountry ) ); #endif diff --git a/src/levelmeter.cpp b/src/levelmeter.cpp index 64d969f590..a2e0b2a41a 100644 --- a/src/levelmeter.cpp +++ b/src/levelmeter.cpp @@ -34,7 +34,7 @@ CLevelMeter::CLevelMeter ( QWidget* parent ) : QWidget ( parent ), eLevelMeterTy QWidget* pLEDMeter = new QWidget(); QVBoxLayout* pLEDLayout = new QVBoxLayout ( pLEDMeter ); pLEDLayout->setAlignment ( Qt::AlignHCenter ); - pLEDLayout->setContentsMargins ( 0 , 0, 0, 0 ); + pLEDLayout->setContentsMargins ( 0, 0, 0, 0 ); pLEDLayout->setSpacing ( 0 ); // create LEDs plus the clip LED diff --git a/src/main.cpp b/src/main.cpp index f1ea4f06f6..f31197ca34 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -538,7 +538,7 @@ int main ( int argc, char** argv ) QCoreApplication* pApp = new QCoreApplication ( argc, argv ); #else # if defined( Q_OS_IOS ) - bUseGUI = true; + bUseGUI = true; // bUseMultithreading = true; QApplication* pApp = new QApplication ( argc, argv ); diff --git a/src/server.h b/src/server.h index b0a47fa0f9..82d05128ea 100644 --- a/src/server.h +++ b/src/server.h @@ -103,7 +103,7 @@ class CHighPrecisionTimer : public QThread protected: virtual void run(); - bool bRun; + bool bRun; # if defined( __APPLE__ ) || defined( __MACOSX ) uint64_t Delay; diff --git a/src/util.cpp b/src/util.cpp index c56993f0dd..789cec8c7f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1030,14 +1030,8 @@ CInstPictures::EInstCategory CInstPictures::GetCategory ( const int iInstrument // Locale management class ----------------------------------------------------- #if QT_VERSION >= 0x060000 -QLocale::Country CLocale::LocaleQt5toQt6( const QLocale::Country eCountry ) -{ - return ( (QLocale::Country)slocaletab[(int)eCountry].Qt5toQt6 ); -}; -QLocale::Country CLocale::LocaleQt6toQt5( const QLocale::Country eCountry ) -{ - return ( (QLocale::Country)slocaletab[(int)eCountry].Qt6toQt5 ); -}; +QLocale::Country CLocale::LocaleQt5toQt6 ( const QLocale::Country eCountry ) { return ( (QLocale::Country) slocaletab[(int) eCountry].Qt5toQt6 ); }; +QLocale::Country CLocale::LocaleQt6toQt5 ( const QLocale::Country eCountry ) { return ( (QLocale::Country) slocaletab[(int) eCountry].Qt6toQt5 ); }; #endif QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country eCountry ) { @@ -1058,7 +1052,7 @@ QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country e // COMPATIBLE FOR OLD QT VERSIONS -> use a table: QString strISO3166 = ""; #if QT_VERSION >= 0x060000 - strISO3166 = QString(slocaletab[(int)eCountry].flagQt6 ); + strISO3166 = QString ( slocaletab[(int) eCountry].flagQt6 ); #else switch ( static_cast ( eCountry ) ) { diff --git a/src/util.h b/src/util.h index 79efe2a1ef..305553acdc 100644 --- a/src/util.h +++ b/src/util.h @@ -619,7 +619,7 @@ inline QString svrRegStatusToString ( ESvrRegStatus eSvrRegStatus ) } return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ); -// return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus ); + // return QString ( QCoreApplication::translate ( "CServerDlg", "Unknown value " ) ).append ( eSvrRegStatus ); } // Directory server registration outcome --------------------------------------- @@ -806,276 +806,53 @@ class CLocale static QPair FindSysLangTransFileName ( const QMap& TranslMap ); static void LoadTranslation ( const QString strLanguage, QCoreApplication* pApp ); #if QT_VERSION >= 0x060000 - static QLocale::Country LocaleQt5toQt6( const QLocale::Country eCountry ); - static QLocale::Country LocaleQt6toQt5( const QLocale::Country eCountry ); - struct slocalestruct { int Qt5toQt6; - int Qt6toQt5; - char flagQt6[3]; + static QLocale::Country LocaleQt5toQt6 ( const QLocale::Country eCountry ); + static QLocale::Country LocaleQt6toQt5 ( const QLocale::Country eCountry ); + struct slocalestruct + { + int Qt5toQt6; + int Qt6toQt5; + char flagQt6[3]; }; constexpr struct slocalestruct const static slocaletab[262] = { - { 0 , 0 ,"." }, - { 1 , 1 ,"af"}, - { 3 , 248 ,"ax"}, - { 4 , 2 ,"al"}, - { 5 , 3 ,"dz"}, - { 6 , 4 ,"." }, - { 7 , 5 ,"ad"}, - { 8 , 6 ,"ao"}, - { 9 , 7 ,"." }, - { 10 , 8 ,"." }, - { 11 , 9 ,"." }, - { 12 , 10 ,"ar"}, - { 13 , 11 ,"am"}, - { 15 , 12 ,"aw"}, - { 16 , 247 ,"." }, - { 17 , 13 ,"au"}, - { 18 , 14 ,"at"}, - { 19 , 15 ,"az"}, - { 20 , 16 ,"." }, - { 21 , 17 ,"bh"}, - { 22 , 18 ,"bd"}, - { 23 , 19 ,"." }, - { 24 , 20 ,"by"}, - { 25 , 21 ,"be"}, - { 26 , 22 ,"." }, - { 27 , 23 ,"bj"}, - { 28 , 24 ,"." }, - { 29 , 25 ,"bt"}, - { 30 , 26 ,"bo"}, - { 31 , 27 ,"ba"}, - { 32 , 28 ,"bw"}, - { 33 , 29 ,"." }, - { 35 , 30 ,"br"}, - { 36 , 31 ,"." }, - { 37 , 233 ,"." }, - { 38 , 32 ,"bn"}, - { 39 , 33 ,"bg"}, - { 40 , 34 ,"bf"}, - { 41 , 35 ,"bi"}, - { 43 , 36 ,"kh"}, - { 45 , 37 ,"cm"}, - { 46 , 38 ,"ca"}, - { 48 , 238 ,"." }, - { 49 , 39 ,"cv"}, - { 50 , 255 ,"." }, - { 51 , 40 ,"." }, - { 53 , 41 ,"cf"}, - { 54 , 250 ,"." }, - { 55 , 42 ,"td"}, - { 57 , 43 ,"cl"}, - { 56 , 44 ,"cn"}, - { 58 , 45 ,"." }, - { 59 , 241 ,"." }, - { 118 , 46 ,"." }, - { 60 , 47 ,"co"}, - { 61 , 48 ,"km"}, - { 63 , 50 ,"cd"}, - { 64 , 49 ,"cg"}, - { 65 , 51 ,"." }, - { 67 , 52 ,"cr"}, - { 68 , 54 ,"hr"}, - { 69 , 55 ,"cu"}, - { 232 , 152 ,"." }, - { 70 , 56 ,"cy"}, - { 71 , 57 ,"cz"}, - { 72 , 58 ,"dk"}, - { 73 , 249 ,"." }, - { 74 , 59 ,"dj"}, - { 75 , 60 ,"." }, - { 77 , 61 ,"do"}, - { 80 , 63 ,"ec"}, - { 81 , 64 ,"eg"}, - { 82 , 65 ,"sv"}, - { 83 , 66 ,"gq"}, - { 84 , 67 ,"er"}, - { 100 , 68 ,"ee"}, - { 85 , 204 ,"sz"}, - { 86 , 69 ,"et"}, - { 87 , 261 ,"." }, - { 88 , 258 ,"." }, - { 89 , 70 ,"." }, - { 90 , 71 ,"fo"}, - { 91 , 72 ,"." }, - { 92 , 73 ,"fi"}, - { 93 , 74 ,"fr"}, - { 94 , 76 ,"gf"}, - { 95 , 77 ,"pf"}, - { 96 , 78 ,"." }, - { 97 , 79 ,"ga"}, - { 98 , 80 ,"." }, - { 99 , 81 ,"ge"}, - { 102 , 82 ,"de"}, - { 101 , 83 ,"gh"}, - { 103 , 84 ,"." }, - { 104 , 85 ,"gr"}, - { 105 , 86 ,"gl"}, - { 106 , 87 ,"." }, - { 107 , 88 ,"gp"}, - { 108 , 89 ,"." }, - { 109 , 90 ,"gt"}, - { 110 , 75 ,"." }, - { 111 , 92 ,"gw"}, - { 112 , 91 ,"gn"}, - { 113 , 93 ,"gy"}, - { 114 , 94 ,"." }, - { 116 , 95 ,"." }, - { 117 , 96 ,"hn"}, - { 119 , 97 ,"hk"}, - { 120 , 98 ,"hu"}, - { 122 , 99 ,"is"}, - { 123 , 100 ,"in"}, - { 124 , 101 ,"id"}, - { 125 , 102 ,"ir"}, - { 174 , 103 ,"iq"}, - { 218 , 104 ,"ie"}, - { 127 , 251 ,"." }, - { 128 , 105 ,"il"}, - { 129 , 106 ,"it"}, - { 131 , 53 ,"ci"}, - { 132 , 107 ,"." }, - { 133 , 108 ,"jp"}, - { 134 , 252 ,"." }, - { 135 , 109 ,"jo"}, - { 136 , 110 ,"kz"}, - { 137 , 111 ,"ke"}, - { 138 , 112 ,"." }, - { 139 , 257 ,"." }, - { 140 , 115 ,"kw"}, - { 141 , 116 ,"kg"}, - { 142 , 117 ,"la"}, - { 143 , 246 ,"." }, - { 144 , 118 ,"lv"}, - { 145 , 119 ,"lb"}, - { 146 , 120 ,"ls"}, - { 147 , 121 ,"."}, - { 148 , 122 ,"ly"}, - { 149 , 123 ,"li"}, - { 150 , 124 ,"lt"}, - { 151 , 125 ,"lu"}, - { 152 , 126 ,"mo"}, - { 153 , 127 ,"mk"}, - { 154 , 128 ,"mg"}, - { 155 , 129 ,"."}, - { 156 , 130 ,"my"}, - { 158 , 131 ,"."}, - { 159 , 132 ,"ml"}, - { 160 , 133 ,"mt"}, - { 161 , 134 ,"."}, - { 162 , 135 ,"mq"}, - { 163 , 136 ,"mr"}, - { 164 , 137 ,"mu"}, - { 165 , 138 ,"yt"}, - { 62 , 139 ,"mx"}, - { 166 , 140 ,"."}, - { 167 , 141 ,"md"}, - { 168 , 142 ,"mc"}, - { 170 , 143 ,"mn"}, - { 169 , 242 ,"me"}, - { 171 , 144 ,"."}, - { 172 , 145 ,"ma"}, - { 173 , 146 ,"mz"}, - { 175 , 147 ,"mm"}, - { 176 , 148 ,"na"}, - { 178 , 149 ,"."}, - { 179 , 150 ,"np"}, - { 180 , 151 ,"nl"}, - { 181 , 153 ,"nc"}, - { 182 , 154 ,"nz"}, - { 183 , 155 ,"ni"}, - { 184 , 157 ,"ng"}, - { 185 , 156 ,"ne"}, - { 186 , 158 ,"."}, - { 187 , 159 ,"."}, - { 188 , 160 ,"."}, - { 189 , 113 ,"kp"}, - { 190 , 161 ,"no"}, - { 191 , 162 ,"om"}, - { 192 , 259 ,"."}, - { 193 , 163 ,"pk"}, - { 194 , 164 ,"."}, - { 197 , 165 ,"ps"}, - { 198 , 166 ,"pa"}, - { 201 , 167 ,"pg"}, - { 202 , 168 ,"py"}, - { 203 , 169 ,"pe"}, - { 204 , 170 ,"ph"}, - { 205 , 171 ,"."}, - { 206 , 172 ,"pl"}, - { 208 , 173 ,"pt"}, - { 209 , 174 ,"pr"}, - { 210 , 175 ,"qa"}, - { 212 , 176 ,"re"}, - { 213 , 177 ,"ro"}, - { 214 , 178 ,"ru"}, - { 215 , 179 ,"rw"}, - { 216 , 244 ,"."}, - { 217 , 199 ,"."}, - { 220 , 180 ,"."}, - { 221 , 181 ,"."}, - { 196 , 245 ,"."}, - { 200 , 200 ,"."}, - { 222 , 182 ,"."}, - { 223 , 183 ,"."}, - { 224 , 184 ,"sm"}, - { 76 , 185 ,"st"}, - { 225 , 186 ,"sa"}, - { 226 , 187 ,"sn"}, - { 227 , 243 ,"rs"}, - { 228 , 188 ,"sc"}, - { 229 , 189 ,"sl"}, - { 230 , 190 ,"sg"}, - { 231 , 256 ,"."}, - { 233 , 191 ,"sk"}, - { 234 , 192 ,"si"}, - { 235 , 193 ,"."}, - { 236 , 194 ,"so"}, - { 238 , 195 ,"za"}, - { 239 , 196 ,"."}, - { 240 , 114 ,"kr"}, - { 241 , 254 ,"."}, - { 242 , 197 ,"es"}, - { 243 , 198 ,"lk"}, - { 244 , 201 ,"sd"}, - { 245 , 202 ,"sr"}, - { 246 , 203 ,"."}, - { 248 , 205 ,"se"}, - { 247 , 206 ,"ch"}, - { 250 , 207 ,"sy"}, - { 251 , 208 ,"tw"}, - { 252 , 209 ,"tj"}, - { 253 , 210 ,"tz"}, - { 254 , 211 ,"th"}, - { 255 , 62 ,"tl"}, - { 34 , 212 ,"tg"}, - { 249 , 213 ,"."}, - { 256 , 214 ,"to"}, - { 257 , 215 ,"."}, - { 259 , 253 ,"."}, - { 42 , 216 ,"tn"}, - { 260 , 217 ,"tr"}, - { 261 , 218 ,"."}, - { 52 , 219 ,"."}, - { 157 , 220 ,"."}, - { 207 , 221 ,"ug"}, - { 195 , 222 ,"ua"}, - { 199 , 223 ,"ae"}, - { 130 , 224 ,"gb"}, - { 14 , 226 ,"."}, - { 2 , 225 ,"us"}, - { 66 , 234 ,"."}, - { 47 , 227 ,"uy"}, - { 115 , 228 ,"uz"}, - { 121 , 229 ,"."}, - { 237 , 230 ,"."}, - { 219 , 231 ,"ve"}, - { 44 , 232 ,"vn"}, - { 211 , 235 ,"."}, - { 126 , 236 ,"eh"}, - { 79 , 260 ,"."}, - { 177 , 237 ,"ye"}, - { 258 , 239 ,"zm"}, - { 78 , 240 ,"."} - }; + { 0, 0, "." }, { 1, 1, "af" }, { 3, 248, "ax" }, { 4, 2, "al" }, { 5, 3, "dz" }, { 6, 4, "." }, { 7, 5, "ad" }, + { 8, 6, "ao" }, { 9, 7, "." }, { 10, 8, "." }, { 11, 9, "." }, { 12, 10, "ar" }, { 13, 11, "am" }, { 15, 12, "aw" }, + { 16, 247, "." }, { 17, 13, "au" }, { 18, 14, "at" }, { 19, 15, "az" }, { 20, 16, "." }, { 21, 17, "bh" }, { 22, 18, "bd" }, + { 23, 19, "." }, { 24, 20, "by" }, { 25, 21, "be" }, { 26, 22, "." }, { 27, 23, "bj" }, { 28, 24, "." }, { 29, 25, "bt" }, + { 30, 26, "bo" }, { 31, 27, "ba" }, { 32, 28, "bw" }, { 33, 29, "." }, { 35, 30, "br" }, { 36, 31, "." }, { 37, 233, "." }, + { 38, 32, "bn" }, { 39, 33, "bg" }, { 40, 34, "bf" }, { 41, 35, "bi" }, { 43, 36, "kh" }, { 45, 37, "cm" }, { 46, 38, "ca" }, + { 48, 238, "." }, { 49, 39, "cv" }, { 50, 255, "." }, { 51, 40, "." }, { 53, 41, "cf" }, { 54, 250, "." }, { 55, 42, "td" }, + { 57, 43, "cl" }, { 56, 44, "cn" }, { 58, 45, "." }, { 59, 241, "." }, { 118, 46, "." }, { 60, 47, "co" }, { 61, 48, "km" }, + { 63, 50, "cd" }, { 64, 49, "cg" }, { 65, 51, "." }, { 67, 52, "cr" }, { 68, 54, "hr" }, { 69, 55, "cu" }, { 232, 152, "." }, + { 70, 56, "cy" }, { 71, 57, "cz" }, { 72, 58, "dk" }, { 73, 249, "." }, { 74, 59, "dj" }, { 75, 60, "." }, { 77, 61, "do" }, + { 80, 63, "ec" }, { 81, 64, "eg" }, { 82, 65, "sv" }, { 83, 66, "gq" }, { 84, 67, "er" }, { 100, 68, "ee" }, { 85, 204, "sz" }, + { 86, 69, "et" }, { 87, 261, "." }, { 88, 258, "." }, { 89, 70, "." }, { 90, 71, "fo" }, { 91, 72, "." }, { 92, 73, "fi" }, + { 93, 74, "fr" }, { 94, 76, "gf" }, { 95, 77, "pf" }, { 96, 78, "." }, { 97, 79, "ga" }, { 98, 80, "." }, { 99, 81, "ge" }, + { 102, 82, "de" }, { 101, 83, "gh" }, { 103, 84, "." }, { 104, 85, "gr" }, { 105, 86, "gl" }, { 106, 87, "." }, { 107, 88, "gp" }, + { 108, 89, "." }, { 109, 90, "gt" }, { 110, 75, "." }, { 111, 92, "gw" }, { 112, 91, "gn" }, { 113, 93, "gy" }, { 114, 94, "." }, + { 116, 95, "." }, { 117, 96, "hn" }, { 119, 97, "hk" }, { 120, 98, "hu" }, { 122, 99, "is" }, { 123, 100, "in" }, { 124, 101, "id" }, + { 125, 102, "ir" }, { 174, 103, "iq" }, { 218, 104, "ie" }, { 127, 251, "." }, { 128, 105, "il" }, { 129, 106, "it" }, { 131, 53, "ci" }, + { 132, 107, "." }, { 133, 108, "jp" }, { 134, 252, "." }, { 135, 109, "jo" }, { 136, 110, "kz" }, { 137, 111, "ke" }, { 138, 112, "." }, + { 139, 257, "." }, { 140, 115, "kw" }, { 141, 116, "kg" }, { 142, 117, "la" }, { 143, 246, "." }, { 144, 118, "lv" }, { 145, 119, "lb" }, + { 146, 120, "ls" }, { 147, 121, "." }, { 148, 122, "ly" }, { 149, 123, "li" }, { 150, 124, "lt" }, { 151, 125, "lu" }, { 152, 126, "mo" }, + { 153, 127, "mk" }, { 154, 128, "mg" }, { 155, 129, "." }, { 156, 130, "my" }, { 158, 131, "." }, { 159, 132, "ml" }, { 160, 133, "mt" }, + { 161, 134, "." }, { 162, 135, "mq" }, { 163, 136, "mr" }, { 164, 137, "mu" }, { 165, 138, "yt" }, { 62, 139, "mx" }, { 166, 140, "." }, + { 167, 141, "md" }, { 168, 142, "mc" }, { 170, 143, "mn" }, { 169, 242, "me" }, { 171, 144, "." }, { 172, 145, "ma" }, { 173, 146, "mz" }, + { 175, 147, "mm" }, { 176, 148, "na" }, { 178, 149, "." }, { 179, 150, "np" }, { 180, 151, "nl" }, { 181, 153, "nc" }, { 182, 154, "nz" }, + { 183, 155, "ni" }, { 184, 157, "ng" }, { 185, 156, "ne" }, { 186, 158, "." }, { 187, 159, "." }, { 188, 160, "." }, { 189, 113, "kp" }, + { 190, 161, "no" }, { 191, 162, "om" }, { 192, 259, "." }, { 193, 163, "pk" }, { 194, 164, "." }, { 197, 165, "ps" }, { 198, 166, "pa" }, + { 201, 167, "pg" }, { 202, 168, "py" }, { 203, 169, "pe" }, { 204, 170, "ph" }, { 205, 171, "." }, { 206, 172, "pl" }, { 208, 173, "pt" }, + { 209, 174, "pr" }, { 210, 175, "qa" }, { 212, 176, "re" }, { 213, 177, "ro" }, { 214, 178, "ru" }, { 215, 179, "rw" }, { 216, 244, "." }, + { 217, 199, "." }, { 220, 180, "." }, { 221, 181, "." }, { 196, 245, "." }, { 200, 200, "." }, { 222, 182, "." }, { 223, 183, "." }, + { 224, 184, "sm" }, { 76, 185, "st" }, { 225, 186, "sa" }, { 226, 187, "sn" }, { 227, 243, "rs" }, { 228, 188, "sc" }, { 229, 189, "sl" }, + { 230, 190, "sg" }, { 231, 256, "." }, { 233, 191, "sk" }, { 234, 192, "si" }, { 235, 193, "." }, { 236, 194, "so" }, { 238, 195, "za" }, + { 239, 196, "." }, { 240, 114, "kr" }, { 241, 254, "." }, { 242, 197, "es" }, { 243, 198, "lk" }, { 244, 201, "sd" }, { 245, 202, "sr" }, + { 246, 203, "." }, { 248, 205, "se" }, { 247, 206, "ch" }, { 250, 207, "sy" }, { 251, 208, "tw" }, { 252, 209, "tj" }, { 253, 210, "tz" }, + { 254, 211, "th" }, { 255, 62, "tl" }, { 34, 212, "tg" }, { 249, 213, "." }, { 256, 214, "to" }, { 257, 215, "." }, { 259, 253, "." }, + { 42, 216, "tn" }, { 260, 217, "tr" }, { 261, 218, "." }, { 52, 219, "." }, { 157, 220, "." }, { 207, 221, "ug" }, { 195, 222, "ua" }, + { 199, 223, "ae" }, { 130, 224, "gb" }, { 14, 226, "." }, { 2, 225, "us" }, { 66, 234, "." }, { 47, 227, "uy" }, { 115, 228, "uz" }, + { 121, 229, "." }, { 237, 230, "." }, { 219, 231, "ve" }, { 44, 232, "vn" }, { 211, 235, "." }, { 126, 236, "eh" }, { 79, 260, "." }, + { 177, 237, "ye" }, { 258, 239, "zm" }, { 78, 240, "." } }; #endif }; From 79e4c91dcf144ef5091e4bb98955be6a2d178062 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 17:59:07 +0200 Subject: [PATCH 05/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 74 ++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 6131504d9c..bbe10947f4 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -92,26 +92,26 @@ jobs: fail-fast: false matrix: # Think of this like a foreach loop. Basically runs the steps with every combination of the contents of this. More info: https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix config: - - config_name: AndroidAPK (artifact+codeQL) - target_os: android - building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions - cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" - cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" - uses_codeql: true - - - config_name: Linux (artifacts+codeQL) - target_os: linux - building_on_os: ubuntu-18.04 - cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions - cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" - cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" - uses_codeql: true +# - config_name: AndroidAPK (artifact+codeQL) +# target_os: android +# building_on_os: ubuntu-20.04 +# cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions +# cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" +# cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" +# uses_codeql: true +# +# - config_name: Linux (artifacts+codeQL) +# target_os: linux +# building_on_os: ubuntu-18.04 +# cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions +# cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" +# cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" +# uses_codeql: true - config_name: MacOS (codeQL) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 5.15.2" + cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 6.1.0" cmd2_build: "./autobuild/mac/codeQL/autobuild_mac_2_build.sh" cmd3_postbuild: false uses_codeql: true @@ -119,37 +119,37 @@ jobs: - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.2" + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 6.1.0" cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false - - config_name: MacOS Legacy (artifacts) - target_os: macos - building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" - cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" - cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" - uses_codeql: false - - - config_name: Windows (artifact+codeQL) - target_os: windows - building_on_os: windows-latest - cmd1_prebuild: powershell .\autobuild\windows\autobuild_windowsinstaller_1_prepare.ps1 - cmd2_build: powershell .\autobuild\windows\autobuild_windowsinstaller_2_build.ps1 - cmd3_postbuild: powershell .\autobuild\windows\autobuild_windowsinstaller_3_copy_files.ps1 - uses_codeql: true +# - config_name: MacOS Legacy (artifacts) +# target_os: macos +# building_on_os: macos-10.15 +# cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" +# cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" +# cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" +# uses_codeql: false + +# - config_name: Windows (artifact+codeQL) +# target_os: windows +# building_on_os: windows-latest +# cmd1_prebuild: powershell .\autobuild\windows\autobuild_windowsinstaller_1_prepare.ps1 +# cmd2_build: powershell .\autobuild\windows\autobuild_windowsinstaller_2_build.ps1 +# cmd3_postbuild: powershell .\autobuild\windows\autobuild_windowsinstaller_3_copy_files.ps1 +# uses_codeql: true runs-on: ${{ matrix.config.building_on_os }} steps: # For Qt5 on Mac, we need to ensure SDK 10.15 is used, and not SDK 11.x # This is done by selecting Xcode 11.7 instead of the latest default of 12.x - - name: Select Xcode version for Mac - if: ${{ matrix.config.target_os == 'macos' }} - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '11.7' +# - name: Select Xcode version for Mac +# if: ${{ matrix.config.target_os == 'macos' }} +# uses: maxim-lobanov/setup-xcode@v1 +# with: +# xcode-version: '11.7' # Checkout code - name: Checkout code From c8324d99ddf7b2ceaca0b4ee9fe8b522ec494c7a Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 18:35:11 +0200 Subject: [PATCH 06/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index bbe10947f4..85ea9361b9 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -111,7 +111,7 @@ jobs: - config_name: MacOS (codeQL) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 6.1.0" + cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 5.15.4" cmd2_build: "./autobuild/mac/codeQL/autobuild_mac_2_build.sh" cmd3_postbuild: false uses_codeql: true @@ -119,7 +119,7 @@ jobs: - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 6.1.0" + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.4" cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false @@ -145,11 +145,11 @@ jobs: # For Qt5 on Mac, we need to ensure SDK 10.15 is used, and not SDK 11.x # This is done by selecting Xcode 11.7 instead of the latest default of 12.x -# - name: Select Xcode version for Mac -# if: ${{ matrix.config.target_os == 'macos' }} -# uses: maxim-lobanov/setup-xcode@v1 -# with: -# xcode-version: '11.7' + - name: Select Xcode version for Mac + if: ${{ matrix.config.target_os == 'macos' }} + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '11.7' # Checkout code - name: Checkout code From 67f9b8725472aea20725bec358390e75f5a2c351 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 18:42:19 +0200 Subject: [PATCH 07/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 85ea9361b9..5523a3f9cb 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -92,21 +92,21 @@ jobs: fail-fast: false matrix: # Think of this like a foreach loop. Basically runs the steps with every combination of the contents of this. More info: https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix config: -# - config_name: AndroidAPK (artifact+codeQL) -# target_os: android -# building_on_os: ubuntu-20.04 -# cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions -# cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" -# cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" -# uses_codeql: true -# -# - config_name: Linux (artifacts+codeQL) -# target_os: linux -# building_on_os: ubuntu-18.04 -# cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions -# cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" -# cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" -# uses_codeql: true + - config_name: AndroidAPK (artifact+codeQL) + target_os: android + building_on_os: ubuntu-20.04 + cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions + cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" + cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" + uses_codeql: true + + - config_name: Linux (artifacts+codeQL) + target_os: linux + building_on_os: ubuntu-18.04 + cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions + cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" + cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" + uses_codeql: true - config_name: MacOS (codeQL) target_os: macos @@ -124,21 +124,21 @@ jobs: cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false -# - config_name: MacOS Legacy (artifacts) -# target_os: macos -# building_on_os: macos-10.15 -# cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" -# cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" -# cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" -# uses_codeql: false - -# - config_name: Windows (artifact+codeQL) -# target_os: windows -# building_on_os: windows-latest -# cmd1_prebuild: powershell .\autobuild\windows\autobuild_windowsinstaller_1_prepare.ps1 -# cmd2_build: powershell .\autobuild\windows\autobuild_windowsinstaller_2_build.ps1 -# cmd3_postbuild: powershell .\autobuild\windows\autobuild_windowsinstaller_3_copy_files.ps1 -# uses_codeql: true + - config_name: MacOS Legacy (artifacts) + target_os: macos + building_on_os: macos-10.15 + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" + cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" + cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" + uses_codeql: false + + - config_name: Windows (artifact+codeQL) + target_os: windows + building_on_os: windows-latest + cmd1_prebuild: powershell .\autobuild\windows\autobuild_windowsinstaller_1_prepare.ps1 + cmd2_build: powershell .\autobuild\windows\autobuild_windowsinstaller_2_build.ps1 + cmd3_postbuild: powershell .\autobuild\windows\autobuild_windowsinstaller_3_copy_files.ps1 + uses_codeql: true runs-on: ${{ matrix.config.building_on_os }} steps: From 3c641ab068261e3083c217937e4c3eda590eea80 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 18:53:09 +0200 Subject: [PATCH 08/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 5523a3f9cb..6131504d9c 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -111,7 +111,7 @@ jobs: - config_name: MacOS (codeQL) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 5.15.4" + cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 5.15.2" cmd2_build: "./autobuild/mac/codeQL/autobuild_mac_2_build.sh" cmd3_postbuild: false uses_codeql: true @@ -119,7 +119,7 @@ jobs: - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.4" + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.2" cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false From 9dc90ef6c54809f5e9bc43a444af47a45e24ce59 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:38:28 +0200 Subject: [PATCH 09/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 6131504d9c..6aaab8e9e3 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -102,7 +102,7 @@ jobs: - config_name: Linux (artifacts+codeQL) target_os: linux - building_on_os: ubuntu-18.04 + building_on_os: ubuntu-20.04 cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" @@ -111,7 +111,7 @@ jobs: - config_name: MacOS (codeQL) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 5.15.2" + cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh 6.1.0" cmd2_build: "./autobuild/mac/codeQL/autobuild_mac_2_build.sh" cmd3_postbuild: false uses_codeql: true @@ -119,7 +119,7 @@ jobs: - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.2" + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 6.1.0" cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false From 7f407364cf6b845fe8ba167ef3f1c71e8ea102aa Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:55:33 +0200 Subject: [PATCH 10/21] Update autobuild_windowsinstaller_1_prepare.ps1 --- autobuild/windows/autobuild_windowsinstaller_1_prepare.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild/windows/autobuild_windowsinstaller_1_prepare.ps1 b/autobuild/windows/autobuild_windowsinstaller_1_prepare.ps1 index ab1d643241..f8465f9fe4 100644 --- a/autobuild/windows/autobuild_windowsinstaller_1_prepare.ps1 +++ b/autobuild/windows/autobuild_windowsinstaller_1_prepare.ps1 @@ -12,8 +12,8 @@ echo "Install Qt..." pip install aqtinstall echo "Get Qt 64 bit..." # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below -aqt install --outputdir C:\Qt 5.15.2 windows desktop win64_msvc2019_64 +aqt install --outputdir C:\Qt 6.1.0 windows desktop win64_msvc2019_64 echo "Get Qt 32 bit..." # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below -aqt install --outputdir C:\Qt 5.15.2 windows desktop win32_msvc2019 +aqt install --outputdir C:\Qt 6.1.0 windows desktop win32_msvc2019 From 920568b42216900d644ceef35a91fa29f02cd901 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:56:19 +0200 Subject: [PATCH 11/21] Update autobuild_windowsinstaller_2_build.ps1 --- autobuild/windows/autobuild_windowsinstaller_2_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild/windows/autobuild_windowsinstaller_2_build.ps1 b/autobuild/windows/autobuild_windowsinstaller_2_build.ps1 index b78cfcd610..7744b3852f 100644 --- a/autobuild/windows/autobuild_windowsinstaller_2_build.ps1 +++ b/autobuild/windows/autobuild_windowsinstaller_2_build.ps1 @@ -27,4 +27,4 @@ if (("$jamulus_project_path" -eq $null) -or ("$jamulus_project_path" -eq "")) { echo "Build installer..." # Build the installer -powershell "$jamulus_project_path\windows\deploy_windows.ps1" "C:\Qt\5.15.2" +powershell "$jamulus_project_path\windows\deploy_windows.ps1" "C:\Qt\6.1.0" From 6475c1a19b767019ebc7f195ed0db54c94a2a785 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Sun, 6 Jun 2021 20:22:13 +0200 Subject: [PATCH 12/21] Update autobuild_deb_1_prepare.sh --- autobuild/linux/autobuild_deb_1_prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild/linux/autobuild_deb_1_prepare.sh b/autobuild/linux/autobuild_deb_1_prepare.sh index ab215813b8..6d4691e276 100755 --- a/autobuild/linux/autobuild_deb_1_prepare.sh +++ b/autobuild/linux/autobuild_deb_1_prepare.sh @@ -13,4 +13,4 @@ echo "Update system..." sudo apt-get -qq update echo "Install dependencies..." -sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qtbase5-dev qttools5-dev-tools +sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qtbase6-dev qttools6-dev-tools From 10a231a9594d02f16e0d1bc56076bfeedbebf2ee Mon Sep 17 00:00:00 2001 From: DonC Date: Sun, 6 Jun 2021 21:12:10 +0200 Subject: [PATCH 13/21] pragma for MS compiler --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f31197ca34..47cf062188 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,6 +21,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * \******************************************************************************/ +#ifdef _MSC_VER +# pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +#endif #include #include From 6de4a86d3d07ae4afa5273737f3124361860ba02 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Mon, 7 Jun 2021 00:02:09 +0200 Subject: [PATCH 14/21] Update autobuild_deb_1_prepare.sh --- autobuild/linux/autobuild_deb_1_prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild/linux/autobuild_deb_1_prepare.sh b/autobuild/linux/autobuild_deb_1_prepare.sh index 6d4691e276..da1c8c2f54 100755 --- a/autobuild/linux/autobuild_deb_1_prepare.sh +++ b/autobuild/linux/autobuild_deb_1_prepare.sh @@ -13,4 +13,4 @@ echo "Update system..." sudo apt-get -qq update echo "Install dependencies..." -sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qtbase6-dev qttools6-dev-tools +sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qt6-qtbase-dev qt6-qttools-dev-tools From 186a576b72038d1999b1535fba81776b6ca236be Mon Sep 17 00:00:00 2001 From: DonC Date: Mon, 7 Jun 2021 09:35:03 +0200 Subject: [PATCH 15/21] Removed macextras from Jamulus.pro --- Jamulus.pro | 2 +- autobuild/linux/autobuild_deb_1_prepare.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 04ea0f4c2f..2b8939e4c0 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -122,7 +122,7 @@ win32 { RC_FILE = mac/mainicon.icns } - QT += macextras + #QT += macextras HEADERS += mac/sound.h SOURCES += mac/sound.cpp HEADERS += mac/activity.h diff --git a/autobuild/linux/autobuild_deb_1_prepare.sh b/autobuild/linux/autobuild_deb_1_prepare.sh index da1c8c2f54..ab215813b8 100755 --- a/autobuild/linux/autobuild_deb_1_prepare.sh +++ b/autobuild/linux/autobuild_deb_1_prepare.sh @@ -13,4 +13,4 @@ echo "Update system..." sudo apt-get -qq update echo "Install dependencies..." -sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qt6-qtbase-dev qt6-qttools-dev-tools +sudo apt-get -qq -y install devscripts build-essential debhelper libjack-jackd2-dev qtbase5-dev qttools5-dev-tools From 5790b93cf0c51a10070ea5b29a9fdf4dc1bf8f04 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Mon, 7 Jun 2021 10:43:35 +0200 Subject: [PATCH 16/21] Update autobuild.yml --- .github/workflows/autobuild.yml | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 6aaab8e9e3..a1aac5a97f 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -92,21 +92,21 @@ jobs: fail-fast: false matrix: # Think of this like a foreach loop. Basically runs the steps with every combination of the contents of this. More info: https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix config: - - config_name: AndroidAPK (artifact+codeQL) - target_os: android - building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions - cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" - cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" - uses_codeql: true - - - config_name: Linux (artifacts+codeQL) - target_os: linux - building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions - cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" - cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" - uses_codeql: true + # - config_name: AndroidAPK (artifact+codeQL) + # target_os: android + # building_on_os: ubuntu-20.04 + # cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh" # this step needs sh instead of bash for permissions + # cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh" + # cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh" + # uses_codeql: true +# +# - config_name: Linux (artifacts+codeQL) +# target_os: linux +# building_on_os: ubuntu-20.04 +# cmd1_prebuild: "sh ./autobuild/linux/autobuild_deb_1_prepare.sh" # this step needs sh instead of bash for permissions +# cmd2_build: "./autobuild/linux/autobuild_deb_2_build.sh" +# cmd3_postbuild: "./autobuild/linux/autobuild_deb_3_copy_files.sh" +# uses_codeql: true - config_name: MacOS (codeQL) target_os: macos @@ -124,13 +124,13 @@ jobs: cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false - - config_name: MacOS Legacy (artifacts) - target_os: macos - building_on_os: macos-10.15 - cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" - cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" - cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" - uses_codeql: false +# - config_name: MacOS Legacy (artifacts) +# target_os: macos +# building_on_os: macos-10.15 +# cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.9.9" +# cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" +# cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh legacy" +# uses_codeql: false - config_name: Windows (artifact+codeQL) target_os: windows @@ -145,11 +145,11 @@ jobs: # For Qt5 on Mac, we need to ensure SDK 10.15 is used, and not SDK 11.x # This is done by selecting Xcode 11.7 instead of the latest default of 12.x - - name: Select Xcode version for Mac - if: ${{ matrix.config.target_os == 'macos' }} - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '11.7' + # - name: Select Xcode version for Mac + # if: ${{ matrix.config.target_os == 'macos' }} + # uses: maxim-lobanov/setup-xcode@v1 + # with: + # xcode-version: '11.7' # Checkout code - name: Checkout code From 28d9cb68b2ad617213457afc029cc599bf1371e7 Mon Sep 17 00:00:00 2001 From: DonC Date: Mon, 7 Jun 2021 11:41:34 +0200 Subject: [PATCH 17/21] Removed include for Qt version >= 6.0.0 --- src/clientdlg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clientdlg.h b/src/clientdlg.h index 4d2ce7e182..27d1e546a2 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -53,7 +53,9 @@ #include "ui_clientdlgbase.h" #if defined( __APPLE__ ) || defined( __MACOSX ) # if QT_VERSION >= QT_VERSION_CHECK( 5, 2, 0 ) -# include +# if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) +# include +# endif # endif #endif From f99336309bd5b38a4f642ab514cff185c74603c2 Mon Sep 17 00:00:00 2001 From: DonC Date: Mon, 7 Jun 2021 11:58:31 +0200 Subject: [PATCH 18/21] Replaced QtMac::setBadgeLabelText with NSApp.dockTile.badgeLabel --- src/clientdlg.cpp | 4 ++-- src/clientdlg.h | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 893e027325..7e3ce30144 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -917,12 +917,12 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients ) if ( iNumClients > 1 ) { // show the number of connected clients - QtMac::setBadgeLabelText ( QString ( "%1" ).arg ( iNumClients ) ); + NSApp.dockTile.badgeLabel ( QString ( "%1" ).arg ( iNumClients ) ); } else { // clear the text (apply an empty string) - QtMac::setBadgeLabelText ( "" ); + NSApp.dockTile.badgeLabel ( "" ); } # endif #endif diff --git a/src/clientdlg.h b/src/clientdlg.h index 27d1e546a2..246b66b8c0 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -51,13 +51,6 @@ #include "connectdlg.h" #include "analyzerconsole.h" #include "ui_clientdlgbase.h" -#if defined( __APPLE__ ) || defined( __MACOSX ) -# if QT_VERSION >= QT_VERSION_CHECK( 5, 2, 0 ) -# if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) -# include -# endif -# endif -#endif /* Definitions ****************************************************************/ // update time for GUI controls From 3bb96e42220bf538d4873115367858d810465c1d Mon Sep 17 00:00:00 2001 From: DonC Date: Mon, 7 Jun 2021 12:11:30 +0200 Subject: [PATCH 19/21] Commented out Mac BadgeLabel in clientdlg --- src/clientdlg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 7e3ce30144..37ae6d28ee 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -908,7 +908,7 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients ) } setWindowTitle ( strWinTitle ); - +/*** #if defined( Q_OS_MACX ) // for MacOS only we show the number of connected clients as a // badge label text if more than one user is connected @@ -926,6 +926,7 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients ) } # endif #endif +***/ } void CClientDlg::ShowConnectionSetupDialog() From 5e654cbaf60d993de37ecd5b9ad742ab455acd56 Mon Sep 17 00:00:00 2001 From: DonC Date: Mon, 7 Jun 2021 18:35:54 +0200 Subject: [PATCH 20/21] Added win64 --- Jamulus.pro | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Jamulus.pro b/Jamulus.pro index 2b8939e4c0..ff291d4771 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -91,6 +91,51 @@ win32 { ws2_32.lib } + # replace ASIO with jack if requested + contains(CONFIG, "jackonwindows") { + message(Using Jack instead of ASIO.) + + !exists("C:/Program Files (x86)/Jack/includes/jack/jack.h") { + message(Warning: jack.h was not found at the usual place, maybe jack is not installed) + } + + HEADERS -= windows/sound.h + SOURCES -= windows/sound.cpp + HEADERS += linux/sound.h + SOURCES += linux/sound.cpp + DEFINES += WITH_JACK + DEFINES += JACK_REPLACES_ASIO + DEFINES += _STDINT_H # supposed to solve compilation error in systemdeps.h + INCLUDEPATH += "C:/Program Files (x86)/Jack/includes" + LIBS += "C:/Program Files (x86)/Jack/lib/libjack64.lib" + } +} else:win64 { + DEFINES -= UNICODE # fixes issue with ASIO SDK (asiolist.cpp is not unicode compatible) + DEFINES += NOMINMAX # solves a compiler error in qdatetime.h (Qt5) + HEADERS += windows/sound.h + SOURCES += windows/sound.cpp \ + windows/ASIOSDK2/common/asio.cpp \ + windows/ASIOSDK2/host/asiodrivers.cpp \ + windows/ASIOSDK2/host/pc/asiolist.cpp + RC_FILE = windows/mainicon.rc + INCLUDEPATH += windows/ASIOSDK2/common \ + windows/ASIOSDK2/host \ + windows/ASIOSDK2/host/pc + mingw* { + LIBS += -lole64 \ + -luser64 \ + -ladvapi64 \ + -lwinmm \ + -lws2_64 + } else { + QMAKE_LFLAGS += /DYNAMICBASE:NO # fixes crash with libjack64.dll, see https://github.com/jamulussoftware/jamulus/issues/93 + LIBS += ole64.lib \ + user64.lib \ + advapi64.lib \ + winmm.lib \ + ws2_64.lib + } + # replace ASIO with jack if requested contains(CONFIG, "jackonwindows") { message(Using Jack instead of ASIO.) From 8e6389b63e58d5d020bf51c90e99fe9135237547 Mon Sep 17 00:00:00 2001 From: DonC <64357360+dcorson-ticino-com@users.noreply.github.com> Date: Tue, 7 Sep 2021 20:59:22 +0200 Subject: [PATCH 21/21] Changes that clang-format required --- src/clientdlg.cpp | 38 +++++++++++++++++++------------------- src/main.cpp | 4 ++-- src/server.h | 2 +- src/serverlist.cpp | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 37ae6d28ee..5a67d31021 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -908,25 +908,25 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients ) } setWindowTitle ( strWinTitle ); -/*** -#if defined( Q_OS_MACX ) - // for MacOS only we show the number of connected clients as a - // badge label text if more than one user is connected - // (only available in Qt5.2) -# if QT_VERSION >= QT_VERSION_CHECK( 5, 2, 0 ) - if ( iNumClients > 1 ) - { - // show the number of connected clients - NSApp.dockTile.badgeLabel ( QString ( "%1" ).arg ( iNumClients ) ); - } - else - { - // clear the text (apply an empty string) - NSApp.dockTile.badgeLabel ( "" ); - } -# endif -#endif -***/ + /*** + #if defined( Q_OS_MACX ) + // for MacOS only we show the number of connected clients as a + // badge label text if more than one user is connected + // (only available in Qt5.2) + # if QT_VERSION >= QT_VERSION_CHECK( 5, 2, 0 ) + if ( iNumClients > 1 ) + { + // show the number of connected clients + NSApp.dockTile.badgeLabel ( QString ( "%1" ).arg ( iNumClients ) ); + } + else + { + // clear the text (apply an empty string) + NSApp.dockTile.badgeLabel ( "" ); + } + # endif + #endif + ***/ } void CClientDlg::ShowConnectionSetupDialog() diff --git a/src/main.cpp b/src/main.cpp index 47cf062188..6324bfb40d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,7 +22,7 @@ * \******************************************************************************/ #ifdef _MSC_VER -# pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +# pragma comment( linker, "/subsystem:windows /ENTRY:mainCRTStartup" ) #endif #include @@ -541,7 +541,7 @@ int main ( int argc, char** argv ) QCoreApplication* pApp = new QCoreApplication ( argc, argv ); #else # if defined( Q_OS_IOS ) - bUseGUI = true; + bUseGUI = true; // bUseMultithreading = true; QApplication* pApp = new QApplication ( argc, argv ); diff --git a/src/server.h b/src/server.h index 82d05128ea..b0a47fa0f9 100644 --- a/src/server.h +++ b/src/server.h @@ -103,7 +103,7 @@ class CHighPrecisionTimer : public QThread protected: virtual void run(); - bool bRun; + bool bRun; # if defined( __APPLE__ ) || defined( __MACOSX ) uint64_t Delay; diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 097ebcd9b6..ae9e825953 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -33,7 +33,7 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum, const int iNumChannels, CProtocol* pNConLProt ) : eCentralServerAddressType ( AT_CUSTOM ), // must be AT_CUSTOM for the "no GUI" case - strMinServerVersion ( "" ), // disable version check with empty version + strMinServerVersion ( "" ), // disable version check with empty version pConnLessProtocol ( pNConLProt ), eSvrRegStatus ( ESvrRegStatus::SRS_UNREGISTERED ), iSvrRegRetries ( 0 )