mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:55:08 +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
|
@ -8,12 +8,12 @@
|
|||
|
||||
namespace HackStudio {
|
||||
|
||||
NonnullRefPtr<GitFilesModel> GitFilesModel::create(Vector<LexicalPath>&& files)
|
||||
NonnullRefPtr<GitFilesModel> GitFilesModel::create(Vector<String>&& files)
|
||||
{
|
||||
return adopt_ref(*new GitFilesModel(move(files)));
|
||||
}
|
||||
|
||||
GitFilesModel::GitFilesModel(Vector<LexicalPath>&& files)
|
||||
GitFilesModel::GitFilesModel(Vector<String>&& files)
|
||||
: m_files(move(files))
|
||||
{
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ GitFilesModel::GitFilesModel(Vector<LexicalPath>&& files)
|
|||
GUI::Variant GitFilesModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
||||
{
|
||||
if (role == GUI::ModelRole::Display) {
|
||||
return m_files.at(index.row()).string();
|
||||
return m_files.at(index.row());
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue