etherealjoy 3b031ed2b8 [qt5cpp] delete callback data allocated before signal emission (#7840)
* Small fixes to prevent crash when empty json body is provided.

* Add deleteLater wrapper for pointers passed to user code to prevent memory leak.

* Updates to move Object Wrapper to separate file

* Add Prefix to class name
2018-03-21 20:51:17 +08:00

35 lines
992 B
C++

/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#ifndef SWG_QOBJECT_WRAPPER_H
#define SWG_QOBJECT_WRAPPER_H
#include <QObject>
namespace Swagger {
template <typename ObjectPtrT>
class SWGQObjectWrapper : public QObject {
public:
SWGQObjectWrapper(ObjectPtrT ptr){
data = ptr;
}
~SWGQObjectWrapper(){
delete data;
}
private :
ObjectPtrT data;
};
}
#endif // SWG_QOBJECT_WRAPPER_H