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

Customer observing strange behaviour with QAxBase::isNull() from qaxbase.cpp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.2.4
    • Active Qt
    • None
    • All

    Description

      Customer claims that this function returns unexpected return values. Actual text here:

      “They have a question about the function QAxBase::isNull()

      The documentation tells that it "Returns true if there is no COM object loaded by this wrapper; otherwise return false." In their opinion this is the contrary (ie. it returns false if there is no COM object loaded).
      They have made tests with a QAxObject object. The function returns false at startup, then they initialize a COM object with the function setControl(), and the function returns true.

      Do They misunderstand something, or could the documentation contain a mistake ? “

       The location of the cpp file is:

      qtactiveqt/src/activeqt/container/qaxbase.cpp

       

      //
      bool QAxBase::isNull() const {
           return !d->ptr;
      }
       
       //
       
      

      what happens when we return !sixty_four_bit_pointer as a bool?

      seems kind of iffy.

      I would be more comfortable with something like

       

      if(d->ptr){
          return false;
          }
      return true;
      

       

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            williamsmith William Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes