File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -978,6 +978,7 @@ PythonQtPrivate::PythonQtPrivate()
978978 _noLongerWrappedCB = NULL ;
979979 _wrappedCB = NULL ;
980980 _currentClassInfoForClassWrapperCreation = NULL ;
981+ _ErrorOccured = false ;
981982}
982983
983984void PythonQtPrivate::setupSharedLibrarySuffixes ()
@@ -1088,9 +1089,15 @@ bool PythonQt::handleError()
10881089 PyErr_Clear ();
10891090 flag = true ;
10901091 }
1092+ PythonQt::priv ()->_ErrorOccured = flag;
10911093 return flag;
10921094}
10931095
1096+ bool PythonQt::errorOccured ()const
1097+ {
1098+ return PythonQt::priv ()->_ErrorOccured ;
1099+ }
1100+
10941101void PythonQt::addSysPath (const QString& path)
10951102{
10961103 PythonQtObjectPtr sys;
Original file line number Diff line number Diff line change @@ -446,6 +446,9 @@ class PYTHONQT_EXPORT PythonQt : public QObject {
446446 // ! The error is currently just output to the python stderr, future version might implement better trace printing
447447 bool handleError ();
448448
449+ // ! return \a True if \a handleError() has been called and an error occured.
450+ bool errorOccured ()const ;
451+
449452 // ! set a callback that is called when a QObject with parent == NULL is wrapped by pythonqt
450453 void setQObjectWrappedCallback (PythonQtQObjectWrappedCB* cb);
451454 // ! set a callback that is called when a QObject with parent == NULL is no longer wrapped by pythonqt
@@ -647,6 +650,8 @@ class PYTHONQT_EXPORT PythonQtPrivate : public QObject {
647650 int _initFlags;
648651 int _PythonQtObjectPtr_metaId;
649652
653+ bool _ErrorOccured;
654+
650655 friend class PythonQt ;
651656};
652657
You can’t perform that action at this time.
0 commit comments