改进接口

This commit is contained in:
codeboss 2025-06-29 01:37:30 +08:00
parent d4e5782539
commit 0f9264444c
2 changed files with 1 additions and 6 deletions

View File

@ -50,7 +50,7 @@ std::shared_ptr<Serializable> RtWsEntity::newDefault() const {
newx->_runtime_name = this->_runtime_name;
for (auto c : this->_comps_list)
newx->append(c->defaultNew());
newx->append(std::static_pointer_cast<WsComponent>(c->newDefault()));
return newx;
}

View File

@ -134,11 +134,6 @@ public:
/// <returns>插件名</returns>
virtual QString name() const = 0;
/// <summary>
/// 克隆一个具有相同数据的实例
/// </summary>
/// <returns>实例指针</returns>
virtual std::shared_ptr<WsComponent> defaultNew() const = 0;
/// <summary>
/// 绑定Entity
/// </summary>