Print receipt: encode QString
This commit is contained in:
		@@ -654,10 +654,21 @@ void ATBDeviceControllerPlugin::requestPrintReceipt(const QHash<QString, QVarian
 | 
			
		||||
 | 
			
		||||
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_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;
 | 
			
		||||
    QTimer::singleShot(4000, this, SLOT(onPrinterWaitForPrintingReceipt()));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user