[GUI] Remove code for Qt < 5.9

This commit is contained in:
Chris Hennes
2021-03-30 15:38:26 -05:00
committed by wmayer
parent 67d26939dc
commit 50c7ee36bf
57 changed files with 19 additions and 686 deletions

View File

@@ -759,14 +759,10 @@ void ColorButton::onChooseColor()
{
if (!d->allowChange)
return;
#if QT_VERSION >= 0x040500
if (d->modal) {
#endif
QColor currentColor = d->col;
QColorDialog cd(d->col, this);
#if QT_VERSION >= 0x050000
cd.setOptions(QColorDialog::DontUseNativeDialog);
#endif
if (d->autoChange) {
connect(&cd, SIGNAL(currentColorChanged(const QColor &)),
@@ -786,15 +782,12 @@ void ColorButton::onChooseColor()
setColor(currentColor);
changed();
}
#if QT_VERSION >= 0x040500
}
else {
if (d->cd.isNull()) {
d->old = d->col;
d->cd = new QColorDialog(d->col, this);
#if QT_VERSION >= 0x050000
d->cd->setOptions(QColorDialog::DontUseNativeDialog);
#endif
d->cd->setAttribute(Qt::WA_DeleteOnClose);
connect(d->cd, SIGNAL(rejected()),
this, SLOT(onRejected()));
@@ -803,7 +796,6 @@ void ColorButton::onChooseColor()
}
d->cd->show();
}
#endif
}
void ColorButton::onColorChosen(const QColor& c)