[GUI] Remove code for Qt < 5.9
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user