-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fix use of deprecated APIs in Qt 5.15 #235
Conversation
app/canvas/info.h
Outdated
QMap<Node*, QPointF> inspector; | ||
QMap<Datum*, QPointF> subdatum; | ||
QMultiMap<Node*, QPointF> inspector; | ||
QMultiMap<Datum*, QPointF> subdatum; |
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.
I don't understand these changes – QMap
is still supported, as is operator[]
.
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.
This looks reasonable, except the usage of |
I tried following the Qt guide regarding the deprecation and migrating the code from |
I don't believe I'm using multiple values per key here. The list of obsolete members doesn't include |
Ok, then it should be fine. By the way, I build Antimony with Qt 5.15 and tested it by opening some .sb files and playing around a bit: everything seems fine.
As I said in the comment above, I had to change |
Aha, I missed your comment about I believe that it's only used to join two maps – and not for the multi-value behavior – so could be replaced here with void CanvasInfo::unite(const CanvasInfo& other)
{
for (const auto i: other.inspector) {
inspector.insert(i);
}
for (const auto s: other.subdatum) {
subdatum.insert(s);
}
} (untested) It looks like |
I've found a simpler solution: I missed that 5.15 overloaded the |
Thanks! |
Thank you. I really appreciate the quick response even if the project is in low mantainenance mode. |
This is necessary to build Antimony with Qt 5.15, older versions of Qt are being deprecated and removed by distributions.