Fix build on Qt 6.6

This commit is contained in:
Victor Tran 2023-10-14 17:27:24 +11:00
parent 9438038c14
commit da00754963
No known key found for this signature in database
2 changed files with 7 additions and 2 deletions

View file

@ -78,7 +78,11 @@ void MessageDialog::setOptions(const QSharedPointer<QMessageDialogOptions>& opti
}
QPalette pal = ui->dialogTypeWidget->palette();
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
switch (options->standardIcon()) {
#else
switch (options->icon()) {
#endif
case QMessageDialogOptions::NoIcon:
case QMessageDialogOptions::Information:
pal.setColor(QPalette::Window, Qt::transparent);

View file

@ -20,8 +20,9 @@
#ifndef PALETTEFORMAT_H
#define PALETTEFORMAT_H
#include <QPalette>
#include <QJsonValue>
#include <QMap>
#include <QPalette>
namespace PaletteFormat {
QPalette::ColorRole roleForString(QString string);
@ -29,6 +30,6 @@ namespace PaletteFormat {
void applyColor(QPalette* pal, QString key, QJsonValue value);
QColor colorFromValue(QJsonValue value);
}
} // namespace PaletteFormat
#endif // PALETTEFORMAT_H