From f9112d5179a107b936476ab4feee197c1dbed402 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Thu, 22 Feb 2024 10:13:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3Twain=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E8=AE=BE=E7=BD=AE=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=B6=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/twaintest/mainwindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/twaintest/mainwindow.cpp b/app/twaintest/mainwindow.cpp index 86d08ede..05e9ec07 100644 --- a/app/twaintest/mainwindow.cpp +++ b/app/twaintest/mainwindow.cpp @@ -471,23 +471,23 @@ HGCapValue MainWindow::getHGCapValue() } else if (capType == "TWTY_STR32") { - value.type = HGCAPVALUE_TYPE_BYTE; - strcpy(value.valueStr32, ui->lineEdit_setCapContent->text().toStdString().c_str()); + value.type = HGCAPVALUE_TYPE_STR32; + strcpy(value.valueStr32, ui->lineEdit_setCapContent->text().toLocal8Bit().toStdString().c_str()); } else if (capType == "TWTY_STR64") { - value.type = HGCAPVALUE_TYPE_BYTE; - strcpy(value.valueStr64, ui->lineEdit_setCapContent->text().toStdString().c_str()); + value.type = HGCAPVALUE_TYPE_STR64; + strcpy(value.valueStr64, ui->lineEdit_setCapContent->text().toLocal8Bit().toStdString().c_str()); } else if (capType == "TWTY_STR128") { - value.type = HGCAPVALUE_TYPE_BYTE; - strcpy(value.valueStr128, ui->lineEdit_setCapContent->text().toStdString().c_str()); + value.type = HGCAPVALUE_TYPE_STR128; + strcpy(value.valueStr128, ui->lineEdit_setCapContent->text().toLocal8Bit().toStdString().c_str()); } else if (capType == "TWTY_STR255") { - value.type = HGCAPVALUE_TYPE_BYTE; - strcpy(value.valueStr255, ui->lineEdit_setCapContent->text().toStdString().c_str()); + value.type = HGCAPVALUE_TYPE_STR255; + strcpy(value.valueStr255, ui->lineEdit_setCapContent->text().toLocal8Bit().toStdString().c_str()); } return value; From c09b30456567e2acc9973947f8c78045222da492 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Thu, 22 Feb 2024 17:07:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?app=E7=95=8C=E9=9D=A2=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=85=A8=E9=83=A8=E6=94=B9=E4=B8=BA=E5=AE=BD?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=B9=81=E4=BD=93?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=B5=E8=84=91=E8=AF=86=E5=88=AB=E4=B8=BA?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner2/mainwindow.cpp | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/app/scanner2/mainwindow.cpp b/app/scanner2/mainwindow.cpp index c1cd1fa3..6f6cb40c 100644 --- a/app/scanner2/mainwindow.cpp +++ b/app/scanner2/mainwindow.cpp @@ -3465,50 +3465,50 @@ void MainWindow::on_act_about_triggered() QString appLang = getCfgValue("global", "language", QString("chinese")); if (appLang == "chinese") { - content += tr("

Vendor: %1

").arg(QString::fromLocal8Bit(COMPANY_NAME)); - content += tr("

Company address: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS)); - content += tr("

Company telephone: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL)); - content += tr("

Company website: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL)); - content += tr("

Copyright: %1

").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT)); + content += tr("

Vendor: %1

").arg(QString::fromStdWString(COMPANY_NAME)); + content += tr("

Company address: %1

").arg(QString::fromStdWString(BRAND_COMPANY_ADDRESS)); + content += tr("

Company telephone: %1

").arg(QString::fromStdWString(BRAND_COMPANY_TEL)); + content += tr("

Company website: %1

").arg(QString::fromStdWString(BRAND_COMPANY_URL)); + content += tr("

Copyright: %1

").arg(QString::fromStdWString(BRAND_COPYRIGHT)); } else if(appLang == "english") { - content += tr("

Vendor: %1

").arg(QString::fromLocal8Bit(COMPANY_NAME_EN)); - content += tr("

Company address: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS_EN)); - content += tr("

Company telephone: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL_EN)); - content += tr("

Company website: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL_EN)); - content += tr("

Copyright: %1

").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT_EN)); + content += tr("

Vendor: %1

").arg(QString::fromStdWString(COMPANY_NAME_EN)); + content += tr("

Company address: %1

").arg(QString::fromStdWString(BRAND_COMPANY_ADDRESS_EN)); + content += tr("

Company telephone: %1

").arg(QString::fromStdWString(BRAND_COMPANY_TEL_EN)); + content += tr("

Company website: %1

").arg(QString::fromStdWString(BRAND_COMPANY_URL_EN)); + content += tr("

Copyright: %1

").arg(QString::fromStdWString(BRAND_COPYRIGHT_EN)); } else if (appLang == "chinese-trad") { - content += tr("

Vendor: %1

").arg(QString::fromLocal8Bit(COMPANY_NAME_TRADCN)); - content += tr("

Company address: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS_TRADCN)); - content += tr("

Company telephone: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL_TRADCN)); - content += tr("

Company website: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL_EN)); - content += tr("

Copyright: %1

").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT_TRADCN)); + content += tr("

Vendor: %1

").arg(QString::fromStdWString(COMPANY_NAME_TRADCN)); + content += tr("

Company address: %1

").arg(QString::fromStdWString(BRAND_COMPANY_ADDRESS_TRADCN)); + content += tr("

Company telephone: %1

").arg(QString::fromStdWString(BRAND_COMPANY_TEL_TRADCN)); + content += tr("

Company website: %1

").arg(QString::fromStdWString(BRAND_COMPANY_URL_EN)); + content += tr("

Copyright: %1

").arg(QString::fromStdWString(BRAND_COPYRIGHT_TRADCN)); } #else - content += tr("

Vendor: %1

").arg(QString::fromLocal8Bit(COMPANY_NAME)); - content += tr("

Copyright: %1

").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT)); - content += tr("

Company website: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL)); - content += tr("

Company address: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS)); + content += tr("

Vendor: %1

").arg(QString::fromStdWString(COMPANY_NAME)); + content += tr("

Copyright: %1

").arg(QString::fromStdWString(BRAND_COPYRIGHT)); + content += tr("

Company website: %1

").arg(QString::fromStdWString(BRAND_COMPANY_URL)); + content += tr("

Company address: %1

").arg(QString::fromStdWString(BRAND_COMPANY_ADDRESS)); #endif #if defined (OEM_DELI) - content += tr("

After-sale telephone: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL)); + content += tr("

After-sale telephone: %1

").arg(QString::fromStdWString(BRAND_COMPANY_TEL)); #else #if !defined(OEM_ZHONGJING) - content += tr("

Company telephone: %1

").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL)); + content += tr("

Company telephone: %1

").arg(QString::fromStdWString(BRAND_COMPANY_TEL)); #endif #endif #if defined (OEM_ZHONGJING) if (appLang == "chinese-trad" || appLang == "english") - content += tr("

Company GPS: %2

").arg(QString::fromLocal8Bit(BRAND_URL_GPS_TRADCN)).arg(tr("Baidu map access")); + content += tr("

Company GPS: %2

").arg(QString::fromStdWString(BRAND_URL_GPS_TRADCN)).arg(tr("Baidu map access")); else - content += tr("

Company GPS: %2

").arg(QString::fromLocal8Bit(BRAND_URL_GPS)).arg(tr("Baidu map access")); + content += tr("

Company GPS: %2

").arg(QString::fromStdWString(BRAND_URL_GPS)).arg(tr("Baidu map access")); #else - content += tr("

Company GPS: %2

").arg(QString::fromLocal8Bit(BRAND_URL_GPS)).arg(tr("Baidu map access")); + content += tr("

Company GPS: %2

").arg(QString::fromStdWString(BRAND_URL_GPS)).arg(tr("Baidu map access")); #endif QMessageBox::about(this, title, content);