build: bump Qt minimum to 5.15 (#7943)

* deps: bump QT_MINIMUM from 5.6 to 5.15

* chore: remove now-obsolete qt >= 5.8 checks

* chore: remove now-obsolete qt >= 5.14 checks
This commit is contained in:
Charles Kerr
2025-12-18 07:39:25 -06:00
committed by GitHub
parent 6fcd2d2297
commit 833e37dab5
4 changed files with 2 additions and 33 deletions

View File

@@ -53,7 +53,7 @@ set(OPENSSL_MINIMUM 1.1.0)
set(MBEDTLS_MINIMUM 2.7)
set(NPM_MINIMUM 10.2.3) # Node.js 20.10 (eslint-plugin-unicorn)
set(PSL_MINIMUM 0.21.1)
set(QT_MINIMUM 5.6)
set(QT_MINIMUM 5.15)
option(ENABLE_DAEMON "Build daemon" ON)
tr_auto_option(ENABLE_GTK "Build GTK client" AUTO)

View File

@@ -414,12 +414,8 @@ void DetailsDialog::onButtonBoxClicked(QAbstractButton* button)
QString const re = QStringLiteral("((,|;)\\s*)");
//see https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QStringList const labels_list = labels_text.split(QRegularExpression(re), QString::SkipEmptyParts);
#else
// see https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum
QStringList const labels_list = labels_text.split(QRegularExpression(re), Qt::SkipEmptyParts);
#endif
torrentSet(TR_KEY_labels, labels_list);

View File

@@ -313,11 +313,7 @@ Prefs::Prefs(QString config_dir)
case QMetaType::QDateTime:
if (auto const value = getValue<time_t>(b); value)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
values_[i].setValue(QDateTime::fromSecsSinceEpoch(*value));
#else
values_[i].setValue(QDateTime::fromTime_t(*value));
#endif
}
break;
@@ -395,11 +391,7 @@ Prefs::~Prefs()
break;
case QMetaType::QDateTime:
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
dictAdd(&current_settings, key, int64_t{ val.toDateTime().toSecsSinceEpoch() });
#else
dictAdd(&current_settings, key, val.toDateTime().toTime_t());
#endif
break;
default:

View File

@@ -5,7 +5,6 @@
#pragma once
#include <cstddef> // size_t
#include <utility>
#include <QPointer>
@@ -19,24 +18,6 @@ class QHeaderView;
class QIcon;
class QModelIndex;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
namespace std
{
template<>
struct hash<QString>
{
std::size_t operator()(QString const& s) const
{
return qHash(s);
}
};
} // namespace std
#endif
class Utils
{
public: