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

error in QBitArray documentation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0
    • 5.2.1
    • Documentation
    • None

    Description

      error in QBitArray documentation, the example provided for "QBitArray & QBitArray::operator&=(const QBitArray & other)" is wrong:

      QBitArray a(3);
      QBitArray b(2);
      a[0] = 1; a[1] = 0; a[2] = 1;   // a: [ 1, 0, 1 ]
      b[0] = 1; b[1] = 0;             // b: [ 1, 1 ]
      a &= b;                         // a: [ 1, 0, 0 ]
      

      on the 4th line, b[1] = 0; should be b[1] = 1;

      Attachments

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

        Activity

          People

            nierob Nierob
            divide Robin Lobel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes