linyaps/external/qserializer
black-desk 8dabadf136
chore: update qserializer to 0.3.0
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-17 17:22:54 +08:00
..
.github refact: update external/qserializer 2023-08-15 13:51:34 +08:00
examples chore: update qserializer to 0.3.0 2023-08-17 17:22:54 +08:00
libs chore: update qserializer to 0.3.0 2023-08-17 17:22:54 +08:00
misc/cmake refact: update external/qserializer 2023-08-15 13:51:34 +08:00
tests chore: update qserializer to 0.3.0 2023-08-17 17:22:54 +08:00
tools/iwyu chore: add new qserializer 2023-08-15 13:51:17 +08:00
.clang-format chore: add new qserializer 2023-08-15 13:51:17 +08:00
.cmake-format.py chore: add new qserializer 2023-08-15 13:51:17 +08:00
.gitmodules chore: add new qserializer 2023-08-15 13:51:17 +08:00
CMakeLists.txt chore: update qserializer to 0.3.0 2023-08-17 17:22:54 +08:00
LICENSE deps: update qserializer to v0.1.1 2023-08-15 13:51:52 +08:00
README.md refact: update external/qserializer 2023-08-15 13:51:34 +08:00

README.md

QSerializer

A simple header-only qt helper library for serializing/deserializing QSharedPointer<class with Q_GADGET> into/from QVariantMap.

It have to be a QSharedPointer of a class with Q_GADGET but not a QObject or a pointer to a QObject. That's because this library rely on writeOnGadget, witch will not work on QObject.

Also support serializing/deserializing

  • QList<QSharedPointer<class with Q_GADGET>>
  • QMap<QString, QSharedPointer<class with Q_GADGET>>

into/from

  • QVariantList
  • QVariantMap

As QVariantMap and QVariantList can easily be converted to/from Qt JSON types and QDBusArgument, this library should be good enough for common usage.

Check types defined for basic tests for coding examples.


QSerializer can working with QDBusArgument, check the example for details of that.