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

ActiveQt uses only the optional parameter count to determine optional parameters, and disregards the PARAMFLAG_FOPT flag

    XMLWordPrintable

Details

    Description

      This leads to problems with inconsistent type libraries, where not enough overloads are generated.

      A patch against Qt 3.3 (qaxbase.cpp) is

      @@ -1884,7 +1884,7 @@
      prototype += ptype.mid( 6 );
      else
      prototype += constRefify( ptype );

      • if ( optional || pdesc.wParamFlags&PARAMFLAG_FHASDEFAULT)
        + if ( optional || pdesc.wParamFlags&(PARAMFLAG_FHASDEFAULT | PARAMFLAG_FOPT))
        ptype += "=0";
        paramTypes << ptype;
        parameters << paramName;

      And in Qt 4:

      @@ -2324,7 +2324,7 @@
      prototype += ptype;
      if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith("&") && !ptype.endsWith("**")
      )
      prototype += "&";

      • if (optional)
        + if (optional || pdesc.wParamFlags & PARAMFLAG_FOPT)
        paramName += "=0";
        else if (pdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) {
        // ### get the value from pdesc.pparamdescex

      Attachments

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

        Activity

          People

            pullatti Prasanth Ullattil
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes