introduce macro ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING for enabling the version and OS query in the client (for debugging reasons)
This commit is contained in:
parent
5cfdf988d4
commit
17b5bb6dd9
7 changed files with 22 additions and 11 deletions
|
@ -199,9 +199,11 @@ QObject::connect ( &Channel, SIGNAL ( OpusSupported() ),
|
||||||
SIGNAL ( CLPingWithNumClientsReceived ( CHostAddress, int, int ) ),
|
SIGNAL ( CLPingWithNumClientsReceived ( CHostAddress, int, int ) ),
|
||||||
this, SLOT ( OnCLPingWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
this, SLOT ( OnCLPingWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol,
|
||||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
||||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
||||||
|
#endif
|
||||||
|
|
||||||
// other
|
// other
|
||||||
QObject::connect ( &Sound, SIGNAL ( ReinitRequest ( int ) ),
|
QObject::connect ( &Sound, SIGNAL ( ReinitRequest ( int ) ),
|
||||||
|
|
|
@ -416,9 +416,11 @@ signals:
|
||||||
int iPingTime,
|
int iPingTime,
|
||||||
int iNumClients );
|
int iNumClients );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
void CLVersionAndOSReceived ( CHostAddress InetAddr,
|
void CLVersionAndOSReceived ( CHostAddress InetAddr,
|
||||||
COSUtil::EOpSystemType eOSType,
|
COSUtil::EOpSystemType eOSType,
|
||||||
QString strVersion );
|
QString strVersion );
|
||||||
|
#endif
|
||||||
|
|
||||||
void Disconnected();
|
void Disconnected();
|
||||||
|
|
||||||
|
|
|
@ -495,9 +495,11 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
||||||
SIGNAL ( CLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ),
|
SIGNAL ( CLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ),
|
||||||
this, SLOT ( OnCLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
this, SLOT ( OnCLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
||||||
this, SLOT ( OnCLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
this, SLOT ( OnCLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
||||||
|
#endif
|
||||||
|
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( UpstreamRateChanged() ),
|
SIGNAL ( UpstreamRateChanged() ),
|
||||||
|
|
|
@ -129,10 +129,12 @@ public slots:
|
||||||
int iPingTime,
|
int iPingTime,
|
||||||
int iNumClients );
|
int iNumClients );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
void OnCLVersionAndOSReceived ( CHostAddress InetAddr,
|
void OnCLVersionAndOSReceived ( CHostAddress InetAddr,
|
||||||
COSUtil::EOpSystemType eOSType,
|
COSUtil::EOpSystemType eOSType,
|
||||||
QString strVersion )
|
QString strVersion )
|
||||||
{ ConnectDlg.SetVersionAndOSType ( InetAddr, eOSType, strVersion ); }
|
{ ConnectDlg.SetVersionAndOSType ( InetAddr, eOSType, strVersion ); }
|
||||||
|
#endif
|
||||||
|
|
||||||
void OnOpenConnectionSetupDialog() { ShowConnectionSetupDialog(); }
|
void OnOpenConnectionSetupDialog() { ShowConnectionSetupDialog(); }
|
||||||
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
|
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
|
||||||
|
|
|
@ -384,18 +384,12 @@ void CConnectDlg::OnTimerPing()
|
||||||
data ( 0, Qt::UserRole ).toString(),
|
data ( 0, Qt::UserRole ).toString(),
|
||||||
CurServerAddress ) )
|
CurServerAddress ) )
|
||||||
{
|
{
|
||||||
// if address is valid, send ping
|
// if address is valid, send ping or the version and OS request
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
// TEST send request for version and OS instead of ping message
|
|
||||||
const bool bEnableVerOSDebugging = false; // if this is set the "false", we have to regular version
|
|
||||||
if ( bEnableVerOSDebugging )
|
|
||||||
{
|
|
||||||
emit CreateCLServerListReqVerAndOSMes ( CurServerAddress );
|
emit CreateCLServerListReqVerAndOSMes ( CurServerAddress );
|
||||||
}
|
#else
|
||||||
else
|
|
||||||
{
|
|
||||||
emit CreateCLServerListPingMes ( CurServerAddress );
|
emit CreateCLServerListPingMes ( CurServerAddress );
|
||||||
}
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -479,6 +473,7 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
void CConnectDlg::SetVersionAndOSType ( CHostAddress InetAddr,
|
void CConnectDlg::SetVersionAndOSType ( CHostAddress InetAddr,
|
||||||
COSUtil::EOpSystemType eOSType,
|
COSUtil::EOpSystemType eOSType,
|
||||||
QString strVersion )
|
QString strVersion )
|
||||||
|
@ -508,3 +503,4 @@ if ( lvwServers->topLevelItem ( iIdx )->isHidden() )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -62,9 +62,11 @@ public:
|
||||||
const CMultiColorLED::ELightColor ePingTimeLEDColor,
|
const CMultiColorLED::ELightColor ePingTimeLEDColor,
|
||||||
const int iNumClients );
|
const int iNumClients );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
void SetVersionAndOSType ( CHostAddress InetAddr,
|
void SetVersionAndOSType ( CHostAddress InetAddr,
|
||||||
COSUtil::EOpSystemType eOSType,
|
COSUtil::EOpSystemType eOSType,
|
||||||
QString strVersion );
|
QString strVersion );
|
||||||
|
#endif
|
||||||
|
|
||||||
bool GetServerListItemWasChosen() const { return bServerListItemWasChosen; }
|
bool GetServerListItemWasChosen() const { return bServerListItemWasChosen; }
|
||||||
QString GetSelectedAddress() const { return strSelectedAddress; }
|
QString GetSelectedAddress() const { return strSelectedAddress; }
|
||||||
|
|
|
@ -69,6 +69,11 @@ LED bar: lbr
|
||||||
//#define _DEBUG_
|
//#define _DEBUG_
|
||||||
#undef _DEBUG_
|
#undef _DEBUG_
|
||||||
|
|
||||||
|
// define this macro if the version and operating system debugging shall
|
||||||
|
// be enabled in the client (the ping time column in the connect dialog then
|
||||||
|
// shows the requested information instead of the ping time)
|
||||||
|
#undef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
|
|
||||||
// version and application name (use version from qt prject file)
|
// version and application name (use version from qt prject file)
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
#define VERSION APP_VERSION
|
#define VERSION APP_VERSION
|
||||||
|
|
Loading…
Reference in a new issue