Deprecate QT5 support (#4751)

* Remove Qt5 Compatibility
* Remove QT compiler directives < QT6.5.3, set QT6.5.3 as minimum GC version
* Remove references to QT5 Video
Fixes #4750
This commit is contained in:
Paul Johnson
2025-12-18 13:37:55 +00:00
committed by GitHub
parent 9bb90e3737
commit c67d913f11
109 changed files with 225 additions and 922 deletions

View File

@@ -18,11 +18,7 @@
#include "httprequesthandler.h"
/** Alias type definition, for compatibility to different Qt versions */
#if QT_VERSION >= 0x050000
typedef qintptr tSocketDescriptor;
#else
typedef int tSocketDescriptor;
#endif
typedef qintptr tSocketDescriptor;
/** Alias for QSslConfiguration if OpenSSL is not supported */
#ifdef QT_NO_OPENSSL

View File

@@ -155,7 +155,7 @@ QSize FlowLayout::sizeHint() const
QSize FlowLayout::minimumSize() const
{
QSize size;
for (const QLayoutItem *item : qAsConst(itemList))
for (const QLayoutItem *item : std::as_const(itemList))
size = size.expandedTo(item->minimumSize());
const QMargins margins = contentsMargins();
@@ -176,7 +176,7 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
//! [9]
QList<int> lineHeights;
for (QLayoutItem *item : qAsConst(itemList)) {
for (QLayoutItem *item : std::as_const(itemList)) {
const QWidget *wid = item->widget();
int spaceX = horizontalSpacing();
if (spaceX == -1)
@@ -207,7 +207,7 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
int row = 0;
//! [10]
for (QLayoutItem *item : qAsConst(itemList)) {
for (QLayoutItem *item : std::as_const(itemList)) {
lineHeight = lineHeights.value(row, item->sizeHint().height());
const QWidget *wid = item->widget();
int spaceX = horizontalSpacing();

View File

@@ -625,16 +625,6 @@ void QxtSpanSlider::mousePressEvent(QMouseEvent* event)
*/
void QxtSpanSlider::mouseMoveEvent(QMouseEvent* event)
{
// hack for uncompressed mouse events
#if defined(Q_OS_LINUX) && (QT_VERSION > 0x050000) && (QT_VERSION < 0x050600)
static QTime p;
if (p.elapsed() > 0 && p.elapsed() < 100) {
event->ignore();
return;
}
p.start();
#endif
if (qxt_d().lowerPressed != QStyle::SC_SliderHandle && qxt_d().upperPressed != QStyle::SC_SliderHandle)
{
event->ignore();

View File

@@ -75,7 +75,7 @@ int QxtStringSpinBoxPrivate::startsWith(const QString& start, QString& string) c
*/
QxtStringSpinBox::QxtStringSpinBox(QWidget* pParent) : QSpinBox(pParent)
{
#if (!defined Q_OS_MAC) && (QT_VERSION >= 0x050000)
#if (!defined Q_OS_MAC)
setStyle(QStyleFactory::create("fusion"));
#endif
setRange(0, 0);

View File

@@ -739,7 +739,7 @@ void ZipWriterPrivate::addEntry(EntryType type, const QString &fileName, const Q
*/
ZipReader::ZipReader(const QString &archive, QIODevice::OpenMode mode)
{
QScopedPointer<QFile> f(new QFile(archive));
std::unique_ptr<QFile> f = std::make_unique<QFile>(archive);
f->open(mode);
ZipReader::Status status;
if (f->error() == QFile::NoError)
@@ -755,8 +755,7 @@ ZipReader::ZipReader(const QString &archive, QIODevice::OpenMode mode)
status = FileError;
}
d = new ZipReaderPrivate(f.data(), /*ownDevice=*/true);
f.take();
d = new ZipReaderPrivate(&(*f), /*ownDevice=*/true);
d->status = status;
}
@@ -1024,7 +1023,7 @@ void ZipReader::close()
*/
ZipWriter::ZipWriter(const QString &fileName, QIODevice::OpenMode mode)
{
QScopedPointer<QFile> f(new QFile(fileName));
std::unique_ptr<QFile> f = std::make_unique<QFile>(fileName);
f->open(mode);
ZipWriter::Status status;
if (f->error() == QFile::NoError)
@@ -1040,8 +1039,7 @@ ZipWriter::ZipWriter(const QString &fileName, QIODevice::OpenMode mode)
status = ZipWriter::FileError;
}
d = new ZipWriterPrivate(f.data(), /*ownDevice=*/true);
f.take();
d = new ZipWriterPrivate(&(*f), /*ownDevice=*/true);
d->status = status;
}