-
Notifications
You must be signed in to change notification settings - Fork 3k
Refactor and cleanup score tree functions #30899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,50 +140,11 @@ | |
| --level; | ||
| } | ||
|
|
||
| void EngravingElementsProvider::dumpTreeTree(const mu::engraving::EngravingObject* obj, int& level) | ||
|
Check warning on line 143 in src/engraving/devtools/engravingelementsprovider.cpp
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's either delete these methods or fix them
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| { | ||
| ++level; | ||
| QString gap; | ||
| gap.fill(' ', level); | ||
| LOGD() << gap << obj->typeName(); | ||
|
|
||
| for (const mu::engraving::EngravingObject* child : obj->scanChildren()) { | ||
| dumpTreeTree(child, level); | ||
| } | ||
|
|
||
| --level; | ||
| } | ||
|
|
||
| void EngravingElementsProvider::checkObjectTree(const mu::engraving::EngravingObject* obj) | ||
|
Check warning on line 147 in src/engraving/devtools/engravingelementsprovider.cpp
|
||
| { | ||
| mu::engraving::EngravingObject* p1 = obj->parent(); | ||
| mu::engraving::EngravingObject* p2 = obj->scanParent(); | ||
| if (p1 && p2 && p1 != p2) { | ||
| LOGD() << "obj: " << obj->typeName(); | ||
| LOGD() << "parents is differens, p1: " << p1->typeName() << ", p2: " << p2->typeName(); | ||
| } | ||
|
|
||
| size_t ch1 = obj->children().size(); | ||
| size_t ch2 = obj->scanChildren().size(); | ||
| if (ch1 != ch2) { | ||
| LOGD() << "obj: " << obj->typeName(); | ||
| LOGD() << "chcount is differens, ch1: " << ch1 << ", ch2: " << ch2; | ||
|
|
||
| LOGD() << "children1:"; | ||
| for (size_t i = 0; i < obj->children().size(); ++i) { | ||
| LOGD() << i << ": " << obj->children().at(i)->typeName(); | ||
| } | ||
|
|
||
| LOGD() << "children2:"; | ||
|
|
||
| int i = 0; | ||
| for (const mu::engraving::EngravingObject* child : obj->scanChildren()) { | ||
| LOGD() << i++ << ": " << child->typeName(); | ||
| } | ||
| } | ||
|
|
||
| for (const mu::engraving::EngravingObject* ch : obj->children()) { | ||
| checkObjectTree(ch); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.