diff --git a/app/scanner2/mainwindow.cpp b/app/scanner2/mainwindow.cpp index c1cd1fa3..3896a066 100644 --- a/app/scanner2/mainwindow.cpp +++ b/app/scanner2/mainwindow.cpp @@ -398,7 +398,9 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent) HGSaneDeviceCustomInfo custemInfo; #endif m_devUser->GetDeviceCustomInfo(&custemInfo); - mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, "HG"); + + std::string companyCode = getCfgValue("mqtt", "companyCode", QString("HG")).toStdString(); + mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, companyCode.c_str()); m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false); connect(m_devUser, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*)), Qt::DirectConnection); @@ -4962,7 +4964,9 @@ void MainWindow::on_act_selectDevice_triggered() HGSaneDeviceCustomInfo custemInfo; #endif m_devUser->GetDeviceCustomInfo(&custemInfo); - mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, "HG"); + + std::string companyCode = getCfgValue("mqtt", "companyCode", QString("HG")).toStdString(); + mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, companyCode.c_str()); m_devUser->Login(); m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);