Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2465

ActiveQt - dumpcpp produces unscoped metatypes. Apps crash when using objects with the same name but in different typelibs.

    XMLWordPrintable

Details

    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).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pullatti Prasanth Ullattil
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes