mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
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:
@@ -53,7 +53,7 @@ set(OPENSSL_MINIMUM 1.1.0)
|
|||||||
set(MBEDTLS_MINIMUM 2.7)
|
set(MBEDTLS_MINIMUM 2.7)
|
||||||
set(NPM_MINIMUM 10.2.3) # Node.js 20.10 (eslint-plugin-unicorn)
|
set(NPM_MINIMUM 10.2.3) # Node.js 20.10 (eslint-plugin-unicorn)
|
||||||
set(PSL_MINIMUM 0.21.1)
|
set(PSL_MINIMUM 0.21.1)
|
||||||
set(QT_MINIMUM 5.6)
|
set(QT_MINIMUM 5.15)
|
||||||
|
|
||||||
option(ENABLE_DAEMON "Build daemon" ON)
|
option(ENABLE_DAEMON "Build daemon" ON)
|
||||||
tr_auto_option(ENABLE_GTK "Build GTK client" AUTO)
|
tr_auto_option(ENABLE_GTK "Build GTK client" AUTO)
|
||||||
|
|||||||
@@ -414,12 +414,8 @@ void DetailsDialog::onButtonBoxClicked(QAbstractButton* button)
|
|||||||
|
|
||||||
QString const re = QStringLiteral("((,|;)\\s*)");
|
QString const re = QStringLiteral("((,|;)\\s*)");
|
||||||
|
|
||||||
//see https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum
|
// 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
|
|
||||||
QStringList const labels_list = labels_text.split(QRegularExpression(re), Qt::SkipEmptyParts);
|
QStringList const labels_list = labels_text.split(QRegularExpression(re), Qt::SkipEmptyParts);
|
||||||
#endif
|
|
||||||
|
|
||||||
torrentSet(TR_KEY_labels, labels_list);
|
torrentSet(TR_KEY_labels, labels_list);
|
||||||
|
|
||||||
|
|||||||
@@ -313,11 +313,7 @@ Prefs::Prefs(QString config_dir)
|
|||||||
case QMetaType::QDateTime:
|
case QMetaType::QDateTime:
|
||||||
if (auto const value = getValue<time_t>(b); value)
|
if (auto const value = getValue<time_t>(b); value)
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
|
|
||||||
values_[i].setValue(QDateTime::fromSecsSinceEpoch(*value));
|
values_[i].setValue(QDateTime::fromSecsSinceEpoch(*value));
|
||||||
#else
|
|
||||||
values_[i].setValue(QDateTime::fromTime_t(*value));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -395,11 +391,7 @@ Prefs::~Prefs()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case QMetaType::QDateTime:
|
case QMetaType::QDateTime:
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
|
|
||||||
dictAdd(¤t_settings, key, int64_t{ val.toDateTime().toSecsSinceEpoch() });
|
dictAdd(¤t_settings, key, int64_t{ val.toDateTime().toSecsSinceEpoch() });
|
||||||
#else
|
|
||||||
dictAdd(¤t_settings, key, val.toDateTime().toTime_t());
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
19
qt/Utils.h
19
qt/Utils.h
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstddef> // size_t
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
@@ -19,24 +18,6 @@ class QHeaderView;
|
|||||||
class QIcon;
|
class QIcon;
|
||||||
class QModelIndex;
|
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
|
class Utils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user