Skip to content

Commit c9ac224

Browse files
committed
enable QMutexLocker (but __enter__ and __exit__ don't work yet due to PythonQt class wrapper implementation...)
1 parent bede258 commit c9ac224

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

generator/typesystem_core.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@
462462
<rejection class="QMutableListIterator"/>
463463
<rejection class="QMutableMapIterator"/>
464464
<rejection class="QMutableVectorIterator"/>
465-
<rejection class="QMutexLocker"/>
466465
<rejection class="QNoImplicitBoolCast"/>
467466
<rejection class="QObjectCleanupHandler"/>
468467
<rejection class="QObjectData"/>
@@ -1271,6 +1270,12 @@
12711270
</object-type>
12721271
<object-type name="QLibraryInfo"/>
12731272
<object-type name="QMutex"/>
1273+
<value-type name="QMutexLocker">
1274+
<inject-code class="pywrap-h">
1275+
void __enter__(QMutexLocker* self) {}
1276+
void __exit__(QMutexLocker* self) { self->unlock(); }
1277+
</inject-code>
1278+
</value-type>
12741279
<object-type name="QSemaphore"/>
12751280
<object-type name="QSocketNotifier"/>
12761281
<object-type name="QSystemLocale"/>

0 commit comments

Comments
 (0)