diff --git a/src/blackcore/actionbind.cpp b/src/blackcore/actionbind.cpp index e67b8cf57..69cfa67f1 100644 --- a/src/blackcore/actionbind.cpp +++ b/src/blackcore/actionbind.cpp @@ -19,7 +19,7 @@ namespace BlackCore QString CActionBind::registerAction(const QString &action, const QPixmap &icon) { const QString a = CActionBind::normalizeAction(action); - auto inputManger = CInputManager::instance(); + CInputManager *inputManger = CInputManager::instance(); Q_ASSERT_X(inputManger, Q_FUNC_INFO, "Missing input manager"); inputManger->registerAction(a, icon); return a; diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index 9dea94fad..0b3923165 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -89,6 +89,7 @@ namespace BlackGui ui->le_Simulator->setText(simulator.toQString(true)); QTimer::singleShot(500, [this]() { + if (!sApp || sApp->isShuttingDown()) { return; } this->updateViewToCurrentModels(); }); } diff --git a/src/blackgui/win/windowfinderwindows.cpp b/src/blackgui/win/windowfinderwindows.cpp index 05834e60b..74b64badb 100644 --- a/src/blackgui/win/windowfinderwindows.cpp +++ b/src/blackgui/win/windowfinderwindows.cpp @@ -34,8 +34,8 @@ namespace BlackGui } HWND hWindow = FindWindow(lpClassName.data(), lpWindowName.data()); + if (hWindow) { return QWindow::fromWinId(reinterpret_cast(hWindow)); } - if (hWindow) return QWindow::fromWinId(reinterpret_cast(hWindow)); - else return nullptr; + return nullptr; } } diff --git a/src/blackgui/win/windowfinderwindows.h b/src/blackgui/win/windowfinderwindows.h index eb9ce7151..503e5b7d1 100644 --- a/src/blackgui/win/windowfinderwindows.h +++ b/src/blackgui/win/windowfinderwindows.h @@ -21,7 +21,6 @@ namespace BlackGui class BLACKGUI_EXPORT CWindowFinderWindows : public IWindowFinder { public: - //! Constructor CWindowFinderWindows() {} @@ -30,7 +29,6 @@ namespace BlackGui //! \copydoc IWindowFinder::findForeignWindow virtual QWindow *findForeignWindow(const QString &windowName, const QString &className) override; - }; } diff --git a/src/blackinput/joystick.h b/src/blackinput/joystick.h index d2949e058..0b4c8dd40 100644 --- a/src/blackinput/joystick.h +++ b/src/blackinput/joystick.h @@ -42,4 +42,4 @@ namespace BlackInput }; } -#endif // BLACKINPUT_JOYSTICK_H +#endif // guard diff --git a/src/blackmisc/atomicfile.h b/src/blackmisc/atomicfile.h index d7b467d6c..5348a1113 100644 --- a/src/blackmisc/atomicfile.h +++ b/src/blackmisc/atomicfile.h @@ -37,7 +37,7 @@ namespace BlackMisc CAtomicFile(const QString &filename) : QFile(filename) {} //! \copydoc QFile::~QFile - ~CAtomicFile() { if (std::uncaught_exception()) { QFile::close(); } } + virtual ~CAtomicFile() { if (std::uncaught_exception()) { QFile::close(); } } //! \copydoc QFile::open //! Just before opening the file, the filename is changed so we actually write to a temporary file. diff --git a/src/swiftdata/swiftdata.cpp b/src/swiftdata/swiftdata.cpp index d7d8502bf..d1ddc1211 100644 --- a/src/swiftdata/swiftdata.cpp +++ b/src/swiftdata/swiftdata.cpp @@ -152,10 +152,7 @@ void CSwiftData::initMenu() void CSwiftData::performGracefulShutdown() { - if (m_updater) - { - m_updater->abandonAndWait(); - } + if (m_updater) { m_updater->abandonAndWait(); } } void CSwiftData::consolidationSettingChanged()