T_dynData: do not dynamically create struct
This commit is contained in:
parent
ea7542a248
commit
b946dc5a92
@ -702,7 +702,8 @@ void ATBDeviceControllerPlugin::onPrinterWaitForPrintingReceipt()
|
||||
|
||||
void ATBDeviceControllerPlugin::requestPrintTicket(const QHash<QString, QVariant> & printingData)
|
||||
{
|
||||
struct T_dynDat *dynTicketData = new T_dynDat;
|
||||
struct T_dynDat dynamicTicketData;
|
||||
struct T_dynDat *dynTicketData = &dynamicTicketData;
|
||||
memset(dynTicketData, 0, sizeof(*dynTicketData));
|
||||
|
||||
qCritical() << "ATBDeviceControllerPlugin::requestPrintTicket( " << endl
|
||||
@ -946,7 +947,8 @@ void ATBDeviceControllerPlugin::onPrinterPrepareDynTemplateData()
|
||||
}
|
||||
void ATBDeviceControllerPlugin::prepareDynTemplateData()
|
||||
{
|
||||
struct T_dynDat *dynTicketData = new T_dynDat;
|
||||
struct T_dynDat dynamicTicketData;
|
||||
struct T_dynDat *dynTicketData = &dynamicTicketData;
|
||||
memset(dynTicketData, 0, sizeof(*dynTicketData));
|
||||
|
||||
// setup dynTicketData dependent on currentTicket
|
||||
|
Loading…
Reference in New Issue
Block a user