Page 1 of 1

QDialogButtonBox documentation bug

Posted: Wed Mar 02 2022 5:00 pm
by seasoned_geek
https://www.copperspice.com/docs/cs_api/class_qdialogbuttonbox.html

Says this is a Public method.

QDialogButtonBox (StandardButtons buttons, Qt::Orientation orientation=Qt::Horizontal, QWidget *parent=nullptr)

It should only require buttons and return a horizontal non-parented QDialogButtonBox. When one tries to use it this way

Code: Select all

    QDialogButtonBox::StandardButtons btns = QDialogButtonBox::Cancel | QDialogButtonBox::Save;
    QDialogButtonBox *btnBox = new QDialogButtonBox( btns );
It results in the following:

Code: Select all

  280 |     QDialogButtonBox *btnBox = new QDialogButtonBox( btns );
      |                                                           ^
In file included from /usr/lib/cs_lib/include/QtGui/QDialogButtonBox:1,
                 from /home/roland/sf_projects/reddiamond/src/dialoggeneralsettings.cpp:28:
/usr/lib/cs_lib/include/QtGui/qdialogbuttonbox.h:104:4: note: candidate: ‘QDialogButtonBox::QDialogButtonBox(const QDialogButtonBox&)’ <deleted>
  104 |    QDialogButtonBox(const QDialogButtonBox &) = delete;
      |    ^~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtGui/qdialogbuttonbox.h:101:4: note: candidate: ‘QDialogButtonBox::QDialogButtonBox(QDialogButtonBox::StandardButtons, Qt::Orientation, QWidget*)’
  101 |    QDialogButtonBox(StandardButtons buttons, Qt::Orientation orientation = Qt::Horizontal,
      |    ^~~~~~~~~~~~~~~~
/usr/lib/cs_lib/include/QtGui/qdialogbuttonbox.h:100:13: note: candidate: ‘QDialogButtonBox::QDialogButtonBox(QDialogButtonBox::StandardButtons, QWidget*)’
  100 |    explicit QDialogButtonBox(StandardButtons buttons, QWidget *parent = nullptr);
      |             ^~~~~~~~~~~~~~~~


Re: QDialogButtonBox documentation bug

Posted: Thu Mar 03 2022 8:14 pm
by barbara
Great timing about reporting this issue. We found a pair of constructors in QDialogButtonBox which were ambiguous. The changes just made it through our internal CI process and have been pushed to git hub.

Updated documentation will be uploaded today.

As a work around, if you are unable to build from source, you can pass a second argument of Qt::Horizontal to resolve this issue.