[nostalgia,olympic] Cleanup
This commit is contained in:
@ -118,12 +118,12 @@ void NewMenu::drawLastPageButtons(studio::StudioContext &sctx) noexcept {
|
||||
|
||||
void NewMenu::finish(studio::StudioContext &sctx) noexcept {
|
||||
if (m_itemName.len() == 0) {
|
||||
oxLogError(OxError(1, "New file error: no file name"));
|
||||
oxLogError(ox::Error(1, "New file error: no file name"));
|
||||
return;
|
||||
}
|
||||
auto const&typeMaker = *m_types[static_cast<std::size_t>(m_selectedType)];
|
||||
if (sctx.project->exists(typeMaker.itemPath(m_itemName))) {
|
||||
oxLogError(OxError(1, "New file error: file already exists"));
|
||||
oxLogError(ox::Error(1, "New file error: file already exists"));
|
||||
return;
|
||||
}
|
||||
auto const [path, err] = typeMaker.write(sctx, m_itemName);
|
||||
|
@ -54,7 +54,7 @@ void ProjectExplorer::setModel(ox::UPtr<ProjectTreeModel> &&model) noexcept {
|
||||
ox::Error ProjectExplorer::refreshProjectTreeModel(ox::StringViewCR) noexcept {
|
||||
oxRequireM(model, buildProjectTreeModel(*this, "Project", "/", nullptr));
|
||||
setModel(std::move(model));
|
||||
return OxError(0);
|
||||
return ox::Error(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ void StudioUI::handleKeyInput() noexcept {
|
||||
ox::Error StudioUI::createOpenProject(ox::StringViewCR path) noexcept {
|
||||
std::error_code ec;
|
||||
std::filesystem::create_directories(toStdStringView(path), ec);
|
||||
oxReturnError(OxError(ec.value() != 0, "Could not create project directory"));
|
||||
oxReturnError(ox::Error(ec.value() != 0, "Could not create project directory"));
|
||||
oxReturnError(openProjectPath(path));
|
||||
return m_project->writeTypeStore();
|
||||
}
|
||||
@ -354,7 +354,7 @@ ox::Error StudioUI::openFile(ox::StringViewCR path) noexcept {
|
||||
|
||||
ox::Error StudioUI::openFileActiveTab(ox::StringViewCR path, bool makeActiveTab) noexcept {
|
||||
if (!m_project) {
|
||||
return OxError(1, "No project open to open a file from");
|
||||
return ox::Error(1, "No project open to open a file from");
|
||||
}
|
||||
if (m_openFiles.contains(path)) {
|
||||
for (auto &e : m_editors) {
|
||||
|
Reference in New Issue
Block a user