diff --git a/src/blackcore/simulator.cpp b/src/blackcore/simulator.cpp index 14d5b900b..3eb6b66f7 100644 --- a/src/blackcore/simulator.cpp +++ b/src/blackcore/simulator.cpp @@ -569,6 +569,7 @@ namespace BlackCore if (CSimpleCommandParser::registered("BlackCore::ISimulator")) { return; } CSimpleCommandParser::registerCommand({".drv", "alias: .driver .plugin"}); CSimpleCommandParser::registerCommand({".drv unload", "unload driver"}); + CSimpleCommandParser::registerCommand({".drv cg length modelstring", "override CG"}); CSimpleCommandParser::registerCommand({".drv limit number/secs.", "limit updates to number per second (0..off)"}); CSimpleCommandParser::registerCommand({".drv logint callsign", "log interpolator for callsign"}); CSimpleCommandParser::registerCommand({".drv logint off", "no log information for interpolator"}); diff --git a/src/blackcore/simulator.h b/src/blackcore/simulator.h index d2f5c88d7..edc02b2a1 100644 --- a/src/blackcore/simulator.h +++ b/src/blackcore/simulator.h @@ -258,7 +258,7 @@ namespace BlackCore //! \addtogroup swiftdotcommands //! @{ //!
-        //! .drv cg modelstring            set overridden CG for model string      BlackCore::ISimulator
+        //! .drv cg length modelstring     set overridden CG for model string      BlackCore::ISimulator
         //! .drv unload                    unload plugin                           BlackCore::ISimulator
         //! .drv limit number              limit the number of updates             BlackCore::ISimulator
         //! .drv logint callsign           log interpolator for callsign           BlackCore::ISimulator
diff --git a/src/blackgui/components/aircraftcombinedtypeselector.cpp b/src/blackgui/components/aircraftcombinedtypeselector.cpp
index 8ef4a970b..dce8ae6cd 100644
--- a/src/blackgui/components/aircraftcombinedtypeselector.cpp
+++ b/src/blackgui/components/aircraftcombinedtypeselector.cpp
@@ -32,8 +32,8 @@ namespace BlackGui
             connect(ui->le_CombinedType, &QLineEdit::returnPressed,   this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
 
             connect(ui->cb_EngineCount, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
-            connect(ui->cb_EngineType, &QComboBox::currentTextChanged,  this, &CAircraftCombinedTypeSelector::changedComboBox);
-            connect(ui->cb_Type, &QComboBox::currentTextChanged,        this, &CAircraftCombinedTypeSelector::changedComboBox);
+            connect(ui->cb_EngineType,  &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
+            connect(ui->cb_Type,        &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
 
             ui->le_CombinedType->setValidator(new CUpperCaseValidator(this));
         }
diff --git a/src/blackgui/components/aircraftmodelsetvalidationdialog.cpp b/src/blackgui/components/aircraftmodelsetvalidationdialog.cpp
index c46410183..96e33d1da 100644
--- a/src/blackgui/components/aircraftmodelsetvalidationdialog.cpp
+++ b/src/blackgui/components/aircraftmodelsetvalidationdialog.cpp
@@ -31,7 +31,7 @@ namespace BlackGui
 
         void CAircraftModelSetValidationDialog::validatedModelSet(const CSimulatorInfo &simulator, const CAircraftModelList &valid, const CAircraftModelList &invalid, bool stopped, const CStatusMessageList &msgs)
         {
-            if (!sGui) { return; }
+            if (!sGui || sGui->isShuttingDown()) { return; }
             ui->comp_AircraftModelValidation->validatedModelSet(simulator, valid, invalid, stopped, msgs);
             this->setWindowTitle(QStringLiteral("Model validation for '%1'").arg(simulator.toQString(true)));
             CGuiApplication::modalWindowToFront();
diff --git a/src/blackgui/components/autopublishcomponent.h b/src/blackgui/components/autopublishcomponent.h
index 201e2433e..4f1c74f4e 100644
--- a/src/blackgui/components/autopublishcomponent.h
+++ b/src/blackgui/components/autopublishcomponent.h
@@ -32,7 +32,7 @@ namespace BlackGui
             explicit CAutoPublishComponent(QWidget *parent = nullptr);
 
             //! Destructor
-            virtual ~CAutoPublishComponent();
+            virtual ~CAutoPublishComponent() override;
 
             //! Read the files
             int readFiles();
@@ -61,4 +61,5 @@ namespace BlackGui
         };
     } // ns
 } // ns
+
 #endif // guard
diff --git a/src/blackgui/components/logincomponent.ui b/src/blackgui/components/logincomponent.ui
index f238c5e3b..3a8745ccc 100644
--- a/src/blackgui/components/logincomponent.ui
+++ b/src/blackgui/components/logincomponent.ui
@@ -2,14 +2,6 @@
 
  CLoginComponent
  
-  
-   
-    0
-    0
-    329
-    745
-   
-  
   
    Login component
   
diff --git a/src/blackgui/components/settingssimulatorcomponent.h b/src/blackgui/components/settingssimulatorcomponent.h
index 7f23a5049..f9cdc6068 100644
--- a/src/blackgui/components/settingssimulatorcomponent.h
+++ b/src/blackgui/components/settingssimulatorcomponent.h
@@ -101,7 +101,7 @@ namespace BlackGui
             BlackCore::CPluginManagerSimulator *m_plugins = nullptr;
             BlackMisc::CSetting m_enabledSimulators { this, &CSettingsSimulatorComponent::reloadPluginConfig };
         };
-    }
+    } // namespace
 } // namespace
 
 #endif // guard
diff --git a/src/blackgui/dockwidget.h b/src/blackgui/dockwidget.h
index bd5c993eb..ab69f5c52 100644
--- a/src/blackgui/dockwidget.h
+++ b/src/blackgui/dockwidget.h
@@ -105,7 +105,7 @@ namespace BlackGui
         //! Toggle visibility
         void toggleVisibility();
 
-        //! Toggle frameless mode (EXPERIMENTAL)
+        //! Toggle frameless mode
         void toggleFrameless();
 
         //! Window always on top
diff --git a/src/blackgui/enableforframelesswindow.cpp b/src/blackgui/enableforframelesswindow.cpp
index e0ac6ca74..2a850a123 100644
--- a/src/blackgui/enableforframelesswindow.cpp
+++ b/src/blackgui/enableforframelesswindow.cpp
@@ -60,9 +60,9 @@ namespace BlackGui
 
     void CEnableForFramelessWindow::setFrameless(bool frameless)
     {
-        WindowMode nonFrameLessMode = m_originalWindowMode;
+        WindowMode nonFrameLessMode = m_originalWindowMode; // Tool/Normal Window
         if (nonFrameLessMode == WindowFrameless) { nonFrameLessMode = WindowNormal; }
-        setMode(frameless ? WindowFrameless : nonFrameLessMode);
+        this->setMode(frameless ? WindowFrameless : nonFrameLessMode);
     }
 
     void CEnableForFramelessWindow::alwaysOnTop(bool onTop)
@@ -121,7 +121,7 @@ namespace BlackGui
         Q_ASSERT_X(m_widget, "CEnableForFramelessWindow::setWindowAttributes", "Missing widget representing window");
         Q_ASSERT_X(!m_framelessPropertyName.isEmpty(), "CEnableForFramelessWindow::setWindowAttributes", "Missing property name");
 
-        bool frameless = (mode == WindowFrameless);
+        const bool frameless = (mode == WindowFrameless);
 
         // http://stackoverflow.com/questions/18316710/frameless-and-transparent-window-qt5
         // https://bugreports.qt.io/browse/QTBUG-52206
@@ -130,7 +130,7 @@ namespace BlackGui
         {
             m_widget->setAttribute(Qt::WA_NativeWindow);
 
-            // causeing a BLACK background
+            // causing a BLACK background
             m_widget->setAttribute(Qt::WA_NoSystemBackground, frameless);
             m_widget->setAttribute(Qt::WA_TranslucentBackground, frameless); // causing QTBUG-52206
         }
diff --git a/src/blackmisc/aviation/altitude.h b/src/blackmisc/aviation/altitude.h
index f97b4be67..e2f84f961 100644
--- a/src/blackmisc/aviation/altitude.h
+++ b/src/blackmisc/aviation/altitude.h
@@ -130,13 +130,13 @@ namespace BlackMisc
             CAltitude switchedUnit(const PhysicalQuantities::CLengthUnit &newUnit) const;
 
             //! AGL Above ground level?
-            bool isAboveGroundLevel() const { return AboveGround == this->m_datum; }
+            bool isAboveGroundLevel() const { return AboveGround == m_datum; }
 
             //! MSL Mean sea level?
-            bool isMeanSeaLevel() const { return MeanSeaLevel == this->m_datum; }
+            bool isMeanSeaLevel() const { return MeanSeaLevel == m_datum; }
 
             //! Flight level?
-            bool isFlightLevel() const { return FlightLevel == this->m_datum; }
+            bool isFlightLevel() const { return FlightLevel == m_datum; }
 
             //! Get reference datum (MSL or AGL)
             ReferenceDatum getReferenceDatum() const { return m_datum; }
diff --git a/src/blackmisc/simulation/distributor.cpp b/src/blackmisc/simulation/distributor.cpp
index 0ea4b486a..7885b91f2 100644
--- a/src/blackmisc/simulation/distributor.cpp
+++ b/src/blackmisc/simulation/distributor.cpp
@@ -134,7 +134,7 @@ namespace BlackMisc
         {
             static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
             CStatusMessageList msgs;
-            if (!hasValidDbKey()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing id")); }
+            if (!hasValidDbKey())  { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing id")); }
             if (!hasDescription()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing description")); }
             return msgs;
         }
diff --git a/src/swiftguistandard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp
index 1d256f4cf..8542f10fb 100644
--- a/src/swiftguistandard/swiftguistd.cpp
+++ b/src/swiftguistandard/swiftguistd.cpp
@@ -200,7 +200,7 @@ QAction *SwiftGuiStd::getToggleStayOnTopAction(QObject *parent)
 {
     const QIcon i(CIcons::changeIconBackgroundColor(this->style()->standardIcon(QStyle::SP_TitleBarUnshadeButton), Qt::white, QSize(16, 16)));
     QAction *a = new QAction(i, "Toogle main window on top", parent);
-    connect(a, &QAction::triggered, this, &SwiftGuiStd::toogleWindowStayOnTop);
+    connect(a, &QAction::triggered, this, &SwiftGuiStd::toggleWindowStayOnTop);
     return a;
 }
 
@@ -361,7 +361,7 @@ void SwiftGuiStd::onChangedWindowOpacity(int opacity)
     ui->comp_MainInfoArea->getSettingsComponent()->setGuiOpacity(o * 100.0);
 }
 
-void SwiftGuiStd::toogleWindowStayOnTop()
+void SwiftGuiStd::toggleWindowStayOnTop()
 {
     if (sGui) { sGui->toggleStayOnTop(); }
 }
@@ -448,6 +448,7 @@ void SwiftGuiStd::verifyPrerequisites()
 
 void SwiftGuiStd::onValidatedModelSet(const CSimulatorInfo &simulator, const CAircraftModelList &valid, const CAircraftModelList &invalid, bool stopped, const CStatusMessageList &msgs)
 {
+    // will NOT be called if no errors and setting is "only on errors"
     if (!sGui || sGui->isShuttingDown()) { return; }
     this->displayValidationDialog();
     m_validationDialog->validatedModelSet(simulator, valid, invalid, stopped, msgs);
diff --git a/src/swiftguistandard/swiftguistd.h b/src/swiftguistandard/swiftguistd.h
index c96750e23..f488da8fa 100644
--- a/src/swiftguistandard/swiftguistd.h
+++ b/src/swiftguistandard/swiftguistd.h
@@ -246,7 +246,7 @@ private:
 
     //! Toggle if windows stays on top
     //! \remark mostly used with navigator
-    void toogleWindowStayOnTop();
+    void toggleWindowStayOnTop();
 
     //! Toggle window visibility
     //! \remark mostly used with navigator
diff --git a/src/swiftguistandard/swiftguistdaircraft.cpp b/src/swiftguistandard/swiftguistdaircraft.cpp
index 048d6e911..a160c7fb3 100644
--- a/src/swiftguistandard/swiftguistdaircraft.cpp
+++ b/src/swiftguistandard/swiftguistdaircraft.cpp
@@ -19,8 +19,6 @@
 
 #include 
 
-namespace BlackMisc { namespace Aviation { class CAltitude; } }
-
 using namespace BlackCore;
 using namespace BlackMisc;
 using namespace BlackGui;
@@ -45,6 +43,7 @@ bool SwiftGuiStd::reloadOwnAircraft()
 
 void SwiftGuiStd::setTestPosition(const QString &wgsLatitude, const QString &wgsLongitude, const CAltitude &altitude, const CAltitude &pressureAltitude)
 {
+    if (!sGui) { return; }
     CCoordinateGeodetic coordinate(
         CLatitude::fromWgs84(wgsLatitude),
         CLongitude::fromWgs84(wgsLongitude),