mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Remove support for Qt 5 (#2174)
This commit is contained in:
commit
3df98dd5e7
42 changed files with 48 additions and 272 deletions
|
|
@ -1,9 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(LocalPeer)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
find_package(Qt5 COMPONENTS Core Network REQUIRED)
|
||||
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
find_package(Qt6 COMPONENTS Core Network Core5Compat REQUIRED)
|
||||
list(APPEND LocalPeer_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ ApplicationId ApplicationId::fromTraditionalApp()
|
|||
prefix.remove(QRegularExpression("[^a-zA-Z]"));
|
||||
prefix.truncate(6);
|
||||
QByteArray idc = protoId.toUtf8();
|
||||
quint16 idNum = qChecksum(idc.constData(), idc.size());
|
||||
quint16 idNum = qChecksum(idc);
|
||||
auto socketName = QLatin1String("pl") + prefix + QLatin1Char('-') + QString::number(idNum, 16).left(12);
|
||||
#if defined(Q_OS_WIN)
|
||||
if (!pProcessIdToSessionId) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(qdcss)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
|
||||
list(APPEND qdcss_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(rainbow)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
find_package(Qt5 COMPONENTS Core Gui REQUIRED)
|
||||
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
find_package(Qt6 COMPONENTS Core Gui REQUIRED)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
project(systeminfo)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 5)
|
||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
|
||||
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
|
||||
list(APPEND systeminfo_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -145,11 +145,7 @@ void Sys::lsb_postprocess(Sys::LsbInfo& lsb, Sys::DistributionInfo& out)
|
|||
vers = lsb.codename;
|
||||
} else {
|
||||
// ubuntu, debian, gentoo, scientific, slackware, ... ?
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
auto parts = dist.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
|
||||
#else
|
||||
auto parts = dist.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
|
||||
#endif
|
||||
if (parts.size()) {
|
||||
dist = parts[0];
|
||||
}
|
||||
|
|
@ -182,11 +178,7 @@ QString Sys::_extract_distribution(const QString& x)
|
|||
if (release.startsWith("suse linux enterprise")) {
|
||||
return "sles";
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList list = release.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList list = release.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
|
||||
#endif
|
||||
if (list.size()) {
|
||||
return list[0];
|
||||
}
|
||||
|
|
@ -196,11 +188,7 @@ QString Sys::_extract_distribution(const QString& x)
|
|||
QString Sys::_extract_version(const QString& x)
|
||||
{
|
||||
QRegularExpression versionish_string(QRegularExpression::anchoredPattern("\\d+(?:\\.\\d+)*$"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList list = x.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList list = x.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
|
||||
#endif
|
||||
for (int i = list.size() - 1; i >= 0; --i) {
|
||||
QString chunk = list[i];
|
||||
if (versionish_string.match(chunk).hasMatch()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue