Details
-
Suggestion
-
Resolution: Done
-
P5: Not important
-
None
Description
Request is to add simple conversion possible between QMap and QHash. It's useful when e.g. client uses hash and plugin returns map and vice versa. No need to implement always conversion loop.
Example:
QVariant map = variantFromSource();
if( map.canConvert(QVariantHash)) {
QVariantHash hash = map.toHash();
QVariant hash2 = QVariant::fromValue(hash);
QVariantMap map2 = hash2.toMap();
}