catch errors on sound card starting in main dialog and show error message without the need to terminate the software immediately (as it was before)
This commit is contained in:
parent
c549ae90f0
commit
bb3404b21c
1 changed files with 511 additions and 495 deletions
|
@ -338,12 +338,28 @@ void CLlconClientDlg::OnConnectDisconBut()
|
||||||
// set address and check if address is valid
|
// set address and check if address is valid
|
||||||
if ( pClient->SetServerAddr ( LineEditServerAddr->currentText() ) )
|
if ( pClient->SetServerAddr ( LineEditServerAddr->currentText() ) )
|
||||||
{
|
{
|
||||||
pClient->Start();
|
bool bStartOk = true;
|
||||||
|
|
||||||
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
|
try
|
||||||
|
{
|
||||||
|
pClient->Start();
|
||||||
|
}
|
||||||
|
|
||||||
// start timer for level meter bar
|
catch ( CGenErr generr )
|
||||||
TimerSigMet.start ( LEVELMETER_UPDATE_TIME );
|
{
|
||||||
|
QMessageBox::critical (
|
||||||
|
this, APP_NAME, generr.GetErrorText(), "Close", 0 );
|
||||||
|
|
||||||
|
bStartOk = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( bStartOk )
|
||||||
|
{
|
||||||
|
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
|
||||||
|
|
||||||
|
// start timer for level meter bar
|
||||||
|
TimerSigMet.start ( LEVELMETER_UPDATE_TIME );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue