Gui: use contains() and isEmpty() instead of count() where possible

This commit is contained in:
Benjamin Nauck
2025-03-10 21:39:54 +01:00
parent 02d095f6e2
commit df3c324b7d
16 changed files with 39 additions and 39 deletions

View File

@@ -66,7 +66,7 @@ public:
Base::PyGILStateLocker lock;
PythonWrapper wrap;
wrap.loadWidgetsModule();
if (func.count("widget") == 0) {
if (!func.contains("widget")) {
throw Py::AttributeError("Object has no attribute 'widget'");
}
Py::Callable target(func.at("widget"));