Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: sync changes from nixpkgs #22

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
[[fallthrough]];
default: {
qDebug() << "Exiting because update lockfile is present";
QMetaObject::invokeMethod(
this, []() { exit(1); }, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, []() { exit(1); }, Qt::QueuedConnection);
return;
}
}
Expand Down Expand Up @@ -993,8 +992,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
[[fallthrough]];
default: {
qDebug() << "Exiting because update lockfile is present";
QMetaObject::invokeMethod(
this, []() { exit(1); }, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, []() { exit(1); }, Qt::QueuedConnection);
return;
}
}
Expand Down Expand Up @@ -1707,8 +1705,7 @@ QString Application::getJarPath(QString jarFile)
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
FS::PathCombine(m_rootPath, "share", BuildConfig.LAUNCHER_NAME),
#endif
FS::PathCombine(m_rootPath, "jars"),
FS::PathCombine(applicationDirPath(), "jars"),
FS::PathCombine(m_rootPath, "jars"), FS::PathCombine(applicationDirPath(), "jars"),
FS::PathCombine(applicationDirPath(), "..", "jars") // from inside build dir, for debuging
};
for (QString p : potentialPaths) {
Expand Down
2 changes: 1 addition & 1 deletion launcher/BaseInstaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BaseVersion;
class BaseInstaller {
public:
BaseInstaller();
virtual ~BaseInstaller(){};
virtual ~BaseInstaller() {};
bool isApplied(MinecraftInstance* on);

virtual bool add(MinecraftInstance* to);
Expand Down
2 changes: 1 addition & 1 deletion launcher/CreateAuthlibInjectorAccount.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CreateAuthlibInjectorAccount : public NetAction {
}
MinecraftAccountPtr getAccount();

void init() override{};
void init() override {};

protected slots:
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) override {}
Expand Down
2 changes: 1 addition & 1 deletion launcher/InstancePageProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class InstancePageProvider : protected QObject, public BasePageProvider {
public:
explicit InstancePageProvider(InstancePtr parent) { inst = parent; }

virtual ~InstancePageProvider(){};
virtual ~InstancePageProvider() {};
virtual QList<BasePage*> getPages() override
{
QList<BasePage*> values;
Expand Down
2 changes: 1 addition & 1 deletion launcher/JavaCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TestCheck : public QObject {
TestCheck(QWidget* parent, QString path, QString args, int minMem, int maxMem, int permGen)
: m_parent(parent), m_path(path), m_args(args), m_minMem(minMem), m_maxMem(maxMem), m_permGen(permGen)
{}
virtual ~TestCheck(){};
virtual ~TestCheck() {};

void run();

Expand Down
2 changes: 1 addition & 1 deletion launcher/LaunchController.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class LaunchController : public Task {
void executeTask() override;

LaunchController(QObject* parent = nullptr);
virtual ~LaunchController(){};
virtual ~LaunchController() {};

void setInstance(InstancePtr instance) { m_instance = instance; }

Expand Down
2 changes: 1 addition & 1 deletion launcher/MMCZip.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class ExportToZipTask : public Task {
QString destinationPrefix = "",
bool followSymlinks = false,
bool utf8Enabled = false)
: ExportToZipTask(outputPath, QDir(dir), files, destinationPrefix, followSymlinks, utf8Enabled){};
: ExportToZipTask(outputPath, QDir(dir), files, destinationPrefix, followSymlinks, utf8Enabled) {};

virtual ~ExportToZipTask() = default;

Expand Down
2 changes: 1 addition & 1 deletion launcher/NullInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NullInstance : public BaseInstance {
{
setVersionBroken(true);
}
virtual ~NullInstance(){};
virtual ~NullInstance() {};
void saveNow() override {}
void loadSpecificSettings() override { setSpecificSettingsLoaded(true); }
QString getStatusbarDescription() override { return tr("Unknown instance type"); };
Expand Down
2 changes: 1 addition & 1 deletion launcher/VersionProxyModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VersionProxyModel : public QAbstractProxyModel {

public:
VersionProxyModel(QObject* parent = 0);
virtual ~VersionProxyModel(){};
virtual ~VersionProxyModel() {};

virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
Expand Down
2 changes: 1 addition & 1 deletion launcher/icons/IconList.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class IconList : public QAbstractListModel {
Q_OBJECT
public:
explicit IconList(const QStringList& builtinPaths, QString path, QObject* parent = 0);
virtual ~IconList(){};
virtual ~IconList() {};

QIcon getIcon(const QString& key) const;
int getIconIndex(const QString& key) const;
Expand Down
4 changes: 2 additions & 2 deletions launcher/java/JavaCheckerJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ using JavaCheckerJobPtr = shared_qobject_ptr<JavaCheckerJob>;
class JavaCheckerJob : public Task {
Q_OBJECT
public:
explicit JavaCheckerJob(QString job_name) : Task(), m_job_name(job_name){};
virtual ~JavaCheckerJob(){};
explicit JavaCheckerJob(QString job_name) : Task(), m_job_name(job_name) {};
virtual ~JavaCheckerJob() {};

bool addJavaCheckerAction(JavaCheckerPtr base)
{
Expand Down
6 changes: 2 additions & 4 deletions launcher/java/JavaUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ QProcessEnvironment CleanEnviroment()

QStringList stripped = {
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
"LD_LIBRARY_PATH",
"LD_PRELOAD",
"LD_LIBRARY_PATH", "LD_PRELOAD",
#endif
"QT_PLUGIN_PATH",
"QT_FONTPATH"
"QT_PLUGIN_PATH", "QT_FONTPATH"
};
for (auto key : rawenv.keys()) {
auto value = rawenv.value(key);
Expand Down
6 changes: 3 additions & 3 deletions launcher/launch/LaunchStep.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LaunchStep : public Task {
Q_OBJECT
public: /* methods */
explicit LaunchStep(LaunchTask* parent) : Task(nullptr), m_parent(parent) { bind(parent); };
virtual ~LaunchStep(){};
virtual ~LaunchStep() {};

private: /* methods */
void bind(LaunchTask* parent);
Expand All @@ -37,9 +37,9 @@ class LaunchStep : public Task {
void progressReportingRequest();

public slots:
virtual void proceed(){};
virtual void proceed() {};
// called in the opposite order than the Task launch(), used to clean up or otherwise undo things after the launch ends
virtual void finalize(){};
virtual void finalize() {};

protected: /* data */
LaunchTask* m_parent;
Expand Down
2 changes: 1 addition & 1 deletion launcher/launch/LaunchTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class LaunchTask : public Task {

public: /* methods */
static shared_qobject_ptr<LaunchTask> create(InstancePtr inst);
virtual ~LaunchTask(){};
virtual ~LaunchTask() {};

void appendStep(shared_qobject_ptr<LaunchStep> step);
void prependStep(shared_qobject_ptr<LaunchStep> step);
Expand Down
4 changes: 2 additions & 2 deletions launcher/launch/steps/CheckJava.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
class CheckJava : public LaunchStep {
Q_OBJECT
public:
explicit CheckJava(LaunchTask* parent) : LaunchStep(parent){};
virtual ~CheckJava(){};
explicit CheckJava(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~CheckJava() {};

virtual void executeTask();
virtual bool canAbort() const { return false; }
Expand Down
2 changes: 1 addition & 1 deletion launcher/launch/steps/LookupServerAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LookupServerAddress : public LaunchStep {
Q_OBJECT
public:
explicit LookupServerAddress(LaunchTask* parent);
virtual ~LookupServerAddress(){};
virtual ~LookupServerAddress() {};

virtual void executeTask();
virtual bool abort();
Expand Down
2 changes: 1 addition & 1 deletion launcher/launch/steps/PostLaunchCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PostLaunchCommand : public LaunchStep {
Q_OBJECT
public:
explicit PostLaunchCommand(LaunchTask* parent);
virtual ~PostLaunchCommand(){};
virtual ~PostLaunchCommand() {};

virtual void executeTask();
virtual bool abort();
Expand Down
2 changes: 1 addition & 1 deletion launcher/launch/steps/PreLaunchCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PreLaunchCommand : public LaunchStep {
Q_OBJECT
public:
explicit PreLaunchCommand(LaunchTask* parent);
virtual ~PreLaunchCommand(){};
virtual ~PreLaunchCommand() {};

virtual void executeTask();
virtual bool abort();
Expand Down
4 changes: 2 additions & 2 deletions launcher/launch/steps/QuitAfterGameStop.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
class QuitAfterGameStop : public LaunchStep {
Q_OBJECT
public:
explicit QuitAfterGameStop(LaunchTask* parent) : LaunchStep(parent){};
virtual ~QuitAfterGameStop(){};
explicit QuitAfterGameStop(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~QuitAfterGameStop() {};

virtual void executeTask();
virtual bool canAbort() const { return false; }
Expand Down
2 changes: 1 addition & 1 deletion launcher/launch/steps/TextPrint.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TextPrint : public LaunchStep {
public:
explicit TextPrint(LaunchTask* parent, const QStringList& lines, MessageLevel::Enum level);
explicit TextPrint(LaunchTask* parent, const QString& line, MessageLevel::Enum level);
virtual ~TextPrint(){};
virtual ~TextPrint() {};

virtual void executeTask();
virtual bool canAbort() const;
Expand Down
4 changes: 2 additions & 2 deletions launcher/launch/steps/Update.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
class Update : public LaunchStep {
Q_OBJECT
public:
explicit Update(LaunchTask* parent, Net::Mode mode) : LaunchStep(parent), m_mode(mode){};
virtual ~Update(){};
explicit Update(LaunchTask* parent, Net::Mode mode) : LaunchStep(parent), m_mode(mode) {};
virtual ~Update() {};

void executeTask() override;
bool canAbort() const override;
Expand Down
4 changes: 2 additions & 2 deletions launcher/meta/BaseEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

class ParsingValidator : public Net::Validator {
public: /* con/des */
ParsingValidator(Meta::BaseEntity* entity) : m_entity(entity){};
virtual ~ParsingValidator(){};
ParsingValidator(Meta::BaseEntity* entity) : m_entity(entity) {};
virtual ~ParsingValidator() {};

public: /* methods */
bool init(QNetworkRequest&) override { return true; }
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/MinecraftInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MinecraftInstance : public BaseInstance {
Q_OBJECT
public:
MinecraftInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString& rootDir);
virtual ~MinecraftInstance(){};
virtual ~MinecraftInstance() {};
virtual void saveNow() override;

void loadSpecificSettings() override;
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/MinecraftLoadAndCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MinecraftLoadAndCheck : public Task {
Q_OBJECT
public:
explicit MinecraftLoadAndCheck(MinecraftInstance* inst, QObject* parent = 0);
virtual ~MinecraftLoadAndCheck(){};
virtual ~MinecraftLoadAndCheck() {};
void executeTask() override;

private slots:
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/MinecraftUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MinecraftUpdate : public Task {
Q_OBJECT
public:
explicit MinecraftUpdate(MinecraftInstance* inst, QObject* parent = 0);
virtual ~MinecraftUpdate(){};
virtual ~MinecraftUpdate() {};

void executeTask() override;
bool canAbort() const override;
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/auth/AccountTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AccountTask : public Task {
Q_OBJECT
public:
explicit AccountTask(AccountData* data, QObject* parent = 0);
virtual ~AccountTask(){};
virtual ~AccountTask() {};

AccountTaskState m_taskState = AccountTaskState::STATE_CREATED;

Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/launch/ClaimAccount.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ClaimAccount : public LaunchStep {
Q_OBJECT
public:
explicit ClaimAccount(LaunchTask* parent, AuthSessionPtr session);
virtual ~ClaimAccount(){};
virtual ~ClaimAccount() {};

void executeTask() override;
void finalize() override;
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/launch/CreateGameFolders.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CreateGameFolders : public LaunchStep {
Q_OBJECT
public:
explicit CreateGameFolders(LaunchTask* parent);
virtual ~CreateGameFolders(){};
virtual ~CreateGameFolders() {};

virtual void executeTask();
virtual bool canAbort() const { return false; }
Expand Down
4 changes: 2 additions & 2 deletions launcher/minecraft/launch/ExtractNatives.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
class ExtractNatives : public LaunchStep {
Q_OBJECT
public:
explicit ExtractNatives(LaunchTask* parent) : LaunchStep(parent){};
virtual ~ExtractNatives(){};
explicit ExtractNatives(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~ExtractNatives() {};

void executeTask() override;
bool canAbort() const override { return false; }
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/launch/LauncherPartLaunch.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LauncherPartLaunch : public LaunchStep {
Q_OBJECT
public:
explicit LauncherPartLaunch(LaunchTask* parent);
virtual ~LauncherPartLaunch(){};
virtual ~LauncherPartLaunch() {};

virtual void executeTask();
virtual bool abort();
Expand Down
4 changes: 2 additions & 2 deletions launcher/minecraft/launch/ModMinecraftJar.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
class ModMinecraftJar : public LaunchStep {
Q_OBJECT
public:
explicit ModMinecraftJar(LaunchTask* parent) : LaunchStep(parent){};
virtual ~ModMinecraftJar(){};
explicit ModMinecraftJar(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~ModMinecraftJar() {};

virtual void executeTask() override;
virtual bool canAbort() const override { return false; }
Expand Down
4 changes: 2 additions & 2 deletions launcher/minecraft/launch/PrintInstanceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class PrintInstanceInfo : public LaunchStep {
Q_OBJECT
public:
explicit PrintInstanceInfo(LaunchTask* parent, AuthSessionPtr session, MinecraftServerTargetPtr serverToJoin)
: LaunchStep(parent), m_session(session), m_serverToJoin(serverToJoin){};
virtual ~PrintInstanceInfo(){};
: LaunchStep(parent), m_session(session), m_serverToJoin(serverToJoin) {};
virtual ~PrintInstanceInfo() {};

virtual void executeTask();
virtual bool canAbort() const { return false; }
Expand Down
4 changes: 2 additions & 2 deletions launcher/minecraft/launch/ReconstructAssets.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
class ReconstructAssets : public LaunchStep {
Q_OBJECT
public:
explicit ReconstructAssets(LaunchTask* parent) : LaunchStep(parent){};
virtual ~ReconstructAssets(){};
explicit ReconstructAssets(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~ReconstructAssets() {};

void executeTask() override;
bool canAbort() const override { return false; }
Expand Down
4 changes: 2 additions & 2 deletions launcher/minecraft/launch/ScanModFolders.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
class ScanModFolders : public LaunchStep {
Q_OBJECT
public:
explicit ScanModFolders(LaunchTask* parent) : LaunchStep(parent){};
virtual ~ScanModFolders(){};
explicit ScanModFolders(LaunchTask* parent) : LaunchStep(parent) {};
virtual ~ScanModFolders() {};

virtual void executeTask() override;
virtual bool canAbort() const override { return false; }
Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/launch/VerifyJavaInstall.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class VerifyJavaInstall : public LaunchStep {
Q_OBJECT

public:
explicit VerifyJavaInstall(LaunchTask* parent) : LaunchStep(parent){};
explicit VerifyJavaInstall(LaunchTask* parent) : LaunchStep(parent) {};
~VerifyJavaInstall() override = default;

void executeTask() override;
Expand Down
6 changes: 2 additions & 4 deletions launcher/minecraft/mod/ResourceFolderModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,8 @@ void ResourceFolderModel::resolveResource(Resource* res)

connect(
task.get(), &Task::succeeded, this, [=] { onParseSucceeded(ticket, res->internal_id()); }, Qt::ConnectionType::QueuedConnection);
connect(
task.get(), &Task::failed, this, [=] { onParseFailed(ticket, res->internal_id()); }, Qt::ConnectionType::QueuedConnection);
connect(
task.get(), &Task::finished, this, [=] { m_active_parse_tasks.remove(ticket); }, Qt::ConnectionType::QueuedConnection);
connect(task.get(), &Task::failed, this, [=] { onParseFailed(ticket, res->internal_id()); }, Qt::ConnectionType::QueuedConnection);
connect(task.get(), &Task::finished, this, [=] { m_active_parse_tasks.remove(ticket); }, Qt::ConnectionType::QueuedConnection);

m_helper_thread_task.addTask(task);

Expand Down
2 changes: 1 addition & 1 deletion launcher/minecraft/update/FMLLibrariesTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FMLLibrariesTask : public Task {
Q_OBJECT
public:
FMLLibrariesTask(MinecraftInstance* inst);
virtual ~FMLLibrariesTask(){};
virtual ~FMLLibrariesTask() {};

void executeTask() override;

Expand Down
Loading
Loading