diff --git a/src/Gui/MDIView.cpp b/src/Gui/MDIView.cpp index ec427565f7..c24fa18ee1 100644 --- a/src/Gui/MDIView.cpp +++ b/src/Gui/MDIView.cpp @@ -226,12 +226,14 @@ void MDIView::closeEvent(QCloseEvent *e) // because otherwise other parts don't work as they should. QMainWindow::closeEvent(e); } - else + else { e->ignore(); + } } -void MDIView::windowStateChanged( MDIView* ) +void MDIView::windowStateChanged(QWidget* view) { + Q_UNUSED(view) } void MDIView::print(QPrinter* printer) diff --git a/src/Gui/MDIView.h b/src/Gui/MDIView.h index 86855a7242..724c2797ae 100644 --- a/src/Gui/MDIView.h +++ b/src/Gui/MDIView.h @@ -166,7 +166,7 @@ protected Q_SLOTS: * whenever the window state of the active view changes. * The default implementation does nothing. */ - virtual void windowStateChanged(Gui::MDIView*); + virtual void windowStateChanged(QWidget*); protected: void closeEvent(QCloseEvent *e) override; diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 4600ea85d1..dce8325d6d 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -347,7 +347,7 @@ private Q_SLOTS: Q_SIGNALS: void timeEvent(); - void windowStateChanged(Gui::MDIView*); + void windowStateChanged(QWidget*); void workbenchActivated(const QString&); void mainWindowClosed(); diff --git a/src/Gui/PythonWrapper.cpp b/src/Gui/PythonWrapper.cpp index c460d17bf9..412b56c47f 100644 --- a/src/Gui/PythonWrapper.cpp +++ b/src/Gui/PythonWrapper.cpp @@ -189,8 +189,7 @@ PythonToCppFunc toCppPointerCheckFuncQuantity(PyObject* obj) { if (PyObject_TypeCheck(obj, &(Base::QuantityPy::Type))) return toCppPointerConvFuncQuantity; - else - return nullptr; + return nullptr; } void BaseQuantity_PythonToCpp_QVariant(PyObject* pyIn, void* cppOut) diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 9d4b8c0ea5..9d0244bf12 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -675,7 +675,7 @@ void View3DInventor::dump(const char* filename, bool onlyVisible) } } -void View3DInventor::windowStateChanged(MDIView* view) +void View3DInventor::windowStateChanged(QWidget* view) { bool canStartTimer = false; if (this != view) { diff --git a/src/Gui/View3DInventor.h b/src/Gui/View3DInventor.h index b11c3420b0..3bfe2b237a 100644 --- a/src/Gui/View3DInventor.h +++ b/src/Gui/View3DInventor.h @@ -125,7 +125,7 @@ private: void applySettings(); protected: - void windowStateChanged(MDIView* ) override; + void windowStateChanged(QWidget* view) override; void dropEvent (QDropEvent * e) override; void dragEnterEvent (QDragEnterEvent * e) override; void keyPressEvent (QKeyEvent * e) override;