summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels/qfilesystemmodel_p.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-06 14:33:43 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-11 08:46:54 +0200
commit41a349f004fd6afc450b775909d1a96a92df61d8 (patch)
treef97aaa62b167541affd0239ea37e77708990fdbe /src/gui/itemmodels/qfilesystemmodel_p.h
parent7191b8fe38788ac57e15e4124955c3cd8333d858 (diff)
Refactor QFileSystemModel: use named values for columns
Hardcoded 0, 1, 2, 3 make it hard to follow the logic of this code. Replace those values with values in the already existing unnamed enum, and use everywhere. Pick-to: 6.5 6.2 Task-number: QTBUG-110632 Change-Id: I325ab9edb5f3f996e87c83be1ec7226d5453f2cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/gui/itemmodels/qfilesystemmodel_p.h')
-rw-r--r--src/gui/itemmodels/qfilesystemmodel_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/itemmodels/qfilesystemmodel_p.h b/src/gui/itemmodels/qfilesystemmodel_p.h
index f30b4801bc..9198c2f59a 100644
--- a/src/gui/itemmodels/qfilesystemmodel_p.h
+++ b/src/gui/itemmodels/qfilesystemmodel_p.h
@@ -63,7 +63,13 @@ class Q_GUI_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate
Q_DECLARE_PUBLIC(QFileSystemModel)
public:
- enum { NumColumns = 4 };
+ enum {
+ NameColumn,
+ SizeColumn,
+ TypeColumn,
+ TimeColumn,
+ NumColumns = 4
+ };
class QFileSystemNode
{