fixes #11533: TypeError in: FreeCADGui.getMainWindow().windowStateChanged
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -347,7 +347,7 @@ private Q_SLOTS:
|
||||
|
||||
Q_SIGNALS:
|
||||
void timeEvent();
|
||||
void windowStateChanged(Gui::MDIView*);
|
||||
void windowStateChanged(QWidget*);
|
||||
void workbenchActivated(const QString&);
|
||||
void mainWindowClosed();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user