I am storing QVariantMap as QVariant inside another QVariant. I need to add fileds in this nested QVariantMap in an slot function. Here is what I have so far:-
QVariantMap map = data["nestedMap"].toMap(); //first copy
map[newfield] = assingCoolStuff(); //add new filed to nestedMap
data["nestedMap"] = map; // second copy ?
If I'm correct then its creating copy of nestedMap two time and will run so slowly. is there any way to optimize this ?