File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -978,6 +978,7 @@ PythonQtPrivate::PythonQtPrivate()
978
978
_noLongerWrappedCB = NULL ;
979
979
_wrappedCB = NULL ;
980
980
_currentClassInfoForClassWrapperCreation = NULL ;
981
+ _ErrorOccured = false ;
981
982
}
982
983
983
984
void PythonQtPrivate::setupSharedLibrarySuffixes ()
@@ -1088,9 +1089,15 @@ bool PythonQt::handleError()
1088
1089
PyErr_Clear ();
1089
1090
flag = true ;
1090
1091
}
1092
+ PythonQt::priv ()->_ErrorOccured = flag;
1091
1093
return flag;
1092
1094
}
1093
1095
1096
+ bool PythonQt::errorOccured ()const
1097
+ {
1098
+ return PythonQt::priv ()->_ErrorOccured ;
1099
+ }
1100
+
1094
1101
void PythonQt::addSysPath (const QString& path)
1095
1102
{
1096
1103
PythonQtObjectPtr sys;
Original file line number Diff line number Diff line change @@ -446,6 +446,9 @@ class PYTHONQT_EXPORT PythonQt : public QObject {
446
446
// ! The error is currently just output to the python stderr, future version might implement better trace printing
447
447
bool handleError ();
448
448
449
+ // ! return \a True if \a handleError() has been called and an error occured.
450
+ bool errorOccured ()const ;
451
+
449
452
// ! set a callback that is called when a QObject with parent == NULL is wrapped by pythonqt
450
453
void setQObjectWrappedCallback (PythonQtQObjectWrappedCB* cb);
451
454
// ! 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 {
647
650
int _initFlags;
648
651
int _PythonQtObjectPtr_metaId;
649
652
653
+ bool _ErrorOccured;
654
+
650
655
friend class PythonQt ;
651
656
};
652
657
You can’t perform that action at this time.
0 commit comments