Am 19.09.2011 um 12:18 schrieb Wolf-Michael Bolle
<[email protected]>:
> On Monday 19 September 2011 12:04:01 ext Robin Burchell wrote:
>
>>> In the spirit of this discussion I'd like to point out that I need a way
>>> to create QMimeType objects with all their properties set. Can we add
>>> constructors to QMimeTypeData and QMimeType like this:
>>
>> why do you need this done in the constructor? this is, to me, really
>> not good API. it's one of my pet peeves.
>
> I want this class to be immutable.
Provide a c'tor which takes another "raw data" object as single parameter or
provide your own "factory" method which sets all values as desired and then
returns a const instance.
> Such a class needs a way to get its
> properties initialized. Please explain why that is in your opinion a bad API.
Answer answer *a = new Answer("Because", this, "is", "hard", 2,
QIODevice::Read, true, true, false, 42);
;)
Cheers, Oliver_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback