Clean up some tests.
This commit is contained in:
parent
b17ba8b3a7
commit
c102ebb6da
64 changed files with 615 additions and 541 deletions
|
@ -28,20 +28,18 @@ void TextEditorController::OnSave()
|
|||
{
|
||||
if(mSavePath.empty()) return;
|
||||
File outfile(mSavePath);
|
||||
outfile.SetAccessMode(File::AccessMode::Write);
|
||||
outfile.Open();
|
||||
outfile.WriteText(mModel->GetDocument()->GetContent());
|
||||
outfile.Close();
|
||||
|
||||
outfile.open(File::AccessMode::Write);
|
||||
outfile.writeText(mModel->GetDocument()->GetContent());
|
||||
}
|
||||
|
||||
void TextEditorController::OnLoad()
|
||||
{
|
||||
if(mLoadPath.empty()) return;
|
||||
File infile(mLoadPath);
|
||||
infile.SetAccessMode(File::AccessMode::Read);
|
||||
infile.Open();
|
||||
mModel->GetDocument()->SetContent(infile.ReadText());
|
||||
infile.Close();
|
||||
|
||||
infile.open(File::AccessMode::Read);
|
||||
mModel->GetDocument()->SetContent(infile.readText());
|
||||
}
|
||||
|
||||
void TextEditorController::SetSavePath(const std::filesystem::path& path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue