Fix QColorDialog::DontUseNativeDialog usage
Task-number: QTBUG-29387 Change-Id: I97b3267981a0dcfdc95469cd0725b52ac4845346 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
ffea8e98f7
commit
2f854e5090
@ -1856,15 +1856,12 @@ void QColorDialog::setVisible(bool visible)
|
||||
}
|
||||
#else
|
||||
|
||||
if (!(options() & DontUseNativeDialog))
|
||||
if (!(options() & DontUseNativeDialog) && d->nativeDialogInUse) {
|
||||
d->setNativeDialogVisible(visible);
|
||||
|
||||
if (d->nativeDialogInUse) {
|
||||
// Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
|
||||
// updates the state correctly, but skips showing the non-native version:
|
||||
setAttribute(Qt::WA_DontShowOnScreen);
|
||||
} else {
|
||||
d->nativeDialogInUse = false;
|
||||
setAttribute(Qt::WA_DontShowOnScreen, false);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user