From b0778e7a1fcf62493638aa9caafcb17a8860a3a1 Mon Sep 17 00:00:00 2001 From: iTrooz Date: Fri, 29 Nov 2024 00:42:25 +0100 Subject: [PATCH] chore --- launcher/tasks/Task.h | 12 ++++++------ launcher/ui/pages/instance/McClient.cpp | 1 + launcher/ui/pages/instance/McClient.h | 2 +- launcher/ui/pages/instance/McResolver.cpp | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h index 0ec818684..91ec06679 100644 --- a/launcher/tasks/Task.h +++ b/launcher/tasks/Task.h @@ -139,8 +139,10 @@ class Task : public QObject, public QRunnable { void progress(qint64 current, qint64 total); //! called when a task has eother succeeded, aborted or failed. void finished(); - void succeeded(); // called when a task has succeeded - void aborted(); // called when a task has been aborted by calling abort() + //! called when a task has succeeded + void succeeded(); + //! called when a task has been aborted by calling abort() + void aborted(); void failed(QString reason); void status(QString status); void details(QString details); @@ -170,10 +172,8 @@ class Task : public QObject, public QRunnable { } protected: - /*! - * The task subclass must implement this method. This method is called to start to run the task. - * The task is not finished when this method returns. the subclass must manually call emitSucceeded() or emitFailed() instead. - */ + //! The task subclass must implement this method. This method is called to start to run the task. + //! The task is not finished when this method returns. the subclass must manually call emitSucceeded() or emitFailed() instead. virtual void executeTask() = 0; protected slots: diff --git a/launcher/ui/pages/instance/McClient.cpp b/launcher/ui/pages/instance/McClient.cpp index 92db3ba34..47f7a2b67 100644 --- a/launcher/ui/pages/instance/McClient.cpp +++ b/launcher/ui/pages/instance/McClient.cpp @@ -10,6 +10,7 @@ // 7 first bits #define SEGMENT_BITS 0x7F +// last bit #define CONTINUE_BIT 0x80 McClient::McClient(QObject *parent, QString domain, QString ip, short port): QObject(parent), domain(domain), ip(ip), port(port) {} diff --git a/launcher/ui/pages/instance/McClient.h b/launcher/ui/pages/instance/McClient.h index 9c3a9a977..374adbddf 100644 --- a/launcher/ui/pages/instance/McClient.h +++ b/launcher/ui/pages/instance/McClient.h @@ -30,7 +30,7 @@ private: void writeVarInt(QByteArray &data, int value); int readVarInt(QByteArray &data); char readByte(QByteArray &data); - // write number with specified size in big endian format + //! write number with specified size in big endian format void writeFixedInt(QByteArray &data, int value, int size); void writeString(QByteArray &data, const std::string &value); diff --git a/launcher/ui/pages/instance/McResolver.cpp b/launcher/ui/pages/instance/McResolver.cpp index 8b5b2e887..42bc3ad2c 100644 --- a/launcher/ui/pages/instance/McResolver.cpp +++ b/launcher/ui/pages/instance/McResolver.cpp @@ -34,7 +34,6 @@ void McResolver::pingWithDomainSRV(QString domain, int port) { return; } - const auto& firstRecord = records.at(0); QString domain = firstRecord.target(); int port = firstRecord.port();