Fix use of deprecated APIs in Qt 5.15#235
Fix use of deprecated APIs in Qt 5.15#235mkeeter merged 1 commit intomkeeter:developfrom rnhmjoj:develop
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.
I don't understand these changes – QMap is still supported, as is operator[].
|
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.