Skip to content

Commit 47c73c7

Browse files
iakovMinyazevR
authored andcommitted
Return lost fix for class lookup
1 parent 27f7689 commit 47c73c7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/PythonQt.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,24 @@ PythonQtClassInfo* PythonQtPrivate::getClassInfo( const QByteArray& className )
26432643
}
26442644
}
26452645
}
2646+
2647+
if (!result) {
2648+
bool ambiguity = false;
2649+
for(auto &&key: _knownClassInfos.keys()) {
2650+
if (key.indexOf(QByteArray("::") + className) >= 0) {
2651+
if (!result) {
2652+
result = _knownClassInfos.value(key);
2653+
} else {
2654+
ambiguity = true;
2655+
std::cerr << "Multiple candidates found" << std::endl;
2656+
}
2657+
}
2658+
}
2659+
if (ambiguity) {
2660+
return nullptr;
2661+
}
2662+
}
2663+
26462664
return result;
26472665
}
26482666

0 commit comments

Comments
 (0)