Drop Qt5Compat (#4176)
This commit is contained in:
@@ -79,5 +79,5 @@ runs:
|
|||||||
aqtversion: "==3.1.*"
|
aqtversion: "==3.1.*"
|
||||||
version: ${{ inputs.qt-version }}
|
version: ${{ inputs.qt-version }}
|
||||||
arch: ${{ inputs.qt-architecture }}
|
arch: ${{ inputs.qt-architecture }}
|
||||||
modules: qt5compat qtimageformats qtnetworkauth
|
modules: qtimageformats qtnetworkauth
|
||||||
cache: ${{ inputs.build-type == 'Debug' }}
|
cache: ${{ inputs.build-type == 'Debug' }}
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ runs:
|
|||||||
qt6-base:p
|
qt6-base:p
|
||||||
qt6-svg:p
|
qt6-svg:p
|
||||||
qt6-imageformats:p
|
qt6-imageformats:p
|
||||||
qt6-5compat:p
|
|
||||||
qt6-networkauth:p
|
qt6-networkauth:p
|
||||||
cmark:p
|
cmark:p
|
||||||
qrencode:p
|
qrencode:p
|
||||||
|
|||||||
@@ -323,10 +323,9 @@ endif()
|
|||||||
include(QtVersionlessBackport)
|
include(QtVersionlessBackport)
|
||||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||||
set(QT_VERSION_MAJOR 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)
|
find_package(Qt6 COMPONENTS DBus)
|
||||||
list(APPEND Launcher_QT_DBUS Qt6::DBus)
|
list(APPEND Launcher_QT_DBUS Qt6::DBus)
|
||||||
list(APPEND Launcher_QT_LIBS Qt6::Core5Compat)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Qt version ${Launcher_QT_VERSION_MAJOR} is not supported")
|
message(FATAL_ERROR "Qt version ${Launcher_QT_VERSION_MAJOR} is not supported")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -36,10 +36,10 @@
|
|||||||
|
|
||||||
#include "LoggedProcess.h"
|
#include "LoggedProcess.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTextDecoder>
|
#include <QStringDecoder>
|
||||||
#include "MessageLevel.h"
|
#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(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.
|
// 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()) {
|
if (!m_leftover_line.isEmpty()) {
|
||||||
str.prepend(m_leftover_line);
|
str.prepend(m_leftover_line);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTextDecoder>
|
#include <QStringDecoder>
|
||||||
#include "MessageLevel.h"
|
#include "MessageLevel.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -49,7 +49,7 @@ class LoggedProcess : public QProcess {
|
|||||||
enum State { NotRunning, Starting, FailedToStart, Running, Finished, Crashed, Aborted };
|
enum State { NotRunning, Starting, FailedToStart, Running, Finished, Crashed, Aborted };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LoggedProcess(const QTextCodec* output_codec = QTextCodec::codecForLocale(), QObject* parent = 0);
|
explicit LoggedProcess(QStringConverter::Encoding outputEncoding = QStringConverter::System, QObject* parent = nullptr);
|
||||||
virtual ~LoggedProcess();
|
virtual ~LoggedProcess();
|
||||||
|
|
||||||
State state() const;
|
State state() const;
|
||||||
@@ -77,11 +77,11 @@ class LoggedProcess : public QProcess {
|
|||||||
private:
|
private:
|
||||||
void changeState(LoggedProcess::State state);
|
void changeState(LoggedProcess::State state);
|
||||||
|
|
||||||
QStringList reprocess(const QByteArray& data, QTextDecoder& decoder);
|
QStringList reprocess(const QByteArray& data, QStringDecoder& decoder);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTextDecoder m_err_decoder;
|
QStringDecoder m_err_decoder;
|
||||||
QTextDecoder m_out_decoder;
|
QStringDecoder m_out_decoder;
|
||||||
QString m_leftover_line;
|
QString m_leftover_line;
|
||||||
bool m_killed = false;
|
bool m_killed = false;
|
||||||
State m_state = NotRunning;
|
State m_state = NotRunning;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
LauncherPartLaunch::LauncherPartLaunch(LaunchTask* parent)
|
LauncherPartLaunch::LauncherPartLaunch(LaunchTask* parent)
|
||||||
: LaunchStep(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()) {
|
if (parent->instance()->settings()->get("CloseAfterLaunch").toBool()) {
|
||||||
static const QRegularExpression s_settingUser(".*Setting user.+", QRegularExpression::CaseInsensitiveOption);
|
static const QRegularExpression s_settingUser(".*Setting user.+", QRegularExpression::CaseInsensitiveOption);
|
||||||
|
|||||||
@@ -48,9 +48,12 @@ namespace {
|
|||||||
QString getCreditsHtml()
|
QString getCreditsHtml()
|
||||||
{
|
{
|
||||||
QFile dataFile(":/documents/credits.html");
|
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());
|
QString fileContent = QString::fromUtf8(dataFile.readAll());
|
||||||
|
dataFile.close();
|
||||||
|
|
||||||
return fileContent.arg(QObject::tr("%1 Developers").arg(BuildConfig.LAUNCHER_DISPLAYNAME), QObject::tr("MultiMC Developers"),
|
return fileContent.arg(QObject::tr("%1 Developers").arg(BuildConfig.LAUNCHER_DISPLAYNAME), QObject::tr("MultiMC Developers"),
|
||||||
QObject::tr("With special thanks to"));
|
QObject::tr("With special thanks to"));
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.15)
|
|||||||
project(LocalPeer)
|
project(LocalPeer)
|
||||||
|
|
||||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||||
find_package(Qt6 COMPONENTS Core Network Core5Compat REQUIRED)
|
find_package(Qt6 COMPONENTS Core Network REQUIRED)
|
||||||
list(APPEND LocalPeer_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SINGLE_SOURCES
|
set(SINGLE_SOURCES
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.15)
|
|||||||
project(qdcss)
|
project(qdcss)
|
||||||
|
|
||||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||||
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
|
find_package(Qt6 COMPONENTS Core REQUIRED)
|
||||||
list(APPEND qdcss_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QDCSS_SOURCES
|
set(QDCSS_SOURCES
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
project(systeminfo)
|
project(systeminfo)
|
||||||
|
|
||||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||||
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
|
find_package(Qt6 COMPONENTS Core REQUIRED)
|
||||||
list(APPEND systeminfo_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(systeminfo_SOURCES
|
set(systeminfo_SOURCES
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ stdenv.mkDerivation {
|
|||||||
cmark
|
cmark
|
||||||
kdePackages.qtbase
|
kdePackages.qtbase
|
||||||
kdePackages.qtnetworkauth
|
kdePackages.qtnetworkauth
|
||||||
kdePackages.qt5compat
|
|
||||||
qrencode
|
qrencode
|
||||||
libarchive
|
libarchive
|
||||||
tomlplusplus
|
tomlplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user