remove qt5compat

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2025-09-24 13:49:17 +03:00
parent bf5b03b4ff
commit 074846d72a
11 changed files with 20 additions and 23 deletions

View File

@@ -79,5 +79,5 @@ runs:
aqtversion: "==3.1.*"
version: ${{ inputs.qt-version }}
arch: ${{ inputs.qt-architecture }}
modules: qt5compat qtimageformats qtnetworkauth
modules: qtimageformats qtnetworkauth
cache: ${{ inputs.build-type == 'Debug' }}

View File

@@ -76,7 +76,6 @@ runs:
qt6-base:p
qt6-svg:p
qt6-imageformats:p
qt6-5compat:p
qt6-networkauth:p
cmark:p
qrencode:p

View File

@@ -323,10 +323,9 @@ endif()
include(QtVersionlessBackport)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
set(QT_VERSION_MAJOR 6)
find_package(Qt6 REQUIRED COMPONENTS Core CoreTools Widgets Concurrent Network Test Xml Core5Compat NetworkAuth OpenGL)
find_package(Qt6 REQUIRED COMPONENTS Core CoreTools Widgets Concurrent Network Test Xml NetworkAuth OpenGL)
find_package(Qt6 COMPONENTS DBus)
list(APPEND Launcher_QT_DBUS Qt6::DBus)
list(APPEND Launcher_QT_LIBS Qt6::Core5Compat)
else()
message(FATAL_ERROR "Qt version ${Launcher_QT_VERSION_MAJOR} is not supported")
endif()

View File

@@ -36,10 +36,10 @@
#include "LoggedProcess.h"
#include <QDebug>
#include <QTextDecoder>
#include <QStringDecoder>
#include "MessageLevel.h"
LoggedProcess::LoggedProcess(const QTextCodec* output_codec, QObject* parent)
LoggedProcess::LoggedProcess(const QStringConverter::Encoding output_codec, QObject* parent)
: QProcess(parent), m_err_decoder(output_codec), m_out_decoder(output_codec)
{
// QProcess has a strange interface... let's map a lot of those into a few.
@@ -57,9 +57,9 @@ LoggedProcess::~LoggedProcess()
}
}
QStringList LoggedProcess::reprocess(const QByteArray& data, QTextDecoder& decoder)
QStringList LoggedProcess::reprocess(const QByteArray& data, QStringDecoder& decoder)
{
auto str = decoder.toUnicode(data);
QString str = decoder(data);
if (!m_leftover_line.isEmpty()) {
str.prepend(m_leftover_line);

View File

@@ -36,7 +36,7 @@
#pragma once
#include <QProcess>
#include <QTextDecoder>
#include <QStringDecoder>
#include "MessageLevel.h"
/*
@@ -49,7 +49,7 @@ class LoggedProcess : public QProcess {
enum State { NotRunning, Starting, FailedToStart, Running, Finished, Crashed, Aborted };
public:
explicit LoggedProcess(const QTextCodec* output_codec = QTextCodec::codecForLocale(), QObject* parent = 0);
explicit LoggedProcess(QStringConverter::Encoding outputEncoding = QStringConverter::System, QObject* parent = nullptr);
virtual ~LoggedProcess();
State state() const;
@@ -77,11 +77,11 @@ class LoggedProcess : public QProcess {
private:
void changeState(LoggedProcess::State state);
QStringList reprocess(const QByteArray& data, QTextDecoder& decoder);
QStringList reprocess(const QByteArray& data, QStringDecoder& decoder);
private:
QTextDecoder m_err_decoder;
QTextDecoder m_out_decoder;
QStringDecoder m_err_decoder;
QStringDecoder m_out_decoder;
QString m_leftover_line;
bool m_killed = false;
State m_state = NotRunning;

View File

@@ -50,7 +50,7 @@
LauncherPartLaunch::LauncherPartLaunch(LaunchTask* parent)
: LaunchStep(parent)
, m_process(parent->instance()->getJavaVersion().defaultsToUtf8() ? QTextCodec::codecForName("UTF-8") : QTextCodec::codecForLocale())
, m_process(parent->instance()->getJavaVersion().defaultsToUtf8() ? QStringConverter::Utf8 : QStringConverter::System)
{
if (parent->instance()->settings()->get("CloseAfterLaunch").toBool()) {
static const QRegularExpression s_settingUser(".*Setting user.+", QRegularExpression::CaseInsensitiveOption);

View File

@@ -48,9 +48,12 @@ namespace {
QString getCreditsHtml()
{
QFile dataFile(":/documents/credits.html");
dataFile.open(QIODevice::ReadOnly);
if (!dataFile.open(QIODevice::ReadOnly)) {
qWarning() << "Failed to open file '" << dataFile.fileName() << "' for reading!";
return {};
}
QString fileContent = QString::fromUtf8(dataFile.readAll());
dataFile.close();
return fileContent.arg(QObject::tr("%1 Developers").arg(BuildConfig.LAUNCHER_DISPLAYNAME), QObject::tr("MultiMC Developers"),
QObject::tr("With special thanks to"));

View File

@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.15)
project(LocalPeer)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Network Core5Compat REQUIRED)
list(APPEND LocalPeer_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
find_package(Qt6 COMPONENTS Core Network REQUIRED)
endif()
set(SINGLE_SOURCES

View File

@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.15)
project(qdcss)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
list(APPEND qdcss_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
find_package(Qt6 COMPONENTS Core REQUIRED)
endif()
set(QDCSS_SOURCES

View File

@@ -1,8 +1,7 @@
project(systeminfo)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
list(APPEND systeminfo_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
find_package(Qt6 COMPONENTS Core REQUIRED)
endif()
set(systeminfo_SOURCES

View File

@@ -77,7 +77,6 @@ stdenv.mkDerivation {
cmark
kdePackages.qtbase
kdePackages.qtnetworkauth
kdePackages.qt5compat
qrencode
libarchive
tomlplusplus