Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QSettings with Symbian Anna: QVariant::save: unable to save type 136.

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

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 3.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    strekazoid
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raja26
      wrote on last edited by
      #2

      Post some code so that someone can help you!

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

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

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • S Offline
          S Offline
          strekazoid
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            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!

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved