mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-03 00:38:58 +00:00
Fix build for Qt < 5.15
This commit is contained in:
@@ -174,8 +174,12 @@ void TitleInfoDialog::SaveIcon(bool large) {
|
|||||||
}
|
}
|
||||||
last_path = QFileInfo(path).path();
|
last_path = QFileInfo(path).path();
|
||||||
|
|
||||||
const auto pixmap = large ? ui->iconLargeLabel->pixmap(Qt::ReturnByValue)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||||
: ui->iconSmallLabel->pixmap(Qt::ReturnByValue);
|
const auto& pixmap = large ? ui->iconLargeLabel->pixmap(Qt::ReturnByValue)
|
||||||
|
: ui->iconSmallLabel->pixmap(Qt::ReturnByValue);
|
||||||
|
#else
|
||||||
|
const auto& pixmap = large ? *ui->iconLargeLabel->pixmap() : *ui->iconSmallLabel->pixmap();
|
||||||
|
#endif
|
||||||
if (!pixmap.save(path)) {
|
if (!pixmap.save(path)) {
|
||||||
QMessageBox::warning(this, tr("threeSD"), tr("Could not save icon."));
|
QMessageBox::warning(this, tr("threeSD"), tr("Could not save icon."));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user