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

Dumpcpp creates a QVariant& function without initialising the QVariant

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 4.7.0
    • 4.6.1
    • ActiveX Support
    • None
    • Windows XP using Qt-4.6.1-VS2008, using Qt Creator 3.1
    • 238528f67922d74bb951dae1a4a6a3745ce8b178

    Description

      I've used dumpcpp to create a .h and .cpp file for Microsoft Word: word.h and word.cpp

      Building the program gives two errors (same errors):
      c:/.../word.h:65535: error: 'qax_result' : references must be initialized

      The generated code is:
      inline QVariant& _Document::SetActiveWritingStyle(QVariant& LanguageID, const QString& rhs)
      {
      QVariant& qax_result;
      void *_a[] =

      {(void*)&qax_result, (void*)&LanguageID, (void*)&rhs};
      qt_metacall(QMetaObject::InvokeMetaMethod, 259, _a);
      return qax_result;
      }

      A screenshot is attached.

      To build my program I have currently solved the problem like this:
      inline QVariant& _Document::SetActiveWritingStyle(QVariant& LanguageID, const QString& rhs)
      {
      QVariant *v = new QVariant();
      QVariant& qax_result = *v;
      void *_a[] = {(void*)&qax_result, (void*)&LanguageID, (void*)&rhs}

      ;
      qt_metacall(QMetaObject::InvokeMetaMethod, 259, _a);
      return qax_result;
      }

      Attachments

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

        Activity

          People

            pullatti Prasanth Ullattil
            tbscope Tim Beaulen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes