format
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
ebde563648
commit
b8d9c3d779
@ -61,7 +61,6 @@ class FileSystemException : public ::Exception {
|
|||||||
*/
|
*/
|
||||||
void write(const QString& filename, const QByteArray& data);
|
void write(const QString& filename, const QByteArray& data);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* append data to a file safely
|
* append data to a file safely
|
||||||
*/
|
*/
|
||||||
@ -72,7 +71,6 @@ void appendSafe(const QString& filename, const QByteArray& data);
|
|||||||
*/
|
*/
|
||||||
void append(const QString& filename, const QByteArray& data);
|
void append(const QString& filename, const QByteArray& data);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* read data from a file safely\
|
* read data from a file safely\
|
||||||
*/
|
*/
|
||||||
|
@ -510,4 +510,3 @@ bool ExportToZipTask::abort()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace MMCZip
|
} // namespace MMCZip
|
||||||
|
|
||||||
|
@ -151,7 +151,6 @@ bool extractFile(QString fileCompressed, QString file, QString dir);
|
|||||||
*/
|
*/
|
||||||
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter);
|
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter);
|
||||||
|
|
||||||
|
|
||||||
#if defined(LAUNCHER_APPLICATION)
|
#if defined(LAUNCHER_APPLICATION)
|
||||||
class ExportToZipTask : public Task {
|
class ExportToZipTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
#include <QPair>
|
#include <QPair>
|
||||||
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
@ -41,17 +41,10 @@ class FileLinkApp : public QCoreApplication {
|
|||||||
// friends for the purpose of limiting access to deprecated stuff
|
// friends for the purpose of limiting access to deprecated stuff
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum Status {
|
enum Status { Starting, Failed, Succeeded, Initialized };
|
||||||
Starting,
|
|
||||||
Failed,
|
|
||||||
Succeeded,
|
|
||||||
Initialized
|
|
||||||
};
|
|
||||||
FileLinkApp(int& argc, char** argv);
|
FileLinkApp(int& argc, char** argv);
|
||||||
virtual ~FileLinkApp();
|
virtual ~FileLinkApp();
|
||||||
Status status() const {
|
Status status() const { return m_status; }
|
||||||
return m_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void joinServer(QString server);
|
void joinServer(QString server);
|
||||||
|
@ -26,10 +26,9 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
FileLinkApp ldh(argc, argv);
|
FileLinkApp ldh(argc, argv);
|
||||||
|
|
||||||
switch(ldh.status()) {
|
switch (ldh.status()) {
|
||||||
case FileLinkApp::Starting:
|
case FileLinkApp::Starting:
|
||||||
case FileLinkApp::Initialized:
|
case FileLinkApp::Initialized: {
|
||||||
{
|
|
||||||
return ldh.exec();
|
return ldh.exec();
|
||||||
}
|
}
|
||||||
case FileLinkApp::Failed:
|
case FileLinkApp::Failed:
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "net/ApiUpload.h"
|
#include "net/ApiUpload.h"
|
||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "net/Upload.h"
|
#include "net/Upload.h"
|
||||||
#include "net/ApiDownload.h"
|
|
||||||
|
|
||||||
Task::Ptr ModrinthAPI::currentVersion(QString hash, QString hash_format, std::shared_ptr<QByteArray> response)
|
Task::Ptr ModrinthAPI::currentVersion(QString hash, QString hash_format, std::shared_ptr<QByteArray> response)
|
||||||
{
|
{
|
||||||
|
@ -676,8 +676,7 @@ void MainWindow::repopulateAccountsMenu()
|
|||||||
|
|
||||||
void MainWindow::updatesAllowedChanged(bool allowed)
|
void MainWindow::updatesAllowedChanged(bool allowed)
|
||||||
{
|
{
|
||||||
if(!APPLICATION->updaterEnabled())
|
if (!APPLICATION->updaterEnabled()) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ui->actionCheckUpdate->setEnabled(allowed);
|
ui->actionCheckUpdate->setEnabled(allowed);
|
||||||
@ -1209,8 +1208,7 @@ void MainWindow::refreshInstances()
|
|||||||
|
|
||||||
void MainWindow::checkForUpdates()
|
void MainWindow::checkForUpdates()
|
||||||
{
|
{
|
||||||
if(APPLICATION->updaterEnabled())
|
if (APPLICATION->updaterEnabled()) {
|
||||||
{
|
|
||||||
APPLICATION->triggerUpdateCheck();
|
APPLICATION->triggerUpdateCheck();
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "Updater not set up. Cannot check for updates.";
|
qWarning() << "Updater not set up. Cannot check for updates.";
|
||||||
|
@ -46,17 +46,17 @@ UpdateAvailableDialog::UpdateAvailableDialog(const QString& currentVersion,
|
|||||||
ui->releaseNotes->setHtml(releaseNotesHtml);
|
ui->releaseNotes->setHtml(releaseNotesHtml);
|
||||||
ui->releaseNotes->setOpenExternalLinks(true);
|
ui->releaseNotes->setOpenExternalLinks(true);
|
||||||
|
|
||||||
connect(ui->skipButton, &QPushButton::clicked, this, [this](){
|
connect(ui->skipButton, &QPushButton::clicked, this, [this]() {
|
||||||
setResult(ResultCode::Skip);
|
setResult(ResultCode::Skip);
|
||||||
done(ResultCode::Skip);
|
done(ResultCode::Skip);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->delayButton, &QPushButton::clicked, this, [this](){
|
connect(ui->delayButton, &QPushButton::clicked, this, [this]() {
|
||||||
setResult(ResultCode::DontInstall);
|
setResult(ResultCode::DontInstall);
|
||||||
done(ResultCode::DontInstall);
|
done(ResultCode::DontInstall);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->installButton, &QPushButton::clicked, this, [this](){
|
connect(ui->installButton, &QPushButton::clicked, this, [this]() {
|
||||||
setResult(ResultCode::Install);
|
setResult(ResultCode::Install);
|
||||||
done(ResultCode::Install);
|
done(ResultCode::Install);
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,6 @@ class UpdateAvailableDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum ResultCode {
|
enum ResultCode {
|
||||||
Install = 10,
|
Install = 10,
|
||||||
DontInstall = 11,
|
DontInstall = 11,
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
#include "Version.h"
|
|
||||||
#include "GitHubRelease.h"
|
#include "GitHubRelease.h"
|
||||||
|
#include "Version.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class SelectReleaseDialog;
|
class SelectReleaseDialog;
|
||||||
|
Loading…
Reference in New Issue
Block a user