Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into staging
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
commit
0ba88ff138
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -158,7 +158,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
|
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.9
|
uses: hendrikmuhs/ccache-action@v1.2.10
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
|
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
|
||||||
|
|
||||||
|
24
flake.lock
generated
24
flake.lock
generated
@ -21,11 +21,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1688466019,
|
"lastModified": 1690933134,
|
||||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
"narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
"rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -91,11 +91,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690630721,
|
"lastModified": 1691218994,
|
||||||
"narHash": "sha256-Y04onHyBQT4Erfr2fc82dbJTfXGYrf4V0ysLUYnPOP8=",
|
"narHash": "sha256-46GJ5vLf9H+Oh7Jii2gJI9GATJHGbx2iQpon5nUSFPI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d2b52322f35597c62abf56de91b0236746b2a03d",
|
"rev": "0d2fb29f5071a12d7983319c2c2576be6a130582",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -108,11 +108,11 @@
|
|||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
"lastModified": 1688049487,
|
"lastModified": 1690881714,
|
||||||
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
|
"narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
|
"rev": "9e1960bc196baf6881340d53dccb203a951745a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -138,11 +138,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690628027,
|
"lastModified": 1691256628,
|
||||||
"narHash": "sha256-OTSbA2hM6VmxyZ/4siYPANffMBzIsKu04GLjXcv8ST0=",
|
"narHash": "sha256-M0YXHemR3zbyhM7PvJa5lzGhWVf6kM/fpZ4cWe/VIhI=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "1e2443dd3f669eb65433b2fc26a3065e05a7dc9c",
|
"rev": "3139c4d1f7732cab89f06492bdd4677b877e3785",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -354,11 +354,11 @@ bool FlameCreationTask::createInstance()
|
|||||||
id.remove("forge-");
|
id.remove("forge-");
|
||||||
loaderType = "forge";
|
loaderType = "forge";
|
||||||
loaderUid = "net.minecraftforge";
|
loaderUid = "net.minecraftforge";
|
||||||
} else if (loaderType == "fabric") {
|
} else if (id.startsWith("fabric-")) {
|
||||||
id.remove("fabric-");
|
id.remove("fabric-");
|
||||||
loaderType = "fabric";
|
loaderType = "fabric";
|
||||||
loaderUid = "net.fabricmc.fabric-loader";
|
loaderUid = "net.fabricmc.fabric-loader";
|
||||||
} else if (loaderType == "quilt") {
|
} else if (id.startsWith("quilt-")) {
|
||||||
id.remove("quilt-");
|
id.remove("quilt-");
|
||||||
loaderType = "quilt";
|
loaderType = "quilt";
|
||||||
loaderUid = "org.quiltmc.quilt-loader";
|
loaderUid = "org.quiltmc.quilt-loader";
|
||||||
|
@ -40,7 +40,6 @@ namespace Net {
|
|||||||
class Validator {
|
class Validator {
|
||||||
public: /* con/des */
|
public: /* con/des */
|
||||||
Validator() {}
|
Validator() {}
|
||||||
|
|
||||||
virtual ~Validator() {}
|
virtual ~Validator() {}
|
||||||
|
|
||||||
public: /* methods */
|
public: /* methods */
|
||||||
|
@ -61,7 +61,6 @@ struct TaskStepProgress {
|
|||||||
TaskStepState state = TaskStepState::Waiting;
|
TaskStepState state = TaskStepState::Waiting;
|
||||||
|
|
||||||
TaskStepProgress() { this->uid = QUuid::createUuid(); }
|
TaskStepProgress() { this->uid = QUuid::createUuid(); }
|
||||||
|
|
||||||
TaskStepProgress(QUuid uid_) : uid(uid_) {}
|
TaskStepProgress(QUuid uid_) : uid(uid_) {}
|
||||||
|
|
||||||
bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }
|
bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
#include "ManagedPackPage.h"
|
#include "ManagedPackPage.h"
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QUrlQuery>
|
||||||
#include "ui_ManagedPackPage.h"
|
#include "ui_ManagedPackPage.h"
|
||||||
|
|
||||||
#include <QListView>
|
#include <QListView>
|
||||||
@ -105,6 +108,19 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi
|
|||||||
// Pretend we're opening the page again
|
// Pretend we're opening the page again
|
||||||
openedImpl();
|
openedImpl();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->changelogTextBrowser, &QTextBrowser::anchorClicked, this, [](const QUrl url) {
|
||||||
|
if (url.scheme().isEmpty()) {
|
||||||
|
auto querry =
|
||||||
|
QUrlQuery(url.query()).queryItemValue("remoteUrl", QUrl::FullyDecoded); // curseforge workaround for linkout?remoteUrl=
|
||||||
|
auto decoded = QUrl::fromPercentEncoding(querry.toUtf8());
|
||||||
|
auto newUrl = QUrl(decoded);
|
||||||
|
if (newUrl.isValid() && (newUrl.scheme() == "http" || newUrl.scheme() == "https"))
|
||||||
|
QDesktopServices ::openUrl(newUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QDesktopServices::openUrl(url);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ManagedPackPage::~ManagedPackPage()
|
ManagedPackPage::~ManagedPackPage()
|
||||||
|
@ -168,10 +168,13 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="changelogTextBrowser">
|
<widget class="ProjectDescriptionPage" name="changelogTextBrowser">
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>No changelog available for this version!</string>
|
<string>No changelog available for this version!</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="openLinks">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -188,6 +191,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>ProjectDescriptionPage</class>
|
||||||
|
<extends>QTextBrowser</extends>
|
||||||
|
<header>ui/widgets/ProjectDescriptionPage.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -354,14 +354,8 @@ class ServersModel : public QAbstractListModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override
|
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override { return parent.isValid() ? 0 : m_servers.size(); }
|
||||||
{
|
int columnCount(const QModelIndex& parent) const override { return parent.isValid() ? 0 : COLUMN_COUNT; }
|
||||||
return parent.isValid() ? 0 : m_servers.size();
|
|
||||||
}
|
|
||||||
int columnCount(const QModelIndex& parent) const override
|
|
||||||
{
|
|
||||||
return parent.isValid() ? 0 : COLUMN_COUNT;
|
|
||||||
}
|
|
||||||
|
|
||||||
Server* at(int index)
|
Server* at(int index)
|
||||||
{
|
{
|
||||||
@ -445,10 +439,7 @@ class ServersModel : public QAbstractListModel {
|
|||||||
qDebug() << "Changed:" << path;
|
qDebug() << "Changed:" << path;
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
void fileChanged(const QString& path)
|
void fileChanged(const QString& path) { qDebug() << "Changed:" << path; }
|
||||||
{
|
|
||||||
qDebug() << "Changed:" << path;
|
|
||||||
}
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void save_internal()
|
void save_internal()
|
||||||
@ -492,10 +483,7 @@ class ServersModel : public QAbstractListModel {
|
|||||||
m_saveTimer.stop();
|
m_saveTimer.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool saveIsScheduled() const
|
bool saveIsScheduled() const { return m_dirty; }
|
||||||
{
|
|
||||||
return m_dirty;
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateFSObserver()
|
void updateFSObserver()
|
||||||
{
|
{
|
||||||
|
@ -353,10 +353,7 @@ class FileSystemTest : public QObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_getDesktop()
|
void test_getDesktop() { QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); }
|
||||||
{
|
|
||||||
QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
|
|
||||||
}
|
|
||||||
|
|
||||||
void test_link()
|
void test_link()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user