mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
HackStudio: Use String instead of LexicalPath
LexicalPath is a 'heavier' object than a String that is mainly used for path parsing and validation, we don't actually need any of that in GitRepo and its related files, so let's move to String :^) I've also done some east-const conversion in the files that I was editing for the string change.
This commit is contained in:
parent
4cfc992125
commit
14b2656107
11 changed files with 79 additions and 77 deletions
|
@ -7,7 +7,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "GitRepo.h"
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibGUI/Model.h>
|
||||
|
||||
|
@ -15,7 +14,7 @@ namespace HackStudio {
|
|||
|
||||
class GitFilesModel final : public GUI::Model {
|
||||
public:
|
||||
static NonnullRefPtr<GitFilesModel> create(Vector<LexicalPath>&& files);
|
||||
static NonnullRefPtr<GitFilesModel> create(Vector<String>&& files);
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return m_files.size(); }
|
||||
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return 1; }
|
||||
|
@ -30,7 +29,7 @@ public:
|
|||
virtual GUI::ModelIndex index(int row, int column, const GUI::ModelIndex&) const override;
|
||||
|
||||
private:
|
||||
explicit GitFilesModel(Vector<LexicalPath>&& files);
|
||||
Vector<LexicalPath> m_files;
|
||||
explicit GitFilesModel(Vector<String>&& files);
|
||||
Vector<String> m_files;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue