From 4ed0d6befdd8cdd2a9acb7ef474f8fb8315ffb87 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 15 Apr 2019 19:25:42 +0200 Subject: [PATCH] Style --- src/blackgui/components/cockpitcomcomponent.cpp | 10 +++++----- src/blackgui/components/dbownmodelsdialog.h | 2 +- src/blackgui/components/dbownmodelsetdialog.h | 2 +- src/blackgui/components/dbownmodelsetformdialog.cpp | 2 +- src/blackgui/components/dbownmodelsetformdialog.h | 4 +--- src/blackgui/components/updateinfodialog.cpp | 2 +- src/blackgui/guiapplication.cpp | 2 +- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/blackgui/components/cockpitcomcomponent.cpp b/src/blackgui/components/cockpitcomcomponent.cpp index 8a93b7753..66ae7fe6d 100644 --- a/src/blackgui/components/cockpitcomcomponent.cpp +++ b/src/blackgui/components/cockpitcomcomponent.cpp @@ -61,14 +61,14 @@ namespace BlackGui this->updateCockpitFromContext(ownAircraft, CIdentifier("dummyInitialValues")); // intentionally different name here // COM form - connect(ui->editor_Com, &CCockpitComForm::testSelcal, this, &CCockpitComComponent::testSelcal); - connect(ui->editor_Com, &CCockpitComForm::changedCockpitValues, this, &CCockpitComComponent::updateOwnCockpitInContext); - connect(ui->editor_Com, &CCockpitComForm::changedSelcal, this, &CCockpitComComponent::updateSelcalInContext); + connect(ui->editor_Com, &CCockpitComForm::testSelcal, this, &CCockpitComComponent::testSelcal); + connect(ui->editor_Com, &CCockpitComForm::changedCockpitValues, this, &CCockpitComComponent::updateOwnCockpitInContext); + connect(ui->editor_Com, &CCockpitComForm::changedSelcal, this, &CCockpitComComponent::updateSelcalInContext); connect(ui->editor_Com, &CCockpitComForm::requestCom1TextMessage, this, &CCockpitComComponent::requestCom1TextMessage); connect(ui->editor_Com, &CCockpitComForm::requestCom2TextMessage, this, &CCockpitComComponent::requestCom2TextMessage); // Relay COM form signals - connect(ui->editor_Com, &CCockpitComForm::transponderModeChanged, this, &CCockpitComComponent::transponderModeChanged); + connect(ui->editor_Com, &CCockpitComForm::transponderModeChanged, this, &CCockpitComComponent::transponderModeChanged); connect(ui->editor_Com, &CCockpitComForm::transponderStateIdentEnded, this, &CCockpitComComponent::transponderStateIdentEnded); // hook up with changes from own aircraft context @@ -110,7 +110,7 @@ namespace BlackGui ui->editor_Com->setTransponder(transponder); // selected stations - if (sGui->getIContextNetwork()) + if (sGui && sGui->getIContextNetwork()) { const CAtcStationList selectedStations = sGui->getIContextNetwork()->getSelectedAtcStations(); ui->editor_Com->setSelectedAtcStations(selectedStations); diff --git a/src/blackgui/components/dbownmodelsdialog.h b/src/blackgui/components/dbownmodelsdialog.h index 6c8f6493c..010026952 100644 --- a/src/blackgui/components/dbownmodelsdialog.h +++ b/src/blackgui/components/dbownmodelsdialog.h @@ -33,7 +33,7 @@ namespace BlackGui explicit CDbOwnModelsDialog(QWidget *parent = nullptr); //! Destructor - virtual ~CDbOwnModelsDialog(); + virtual ~CDbOwnModelsDialog() override; //! \copydoc CDbOwnModelsComponent::setSimulator void setSimulator(const BlackMisc::Simulation::CSimulatorInfo &simulator); diff --git a/src/blackgui/components/dbownmodelsetdialog.h b/src/blackgui/components/dbownmodelsetdialog.h index 7ab147a1c..42e38d649 100644 --- a/src/blackgui/components/dbownmodelsetdialog.h +++ b/src/blackgui/components/dbownmodelsetdialog.h @@ -32,7 +32,7 @@ namespace BlackGui explicit CDbOwnModelSetDialog(QWidget *parent = nullptr); //! Destructor - virtual ~CDbOwnModelSetDialog(); + virtual ~CDbOwnModelSetDialog() override; //! \copydoc CDbOwnModelSetComponent::setSimulator void setSimulator(const BlackMisc::Simulation::CSimulatorInfo &simulator); diff --git a/src/blackgui/components/dbownmodelsetformdialog.cpp b/src/blackgui/components/dbownmodelsetformdialog.cpp index 8478a052f..ca86f0a58 100644 --- a/src/blackgui/components/dbownmodelsetformdialog.cpp +++ b/src/blackgui/components/dbownmodelsetformdialog.cpp @@ -43,7 +43,7 @@ namespace BlackGui { ui->setupUi(this); connect(ui->pb_Cancel, &QPushButton::clicked, this, &CDbOwnModelSetFormDialog::buttonClicked); - connect(ui->pb_Ok, &QPushButton::clicked, this, &CDbOwnModelSetFormDialog::buttonClicked); + connect(ui->pb_Ok, &QPushButton::clicked, this, &CDbOwnModelSetFormDialog::buttonClicked); connect(ui->form_OwnModelSet, &COwnModelSetForm::simulatorChanged, this, &CDbOwnModelSetFormDialog::simulatorChanged); } diff --git a/src/blackgui/components/dbownmodelsetformdialog.h b/src/blackgui/components/dbownmodelsetformdialog.h index 6e901e337..3fdd05afd 100644 --- a/src/blackgui/components/dbownmodelsetformdialog.h +++ b/src/blackgui/components/dbownmodelsetformdialog.h @@ -19,10 +19,8 @@ #include #include -class QWidget; - -namespace BlackMisc { class CLogCategoryList; } namespace Ui { class CDbOwnModelSetFormDialog; } +namespace BlackMisc { class CLogCategoryList; } namespace BlackGui { namespace Components diff --git a/src/blackgui/components/updateinfodialog.cpp b/src/blackgui/components/updateinfodialog.cpp index a9574e837..6bd135dab 100644 --- a/src/blackgui/components/updateinfodialog.cpp +++ b/src/blackgui/components/updateinfodialog.cpp @@ -26,7 +26,7 @@ namespace BlackGui ui->bb_UpdateInfolDialog->button(QDialogButtonBox::Ok)->setText(" Download and install "); ui->cb_DontShowAgain->setChecked(!m_setting.get()); this->selectionChanged(); - connect(ui->comp_UpdateInfo, &CUpdateInfoComponent::selectionChanged, this, &CUpdateInfoDialog::selectionChanged); + connect(ui->comp_UpdateInfo, &CUpdateInfoComponent::selectionChanged, this, &CUpdateInfoDialog::selectionChanged); connect(ui->cb_DontShowAgain, &QCheckBox::toggled, this, &CUpdateInfoDialog::onDontShowAgain); } diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp index 07064799e..569b1274f 100644 --- a/src/blackgui/guiapplication.cpp +++ b/src/blackgui/guiapplication.cpp @@ -1052,7 +1052,7 @@ namespace BlackGui m_updateDialog = new CUpdateInfoDialog(this->mainApplicationWidget()); } - if (onlyIfNew && !m_updateDialog->isNewVersionAvailable()) return; + if (onlyIfNew && !m_updateDialog->isNewVersionAvailable()) { return; } const int result = m_updateDialog->exec(); if (result != QDialog::Accepted) { return; } }