December 29, 2011

strekazoid strekazoid
Lab Rat
151 posts

QSettings with Symbian Anna: QVariant::save: unable to save type 136.

 

I’m keeping getting this message every time I save settings on Symbian Anna device. The value is successfully saved, no worries about that. Still I wonder why I’m getting this message?

4 replies

December 29, 2011

raja26 raja26
Lab Rat
77 posts

Post some code so that someone can help you!

December 29, 2011

Volker Volker
Ant Farmer
5428 posts

All type above 127 are user type, and so is 136. You need to provide QDataStream operator overloads for your custom class.

December 30, 2011

strekazoid strekazoid
Lab Rat
151 posts

I’m getting this message when setting QString values to QSettings.

December 30, 2011

Volker Volker
Ant Farmer
5428 posts

Ah, the 136 is not a QVariant type enum, but a QMetaType type.

136 is QMetaType::QObjectStar, which denotes a pointer to a QObject. Those cannot be serialized in a sane way. The address the pointer holds, most probably isn’t valid on time the settings are read again. And serializing the object itself doesn’t make sense too.

And no, the value is not saved!

 
  ‹‹ thread/qmutex_unix.cpp SYS_futex error.      C to Qt mapping ››

You must log in to post a reply. Not a member yet? Register here!