QColorDialog/QFontDialog: Fix setOption().
Call setOptions() such that the option takes effect. Task-number: QTBUG-28817 Change-Id: Ibef834efc988d3ba49e88ea88ef475b1fd7fd98f Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
parent
8afd7b4675
commit
4b42c91821
@ -1735,8 +1735,9 @@ QColor QColorDialog::selectedColor() const
|
|||||||
*/
|
*/
|
||||||
void QColorDialog::setOption(ColorDialogOption option, bool on)
|
void QColorDialog::setOption(ColorDialogOption option, bool on)
|
||||||
{
|
{
|
||||||
Q_D(QColorDialog);
|
const QColorDialog::ColorDialogOptions previousOptions = options();
|
||||||
d->options->setOption(static_cast<QColorDialogOptions::ColorDialogOption>(option), on);
|
if (!(previousOptions & option) != !on)
|
||||||
|
setOptions(previousOptions ^ option);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -853,8 +853,9 @@ QFont QFontDialog::selectedFont() const
|
|||||||
*/
|
*/
|
||||||
void QFontDialog::setOption(FontDialogOption option, bool on)
|
void QFontDialog::setOption(FontDialogOption option, bool on)
|
||||||
{
|
{
|
||||||
Q_D(QFontDialog);
|
const QFontDialog::FontDialogOptions previousOptions = options();
|
||||||
d->options->setOption(static_cast<QFontDialogOptions::FontDialogOption>(option), on);
|
if (!(previousOptions & option) != !on)
|
||||||
|
setOptions(previousOptions ^ option);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user