Skip to content
Snippets Groups Projects
Commit 32e54627 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixes to multi map iterator for removal, in older qt

parent 9d917e2e
No related branches found
No related tags found
No related merge requests found
......@@ -518,7 +518,11 @@ float QuCircularPlotEngine::curveSelectedPointRadius() const {
*
*/
void QuCircularPlotEngine::addDrawable(QuCircularPlotDrawable_I *dra) {
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
d.drawables.insert(dra->z(), dra);
#else
d.drawables.insertMulti(dra->z(), dra);
#endif
}
/*!
......@@ -526,7 +530,11 @@ void QuCircularPlotEngine::addDrawable(QuCircularPlotDrawable_I *dra) {
* \param dra QuCircularPlotDrawable_I to remove (without deletion)
*/
void QuCircularPlotEngine::removeDrawable(QuCircularPlotDrawable_I *dra) {
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
QMutableMultiMapIterator<int, QuCircularPlotDrawable_I *> mmi(d.drawables);
#else
QMultiMapIterator<int, QuCircularPlotDrawable_I *> mmi(d.drawables);
#endif
while(mmi.hasNext()) {
mmi.next();
if(mmi.value() == dra)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment