1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

LibGUI: Allow FileSystemModel to be rooted one level above "/"

You can now construct a FileSystemModel with a null String() as the
root path. This will root it one level above "/" which makes the
root directory itself selectable as a child.

This will be useful in some places, e.g the FileManager application.
This commit is contained in:
Andreas Kling 2020-09-16 17:47:34 +02:00
parent a9f7b576a4
commit 4d2782db5a
2 changed files with 21 additions and 2 deletions

View file

@ -109,6 +109,7 @@ public:
RefPtr<Core::Notifier> m_notifier;
int m_error { 0 };
bool m_parent_of_root { false };
ModelIndex index(int column) const;
void traverse_if_needed();