mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Cleanup pre-Qt 6.5 code
This commit is contained in:
parent
7864ad4bc6
commit
91a342e90d
@ -81,7 +81,7 @@ set_package_properties(LibRaw PROPERTIES
|
||||
)
|
||||
|
||||
ecm_set_disabled_deprecation_versions(
|
||||
QT 6.4
|
||||
QT 6.5
|
||||
KF 5.102
|
||||
)
|
||||
|
||||
|
@ -90,10 +90,7 @@
|
||||
#include <QImageIOPlugin>
|
||||
#include <QLocale>
|
||||
#include <QThread>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
#include <QTimeZone>
|
||||
#endif
|
||||
|
||||
// Allow the code to works on all QT versions supported by KDE
|
||||
// project (Qt 5.15 and Qt 6.x) to easy backports fixes.
|
||||
@ -319,11 +316,7 @@ static void readMetadata(const Imf::Header &header, QImage &image)
|
||||
}
|
||||
auto dateTime = QDateTime::fromString(QString::fromStdString(capDate->value()), QStringLiteral("yyyy:MM:dd HH:mm:ss"));
|
||||
if (dateTime.isValid()) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
dateTime.setTimeZone(QTimeZone::fromSecondsAheadOfUtc(off));
|
||||
#else
|
||||
dateTime.setOffsetFromUtc(off);
|
||||
#endif
|
||||
image.setText(QStringLiteral("CreationDate"), dateTime.toString(Qt::ISODate));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user