diff -r 1f42c03fafca -r 5760cbb32bc0 src/model.h --- a/src/model.h Sun Jul 25 20:29:14 2021 +0300 +++ b/src/model.h Sun Jul 25 20:39:21 2021 +0300 @@ -50,7 +50,7 @@ ldraw::Id checkType(ldraw::id_t id) const; template const R* get(ldraw::Id id, QModelIndex* index_out = nullptr) const; -signals: +Q_SIGNALS: void objectAdded(ldraw::id_t id, int position); private: using ModelObjectPointer = std::unique_ptr; @@ -107,12 +107,12 @@ ldraw::Id Model::append(Args&&... args) { const int position = static_cast(this->body.size()); - emit beginInsertRows({}, position, position); + Q_EMIT beginInsertRows({}, position, position); this->body.push_back(std::make_unique(args...)); ldraw::Object* pointer = this->body.back().get(); this->objectsById[pointer->id] = pointer; - emit objectAdded(pointer->id, static_cast(this->body.size() - 1)); - emit endInsertRows(); + Q_EMIT objectAdded(pointer->id, static_cast(this->body.size() - 1)); + Q_EMIT endInsertRows(); this->needRecache = true; return ldraw::Id{pointer->id.value}; } @@ -120,12 +120,12 @@ template ldraw::Id Model::insert(const std::size_t position, Args&&... args) { - emit beginInsertRows({}, position, position); + Q_EMIT beginInsertRows({}, position, position); this->body.insert(std::begin(this->body) + position, std::make_unique(args...)); ldraw::Object* pointer = this->body[position].get(); this->objectsById[pointer->id] = pointer; - emit objectAdded(pointer->id, static_cast(position)); - emit endInsertRows(); + Q_EMIT objectAdded(pointer->id, static_cast(position)); + Q_EMIT endInsertRows(); this->needRecache = true; return ldraw::Id{pointer->id.value}; }