##// END OF EJS Templates
enabled downcasting only on base classes...
florianlink -
r31:8293debcc536
parent child
Show More
@@ -695,7 +695,19 void* PythonQtClassInfo::recursiveCastDownIfPossible(void* ptr, char** resultCla
695 695 void* PythonQtClassInfo::castDownIfPossible(void* ptr, PythonQtClassInfo** resultClassInfo)
696 696 {
697 697 char* className;
698 void* resultPtr = recursiveCastDownIfPossible(ptr, &className);
698 // this would do downcasting recursively...
699 // void* resultPtr = recursiveCastDownIfPossible(ptr, &className);
700
701 // we only do downcasting on the base object, not on the whole inheritance tree...
702 void* resultPtr = NULL;
703 if (!_polymorphicHandlers.isEmpty()) {
704 foreach(PythonQtPolymorphicHandlerCB* cb, _polymorphicHandlers) {
705 resultPtr = (*cb)(ptr, &className);
706 if (resultPtr) {
707 break;
708 }
709 }
710 }
699 711 if (resultPtr) {
700 712 *resultClassInfo = PythonQt::priv()->getClassInfo(className);
701 713 } else {
General Comments 0
You need to be logged in to leave comments. Login now