Refine project panel runtime ownership

This commit is contained in:
2026-04-28 15:24:47 +08:00
parent cd166037bf
commit 02eafc2bac
5 changed files with 56 additions and 71 deletions

View File

@@ -21,7 +21,6 @@
#include <chrono>
#include <cstdint>
#include <filesystem>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
@@ -82,7 +81,6 @@ public:
bool directory = false;
};
void Initialize(const std::filesystem::path& projectRoot);
void SetProjectRuntime(EditorProjectRuntime* projectRuntime);
void SetCommandFocusService(EditorCommandFocusService* commandFocusService);
void SetSystemInteractionHost(System::SystemInteractionService* systemInteractionHost);
@@ -163,8 +161,6 @@ private:
std::vector<AssetTileLayout> assetTiles = {};
};
EditorProjectRuntime* ResolveProjectRuntime();
const EditorProjectRuntime* ResolveProjectRuntime() const;
bool HasProjectRuntime() const;
BrowserModel& GetBrowserModel();
const BrowserModel& GetBrowserModel() const;
@@ -250,7 +246,6 @@ private:
std::string_view explicitItemId,
bool forceCurrentFolder);
std::unique_ptr<EditorProjectRuntime> m_ownedProjectRuntime = {};
EditorProjectRuntime* m_projectRuntime = nullptr;
EditorCommandFocusService* m_commandFocusService = nullptr;
System::SystemInteractionService* m_systemInteractionHost = nullptr;