1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:15:07 +00:00

AK: Rename FileSystemPath -> LexicalPath

And move canonicalized_path() to a static method on LexicalPath.

This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
This commit is contained in:
Sergey Bugaev 2020-05-26 14:52:44 +03:00 committed by Andreas Kling
parent f746bbda17
commit 602c3fdb3a
44 changed files with 174 additions and 181 deletions

View file

@ -301,7 +301,7 @@ TextEditorWidget::TextEditorWidget()
m_document_dirty = false;
m_editor->set_text(StringView());
set_path(FileSystemPath());
set_path(LexicalPath());
update_title();
});
@ -333,7 +333,7 @@ TextEditorWidget::TextEditorWidget()
}
m_document_dirty = false;
set_path(FileSystemPath(save_path.value()));
set_path(LexicalPath(save_path.value()));
dbg() << "Wrote document to " << save_path.value();
});
@ -465,11 +465,11 @@ TextEditorWidget::~TextEditorWidget()
{
}
void TextEditorWidget::set_path(const FileSystemPath& file)
void TextEditorWidget::set_path(const LexicalPath& lexical_path)
{
m_path = file.string();
m_name = file.title();
m_extension = file.extension();
m_path = lexical_path.string();
m_name = lexical_path.title();
m_extension = lexical_path.extension();
if (m_extension == "cpp" || m_extension == "h") {
m_cpp_highlight->activate();
@ -508,7 +508,7 @@ void TextEditorWidget::open_sesame(const String& path)
m_document_dirty = false;
m_document_opening = true;
set_path(FileSystemPath(path));
set_path(LexicalPath(path));
m_editor->set_focus(true);
}