Skip to content

Commit f2d0cf9

Browse files
committed
regenerate cpp-qt-client example with asJsonObject method
1 parent 72681d2 commit f2d0cf9

File tree

1 file changed

+7
-0
lines changed
  • samples/client/petstore/cpp-qt/client

1 file changed

+7
-0
lines changed

samples/client/petstore/cpp-qt/client/PFXEnum.h

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <QJsonValue>
1616
#include <QMetaType>
1717
#include <QString>
18+
#include <QJsonObject>
1819

1920
namespace test_namespace {
2021

@@ -35,6 +36,12 @@ class PFXEnum {
3536
virtual QString asJson() const {
3637
return jstr;
3738
}
39+
40+
virtual QJsonObject asJsonObject() const {
41+
QJsonObject obj;
42+
obj["value"] = jstr;
43+
return obj;
44+
}
3845

3946
virtual void fromJson(QString jsonString) {
4047
jstr = jsonString;

0 commit comments

Comments
 (0)