Print receipt: encode QString
This commit is contained in:
parent
32d70abf44
commit
72dbc8b858
@ -654,10 +654,21 @@ void ATBDeviceControllerPlugin::requestPrintReceipt(const QHash<QString, QVarian
|
|||||||
|
|
||||||
void ATBDeviceControllerPlugin::requestPrintReceipt(const QString & printingString)
|
void ATBDeviceControllerPlugin::requestPrintReceipt(const QString & printingString)
|
||||||
{
|
{
|
||||||
QByteArray ba = printingString.toUtf8();
|
QByteArray ba_receipt = this->codec->fromUnicode(printingString);
|
||||||
|
|
||||||
|
//QByteArray ba = printingString.toUtf8();
|
||||||
hw->prn_switchPower(true);
|
hw->prn_switchPower(true);
|
||||||
hw->prn_setFonts(8,12,0,0);
|
hw->prn_setFonts(8,12,0,0);
|
||||||
hw->prn_sendText(&ba);
|
hw->prn_sendText(&ba_receipt);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
//qCritical() << "---------------------------------------------------------------";
|
||||||
|
//qCritical() << "ATBDeviceControllerPlugin::requestPrintReceipt()";
|
||||||
|
//qCritical() << " receipt data:";
|
||||||
|
//qCritical() << QString(ba_receipt);
|
||||||
|
//qCritical() << "---------------------------------------------------------------";
|
||||||
|
|
||||||
|
|
||||||
this->printResultCheckCounter = 0;
|
this->printResultCheckCounter = 0;
|
||||||
QTimer::singleShot(4000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
QTimer::singleShot(4000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user