Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-09-26 20:19:35 +03:00
parent ebde563648
commit b8d9c3d779
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
12 changed files with 13 additions and 29 deletions

View File

@ -61,7 +61,6 @@ class FileSystemException : public ::Exception {
*/
void write(const QString& filename, const QByteArray& data);
/**
* 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);
/**
* read data from a file safely\
*/

View File

@ -510,4 +510,3 @@ bool ExportToZipTask::abort()
#endif
} // namespace MMCZip

View File

@ -151,7 +151,6 @@ bool extractFile(QString fileCompressed, QString file, QString dir);
*/
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter);
#if defined(LAUNCHER_APPLICATION)
class ExportToZipTask : public Task {
public:

View File

@ -36,8 +36,8 @@
#pragma once
#include <QString>
#include <QPair>
#include <QString>
#include <QUrl>
#include <utility>

View File

@ -41,17 +41,10 @@ class FileLinkApp : public QCoreApplication {
// friends for the purpose of limiting access to deprecated stuff
Q_OBJECT
public:
enum Status {
Starting,
Failed,
Succeeded,
Initialized
};
enum Status { Starting, Failed, Succeeded, Initialized };
FileLinkApp(int& argc, char** argv);
virtual ~FileLinkApp();
Status status() const {
return m_status;
}
Status status() const { return m_status; }
private:
void joinServer(QString server);

View File

@ -26,10 +26,9 @@ int main(int argc, char* argv[])
{
FileLinkApp ldh(argc, argv);
switch(ldh.status()) {
switch (ldh.status()) {
case FileLinkApp::Starting:
case FileLinkApp::Initialized:
{
case FileLinkApp::Initialized: {
return ldh.exec();
}
case FileLinkApp::Failed:

View File

@ -10,7 +10,6 @@
#include "net/ApiUpload.h"
#include "net/NetJob.h"
#include "net/Upload.h"
#include "net/ApiDownload.h"
Task::Ptr ModrinthAPI::currentVersion(QString hash, QString hash_format, std::shared_ptr<QByteArray> response)
{

View File

@ -676,8 +676,7 @@ void MainWindow::repopulateAccountsMenu()
void MainWindow::updatesAllowedChanged(bool allowed)
{
if(!APPLICATION->updaterEnabled())
{
if (!APPLICATION->updaterEnabled()) {
return;
}
ui->actionCheckUpdate->setEnabled(allowed);
@ -1209,8 +1208,7 @@ void MainWindow::refreshInstances()
void MainWindow::checkForUpdates()
{
if(APPLICATION->updaterEnabled())
{
if (APPLICATION->updaterEnabled()) {
APPLICATION->triggerUpdateCheck();
} else {
qWarning() << "Updater not set up. Cannot check for updates.";

View File

@ -46,17 +46,17 @@ UpdateAvailableDialog::UpdateAvailableDialog(const QString& currentVersion,
ui->releaseNotes->setHtml(releaseNotesHtml);
ui->releaseNotes->setOpenExternalLinks(true);
connect(ui->skipButton, &QPushButton::clicked, this, [this](){
connect(ui->skipButton, &QPushButton::clicked, this, [this]() {
setResult(ResultCode::Skip);
done(ResultCode::Skip);
});
connect(ui->delayButton, &QPushButton::clicked, this, [this](){
connect(ui->delayButton, &QPushButton::clicked, this, [this]() {
setResult(ResultCode::DontInstall);
done(ResultCode::DontInstall);
});
connect(ui->installButton, &QPushButton::clicked, this, [this](){
connect(ui->installButton, &QPushButton::clicked, this, [this]() {
setResult(ResultCode::Install);
done(ResultCode::Install);
});

View File

@ -31,7 +31,6 @@ class UpdateAvailableDialog : public QDialog {
Q_OBJECT
public:
enum ResultCode {
Install = 10,
DontInstall = 11,

View File

@ -25,8 +25,8 @@
#include <QDialog>
#include <QTreeWidgetItem>
#include "Version.h"
#include "GitHubRelease.h"
#include "Version.h"
namespace Ui {
class SelectReleaseDialog;