Skip to content

Commit

Permalink
clang-format update (hopefully ok now)
Browse files Browse the repository at this point in the history
Co-Authored-By: pgScorpio <pg_Scorpio@hotmail.com>
  • Loading branch information
ann0see and pgScorpio committed Mar 24, 2022
1 parent 5186498 commit f6317b8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,8 @@ void CClientDlg::OnTimerSigMet()
// show message box about feedback issue
QCheckBox* chb = new QCheckBox ( tr ( "Enable feedback detection" ) );
chb->setCheckState ( pSettings->bEnableFeedbackDetection ? Qt::Checked : Qt::Unchecked );
QMessageBox msgbox ( CMsgBoxes::MainForm());
msgbox.setWindowTitle(CMsgBoxes::MainFormName() + ": " + tr( "Warning" ));
QMessageBox msgbox ( CMsgBoxes::MainForm() );
msgbox.setWindowTitle ( CMsgBoxes::MainFormName() + ": " + tr ( "Warning" ) );
msgbox.setText ( tr ( "Audio feedback or loud signal detected.\n\n"
"We muted your channel and activated 'Mute Myself'. Please solve "
"the feedback issue first and unmute yourself afterwards." ) );
Expand Down Expand Up @@ -1144,8 +1144,8 @@ void CClientDlg::OnTimerCheckAudioDeviceOk()
// it is trying to connect the server which does not help to solve the problem (#129))
if ( !pClient->IsCallbackEntered() )
{
CMsgBoxes::ShowWarning( tr ( "Your sound card is not working correctly. "
"Please open the settings dialog and check the device selection and the driver settings." ) );
CMsgBoxes::ShowWarning ( tr ( "Your sound card is not working correctly. "
"Please open the settings dialog and check the device selection and the driver settings." ) );
}
}

Expand Down Expand Up @@ -1205,7 +1205,7 @@ void CClientDlg::Connect ( const QString& strSelectedAddress, const QString& str
catch ( const CGenErr& generr )
{
// show error message and return the function
CMsgBoxes::ShowError( generr.GetErrorText() );
CMsgBoxes::ShowError ( generr.GetErrorText() );
return;
}

Expand Down
19 changes: 10 additions & 9 deletions src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ QString UsageArguments ( char** argv );
#define htmlBold( T ) "<b>" + T + "</b>"
#define htmlNewLine() "<br>"


class CMsgBoxes
{
protected:
Expand Down Expand Up @@ -444,7 +443,12 @@ class CCommandlineOptions

static bool GetStringArgument ( int& i, const QString& strShortOpt, const QString& strLongOpt, QString& strArg );

static bool GetNumericArgument ( int& i, const QString& strShortOpt, const QString& strLongOpt, double rRangeStart, double rRangeStop, double& rValue );
static bool GetNumericArgument ( int& i,
const QString& strShortOpt,
const QString& strLongOpt,
double rRangeStart,
double rRangeStop,
double& rValue );

public:
// find and get a specific argument:
Expand Down Expand Up @@ -497,13 +501,12 @@ class CCommandlineOptions
return false;
}

//=================================================
// Non statics to parse bare arguments
// (These need an instance of CCommandlineOptions)
//=================================================
//=================================================
// Non statics to parse bare arguments
// (These need an instance of CCommandlineOptions)
//=================================================

protected:

int currentIndex;
char** currentArgv;

Expand All @@ -514,7 +517,6 @@ class CCommandlineOptions
}

public:

QString GetFirstArgument()
{
reset();
Expand All @@ -537,7 +539,6 @@ class CCommandlineOptions

return QString();
}

};

// defines for commandline options in the style "shortopt", "longopt"
Expand Down
3 changes: 1 addition & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ char** CCommandlineOptions::appArgv = NULL;
QDialog* CMsgBoxes::pMainForm = NULL;
QString CMsgBoxes::strMainFormName = APP_NAME;


int main ( int argc, char** argv )
{
CCommandlineOptions::appArgc = argc;
Expand Down Expand Up @@ -947,7 +946,7 @@ int main ( int argc, char** argv )
#ifndef HEADLESS
if ( bUseGUI )
{
CMsgBoxes::ShowError( generr.GetErrorText() );
CMsgBoxes::ShowError ( generr.GetErrorText() );
}
else
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/serverdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,10 @@ void CServerDlg::OnStopRecorder()
UpdateRecorderStatus ( QString() );
if ( pServer->GetRecorderErrMsg() != QString() )
{
CMsgBoxes::ShowWarning( tr ( "Recorder failed to start. "
"Please check available disk space and permissions and try again. "
"Error: " ) +
pServer->GetRecorderErrMsg() );
CMsgBoxes::ShowWarning ( tr ( "Recorder failed to start. "
"Please check available disk space and permissions and try again. "
"Error: " ) +
pServer->GetRecorderErrMsg() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument,
#ifndef HEADLESS
// special case: when settings are loaded no GUI is yet created, therefore
// we have to create a warning message box here directly
CMsgBoxes::ShowWarning( strError );
CMsgBoxes::ShowWarning ( strError );
#endif
}

Expand Down
3 changes: 2 additions & 1 deletion src/soundbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ QString CSoundBase::SetDev ( const QString strDevName )
// ASIO drivers
sErrorMessage += "<br/>" + tr ( "Do you want to open the ASIO driver setup to try changing your configuration to a working state?" );

if ( QMessageBox::Yes == QMessageBox::information ( CMsgBoxes::MainForm(), CMsgBoxes::MainFormName(), sErrorMessage, QMessageBox::Yes | QMessageBox::No ) )
if ( QMessageBox::Yes ==
QMessageBox::information ( CMsgBoxes::MainForm(), CMsgBoxes::MainFormName(), sErrorMessage, QMessageBox::Yes | QMessageBox::No ) )
{
LoadAndInitializeFirstValidDriver ( true );
}
Expand Down
4 changes: 3 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,9 @@ void CLanguageComboBox::OnLanguageActivated ( int iLanguageIdx )
// only update if the language selection is different from the current selected language
if ( iIdxSelectedLanguage != iLanguageIdx )
{
QMessageBox::information ( CMsgBoxes::MainForm(), CMsgBoxes::MainFormName() + ": " + tr ( "Restart Required" ), tr ( "Please restart the application for the language change to take effect." ) );
QMessageBox::information ( CMsgBoxes::MainForm(),
CMsgBoxes::MainFormName() + ": " + tr ( "Restart Required" ),
tr ( "Please restart the application for the language change to take effect." ) );

emit LanguageChanged ( itemData ( iLanguageIdx ).toString() );
}
Expand Down

0 comments on commit f6317b8

Please sign in to comment.