QDialogButtonBox documentation bug

Report any problems with CopperSpice
Post Reply
seasoned_geek
Posts: 261
Joined: Thu Jun 11 2020 12:18 pm

QDialogButtonBox documentation bug

Post 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);
      |             ^~~~~~~~~~~~~~~~

barbara
Posts: 458
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: QDialogButtonBox documentation bug

Post 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.
Post Reply