Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.4.0
-
None
Description
When running an application which uses Word COM objects AND Excel COM objects at the same time the application crashes when one tries to use object with the same name but in different typelibs (for example, Excel::Range and Word::Range in the same program).
- How to reproduce:
1. Write and run an application which uses Word COM objects AND Excel COM objects at the same time.
2. Start the application and start
- Expected result:
COM-objects, Word's and Excel's one, should work simultaneously without problem
- Actual result:
Application crash when trying to use object with the same name but in different typelibs (for example, Excel::Range and Word::Range in the same program).
More info:
The problem might be that dumpcpp tool does not decorate class names with namespaces when outputs metatype registering code for them.
For example, for Word::Range one gets code qRegisterMetatype("Range", qax_pointer), and for Excel::Range one gets the SAME CODE qRegisterMetatype("Range", qax_pointer), which collides with previous one and causes program crash (both lines can be found in corresponding files MSWORD.h and EXCEL.h which a produced by dumpcpp).
What is needed is name decoration with class namespace, like that: qRegisterMetatype("Word::Range", qax_pointer).