Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-08-15 00:33:24 +03:00
commit 0ba88ff138
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
9 changed files with 47 additions and 38 deletions

View File

@ -158,7 +158,7 @@ jobs:
- name: Setup ccache
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:
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}

24
flake.lock generated
View File

@ -21,11 +21,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1688466019,
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
"lastModified": 1690933134,
"narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
"rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
"type": "github"
},
"original": {
@ -91,11 +91,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1690630721,
"narHash": "sha256-Y04onHyBQT4Erfr2fc82dbJTfXGYrf4V0ysLUYnPOP8=",
"lastModified": 1691218994,
"narHash": "sha256-46GJ5vLf9H+Oh7Jii2gJI9GATJHGbx2iQpon5nUSFPI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d2b52322f35597c62abf56de91b0236746b2a03d",
"rev": "0d2fb29f5071a12d7983319c2c2576be6a130582",
"type": "github"
},
"original": {
@ -108,11 +108,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1688049487,
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
"lastModified": 1690881714,
"narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
"rev": "9e1960bc196baf6881340d53dccb203a951745a2",
"type": "github"
},
"original": {
@ -138,11 +138,11 @@
]
},
"locked": {
"lastModified": 1690628027,
"narHash": "sha256-OTSbA2hM6VmxyZ/4siYPANffMBzIsKu04GLjXcv8ST0=",
"lastModified": 1691256628,
"narHash": "sha256-M0YXHemR3zbyhM7PvJa5lzGhWVf6kM/fpZ4cWe/VIhI=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "1e2443dd3f669eb65433b2fc26a3065e05a7dc9c",
"rev": "3139c4d1f7732cab89f06492bdd4677b877e3785",
"type": "github"
},
"original": {

View File

@ -354,11 +354,11 @@ bool FlameCreationTask::createInstance()
id.remove("forge-");
loaderType = "forge";
loaderUid = "net.minecraftforge";
} else if (loaderType == "fabric") {
} else if (id.startsWith("fabric-")) {
id.remove("fabric-");
loaderType = "fabric";
loaderUid = "net.fabricmc.fabric-loader";
} else if (loaderType == "quilt") {
} else if (id.startsWith("quilt-")) {
id.remove("quilt-");
loaderType = "quilt";
loaderUid = "org.quiltmc.quilt-loader";

View File

@ -40,7 +40,6 @@ namespace Net {
class Validator {
public: /* con/des */
Validator() {}
virtual ~Validator() {}
public: /* methods */

View File

@ -61,7 +61,6 @@ struct TaskStepProgress {
TaskStepState state = TaskStepState::Waiting;
TaskStepProgress() { this->uid = QUuid::createUuid(); }
TaskStepProgress(QUuid uid_) : uid(uid_) {}
bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }

View File

@ -3,6 +3,9 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "ManagedPackPage.h"
#include <QDesktopServices>
#include <QUrl>
#include <QUrlQuery>
#include "ui_ManagedPackPage.h"
#include <QListView>
@ -105,6 +108,19 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi
// Pretend we're opening the page again
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()

View File

@ -168,10 +168,13 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTextBrowser" name="changelogTextBrowser">
<widget class="ProjectDescriptionPage" name="changelogTextBrowser">
<property name="placeholderText">
<string>No changelog available for this version!</string>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -188,6 +191,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ProjectDescriptionPage</class>
<extends>QTextBrowser</extends>
<header>ui/widgets/ProjectDescriptionPage.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -354,14 +354,8 @@ class ServersModel : public QAbstractListModel {
}
}
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;
}
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; }
Server* at(int index)
{
@ -445,10 +439,7 @@ class ServersModel : public QAbstractListModel {
qDebug() << "Changed:" << path;
load();
}
void fileChanged(const QString& path)
{
qDebug() << "Changed:" << path;
}
void fileChanged(const QString& path) { qDebug() << "Changed:" << path; }
private slots:
void save_internal()
@ -492,10 +483,7 @@ class ServersModel : public QAbstractListModel {
m_saveTimer.stop();
}
bool saveIsScheduled() const
{
return m_dirty;
}
bool saveIsScheduled() const { return m_dirty; }
void updateFSObserver()
{

View File

@ -353,10 +353,7 @@ class FileSystemTest : public QObject {
}
}
void test_getDesktop()
{
QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
}
void test_getDesktop() { QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); }
void test_link()
{