From 91ba4cf75ee30c64779edb5b7644e5a830de5026 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 14 Aug 2023 18:16:53 +0200 Subject: chore: reformat Signed-off-by: Sefa Eyeoglu --- launcher/minecraft/mod/ResourceFolderModel.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'launcher/minecraft/mod/ResourceFolderModel.h') diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h index e7884894..6277028b 100644 --- a/launcher/minecraft/mod/ResourceFolderModel.h +++ b/launcher/minecraft/mod/ResourceFolderModel.h @@ -1,14 +1,14 @@ #pragma once -#include -#include -#include #include +#include #include #include +#include #include #include #include +#include #include "Resource.h" @@ -120,7 +120,7 @@ class ResourceFolderModel : public QAbstractListModel { void saveHiddenColumn(int column, bool hidden); void loadHiddenColumns(QTreeView* tree); QMenu* createHeaderContextMenu(QTreeView* tree); - + /** This creates a proxy model to filter / sort the model for a UI. * * The actual comparisons and filtering are done directly by the Resource, so to modify behavior go there instead! @@ -199,9 +199,10 @@ class ResourceFolderModel : public QAbstractListModel { // Represents the relationship between a column's index (represented by the list index), and it's sorting key. // As such, the order in with they appear is very important! QList m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::DATE }; - QStringList m_column_names = {"Enable", "Name", "Last Modified"}; - QStringList m_column_names_translated = {tr("Enable"), tr("Name"), tr("Last Modified")}; - QList m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::Stretch, QHeaderView::ResizeToContents }; + QStringList m_column_names = { "Enable", "Name", "Last Modified" }; + QStringList m_column_names_translated = { tr("Enable"), tr("Name"), tr("Last Modified") }; + QList m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::Stretch, + QHeaderView::ResizeToContents }; QList m_columnsHideable = { false, false, true }; QDir m_dir; @@ -224,15 +225,15 @@ class ResourceFolderModel : public QAbstractListModel { /* A macro to define useful functions to handle Resource* -> T* more easily on derived classes */ #define RESOURCE_HELPERS(T) \ - [[nodiscard]] T* operator[](int index) \ + [[nodiscard]] T* operator[](int index) \ { \ return static_cast(m_resources[index].get()); \ } \ - [[nodiscard]] T* at(int index) \ + [[nodiscard]] T* at(int index) \ { \ return static_cast(m_resources[index].get()); \ } \ - [[nodiscard]] const T* at(int index) const \ + [[nodiscard]] const T* at(int index) const \ { \ return static_cast(m_resources.at(index).get()); \ } \ -- cgit