MCPcopy Create free account
hub / github.com/antopilo/Nuake / ParseRecentFile

Method ParseRecentFile

Editor/Source/Editor/Windows/WelcomeWindow.cpp:425–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423 }
424
425 void WelcomeWindow::ParseRecentFile()
426 {
427 if (!FileSystem::FileExists(_RecentProjectFilePath, true))
428 {
429 FileSystem::BeginWriteFile(_RecentProjectFilePath, true);
430 FileSystem::WriteLine(_RecentProjectFileDefaultContent);
431 FileSystem::EndWriteFile();
432 }
433
434 std::string content = Nuake::FileSystem::ReadFile(_RecentProjectFilePath);
435 if (content != "")
436 {
437 nlohmann::json j = nlohmann::json::parse(content);
438 for (auto& project : j["Projects"])
439 {
440 auto projectPreview = ProjectPreview();
441 projectPreview.Deserialize(project);
442 _Projects.push_back(projectPreview);
443 }
444 }
445 }
446
447 void WelcomeWindow::SaveRecentFile()
448 {

Callers

nothing calls this directly

Calls 4

parseFunction · 0.85
ProjectPreviewClass · 0.85
DeserializeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected