Qt-jambi-interest Archive, October 2007
java.lang.Serializable and java.lang.Cloneable interfaces for common classes (QRect, QFont, etc)
Message 1 in thread
Any plans to have the common classes like QRect, QColor etc. implement
Serializable and Cloneable? I know there are copy constructors available and
there's your custom streaming support, but it would be nice if things would
be more Java-like, especially when you have classes that have fields that
are Q*-classes. For now, I just extend your classes and do the serialization
myself which isn't too bad either, but still... I'm glad you did equal()
though ;)
Keep up the good works!
Kind regards,
Sander
Message 2 in thread
S. van de Merwe wrote:
> Any plans to have the common classes like QRect, QColor etc. implement
> Serializable and Cloneable? I know there are copy constructors available and
> there's your custom streaming support, but it would be nice if things would
> be more Java-like, especially when you have classes that have fields that
> are Q*-classes. For now, I just extend your classes and do the serialization
> myself which isn't too bad either, but still... I'm glad you did equal()
> though ;)
We've already implemented Serializable via QDataStream for Qt Jambi 4.4
so all Qt classes that have QDataStream support can be streamed using
the serializable interface. I've added a task for supporting Cloneable.
> Keep up the good works!
Thanks ;-)
-
Gunnar