diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-25 10:08:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 10:08:53 +0200 |
commit | 094cee8ec61135db4c569a3a72016c9c84c60cdd (patch) | |
tree | f0f79d46934c4fd20eb4c32a39d226201b470a86 | |
parent | 3e448904a363530ab8c260f89c38c7b8c07fe90f (diff) | |
parent | 41bd008f5d8d5872e1ab2646c78908e27eae7b73 (diff) | |
download | PrismLauncher-094cee8ec61135db4c569a3a72016c9c84c60cdd.tar.gz PrismLauncher-094cee8ec61135db4c569a3a72016c9c84c60cdd.tar.bz2 PrismLauncher-094cee8ec61135db4c569a3a72016c9c84c60cdd.zip |
Merge pull request #1561 from Scrumplex/nix-miscs
-rw-r--r-- | .envrc | 1 | ||||
-rw-r--r-- | launcher/Version.h | 20 | ||||
-rw-r--r-- | launcher/launch/LogModel.h | 2 | ||||
-rw-r--r-- | launcher/ui/MainWindow.h | 5 | ||||
-rw-r--r-- | launcher/ui/pages/instance/ServersPage.cpp | 20 | ||||
-rw-r--r-- | libraries/LocalPeer/src/LocalPeer.cpp | 2 | ||||
-rw-r--r-- | nix/dev.nix | 9 | ||||
-rw-r--r-- | tests/FileSystem_test.cpp | 5 |
8 files changed, 15 insertions, 49 deletions
@@ -1 +1,2 @@ use flake +watch_file nix/*.nix diff --git a/launcher/Version.h b/launcher/Version.h index 92bff9ba..9c043b01 100644 --- a/launcher/Version.h +++ b/launcher/Version.h @@ -103,14 +103,8 @@ class Version { QString m_fullString; - [[nodiscard]] inline bool isAppendix() const - { - return m_stringPart.startsWith('+'); - } - [[nodiscard]] inline bool isPreRelease() const - { - return m_stringPart.startsWith('-') && m_stringPart.length() > 1; - } + [[nodiscard]] inline bool isAppendix() const { return m_stringPart.startsWith('+'); } + [[nodiscard]] inline bool isPreRelease() const { return m_stringPart.startsWith('-') && m_stringPart.length() > 1; } inline bool operator==(const Section& other) const { @@ -156,14 +150,8 @@ class Version { return m_fullString < other.m_fullString; } - inline bool operator!=(const Section& other) const - { - return !(*this == other); - } - inline bool operator>(const Section& other) const - { - return !(*this < other || *this == other); - } + inline bool operator!=(const Section& other) const { return !(*this == other); } + inline bool operator>(const Section& other) const { return !(*this < other || *this == other); } }; private: diff --git a/launcher/launch/LogModel.h b/launcher/launch/LogModel.h index ba2e4054..18e51d7e 100644 --- a/launcher/launch/LogModel.h +++ b/launcher/launch/LogModel.h @@ -30,7 +30,7 @@ class LogModel : public QAbstractListModel { enum Roles { LevelRole = Qt::UserRole }; - private /* types */: + private /* types */: struct entry { MessageLevel::Enum level; QString line; diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index b6f45da2..0b614452 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -151,10 +151,7 @@ class MainWindow : public QMainWindow { void deleteGroup(); void undoTrashInstance(); - inline void on_actionExportInstance_triggered() - { - on_actionExportInstanceZip_triggered(); - } + inline void on_actionExportInstance_triggered() { on_actionExportInstanceZip_triggered(); } void on_actionExportInstanceZip_triggered(); void on_actionExportInstanceMrPack_triggered(); void on_actionExportInstanceFlamePack_triggered(); diff --git a/launcher/ui/pages/instance/ServersPage.cpp b/launcher/ui/pages/instance/ServersPage.cpp index 6bf802e6..2142e6c9 100644 --- a/launcher/ui/pages/instance/ServersPage.cpp +++ b/launcher/ui/pages/instance/ServersPage.cpp @@ -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() { diff --git a/libraries/LocalPeer/src/LocalPeer.cpp b/libraries/LocalPeer/src/LocalPeer.cpp index ab528c2a..bd407042 100644 --- a/libraries/LocalPeer/src/LocalPeer.cpp +++ b/libraries/LocalPeer/src/LocalPeer.cpp @@ -220,5 +220,5 @@ void LocalPeer::receiveConnection() socket->waitForBytesWritten(1000); socket->waitForDisconnected(1000); // make sure client reads ack delete socket; - emit messageReceived(uMsg); //### (might take a long time to return) + emit messageReceived(uMsg); // ### (might take a long time to return) } diff --git a/nix/dev.nix b/nix/dev.nix index c39e1565..a9c1dc65 100644 --- a/nix/dev.nix +++ b/nix/dev.nix @@ -23,18 +23,13 @@ types_or = ["c" "c++" "java" "json" "objective-c"]; }; }; + + tools.clang-tools = pkgs.clang-tools_16; }; }; devShells.default = pkgs.mkShell { inherit (self.checks.${system}.pre-commit-check) shellHook; - packages = with pkgs; [ - nodePackages.markdownlint-cli - alejandra - deadnix - clang-tools - nil - ]; inputsFrom = [self.packages.${system}.prismlauncher-unwrapped]; buildInputs = with pkgs; [ccache ninja]; diff --git a/tests/FileSystem_test.cpp b/tests/FileSystem_test.cpp index e1941042..1d3cee85 100644 --- a/tests/FileSystem_test.cpp +++ b/tests/FileSystem_test.cpp @@ -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() { |