[Development] Converting types in Qt

Daniel Teske daniel.teske at digia.com
Wed Jul 16 14:09:25 CEST 2014


> Anyway. To summarize my position in the original context: QVariant
> is as it is. It is convenient at times, and it is already too convenient
> at times. "Easy type conversion" is a different use case than "Type
> agnostic storage". QVariant does a bit of both, only the second one
> has ever been useful _to me_, I have been bitten by the first. As
> there are typically also more direct ways to convert types than to
> pass through QVariant, I consider the possibility to do type conversion
> through QVariant a mis-feature, and adding even more conversion
> abilities would be a step into the wrong direction _for me_. This is
> a personal opinion.

I certainly can't recall any place in Creator where a conversion via QVariant 
was intended. I can though recall several instances where such a conversion 
was the source of bugs. 

daniel



More information about the Development mailing list