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 @@ -1115,6 +1115,7 @@ PythonQtPrivate::PythonQtPrivate()
1115
1115
_wrappedCB = NULL ;
1116
1116
_currentClassInfoForClassWrapperCreation = NULL ;
1117
1117
_profilingCB = NULL ;
1118
+ _ErrorOccured = false ;
1118
1119
}
1119
1120
1120
1121
void PythonQtPrivate::setupSharedLibrarySuffixes ()
@@ -1233,9 +1234,15 @@ bool PythonQt::handleError()
1233
1234
PyErr_Clear ();
1234
1235
flag = true ;
1235
1236
}
1237
+ PythonQt::priv ()->_ErrorOccured = flag;
1236
1238
return flag;
1237
1239
}
1238
1240
1241
+ bool PythonQt::errorOccured ()const
1242
+ {
1243
+ return PythonQt::priv ()->_ErrorOccured ;
1244
+ }
1245
+
1239
1246
void PythonQt::addSysPath (const QString& path)
1240
1247
{
1241
1248
PythonQtObjectPtr sys;
Original file line number Diff line number Diff line change @@ -481,6 +481,9 @@ class PYTHONQT_EXPORT PythonQt : public QObject {
481
481
// ! newly loaded wrappers can add methods even when the object was wrapped by PythonQt before the wrapper was loaded
482
482
void clearNotFoundCachedMembers ();
483
483
484
+ // ! return \a True if \a handleError() has been called and an error occured.
485
+ bool errorOccured ()const ;
486
+
484
487
// ! set a callback that is called when a QObject with parent == NULL is wrapped by pythonqt
485
488
void setQObjectWrappedCallback (PythonQtQObjectWrappedCB* cb);
486
489
// ! set a callback that is called when a QObject with parent == NULL is no longer wrapped by pythonqt
@@ -708,6 +711,8 @@ class PYTHONQT_EXPORT PythonQtPrivate : public QObject {
708
711
int _initFlags;
709
712
int _PythonQtObjectPtr_metaId;
710
713
714
+ bool _ErrorOccured;
715
+
711
716
friend class PythonQt ;
712
717
};
713
718
You can’t perform that action at this time.
0 commit comments