Drop Qt 5 support

Qt 6 has been available for almost 4 years. Qt 5 is no longer officially supported by Qt for opensource, it's time to drop Qt 5.
This commit is contained in:
Jonas Kvinge
2024-09-07 00:12:56 +02:00
parent eb30c654c5
commit e3e6a22172
91 changed files with 76 additions and 760 deletions

View File

@@ -172,11 +172,7 @@ QString PlaylistDelegateBase::displayText(const QVariant &value, const QLocale&)
QString text;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch (value.metaType().id()) {
#else
switch (static_cast<QMetaType::Type>(value.type())) {
#endif
case QMetaType::Int:{
int v = value.toInt();
if (v > 0) text = QString::number(v);
@@ -441,11 +437,7 @@ QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLoca
const QString string_value = value.toString();
QUrl url;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (value.metaType().id() == QMetaType::QUrl) {
#else
if (value.type() == QVariant::Url) {
#endif
url = value.toUrl();
}
else if (string_value.contains(QLatin1String("://"))) {
@@ -478,11 +470,7 @@ QPixmap SongSourceDelegate::LookupPixmap(const Song::Source source, const QSize
}
QIcon icon(Song::IconForSource(source));
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
pixmap = icon.pixmap(size, device_pixel_ratio);
#else
pixmap = icon.pixmap(size);
#endif
QPixmapCache::insert(pixmap_cache_key, pixmap);
return pixmap;