From 62ef2dd07f0a9242c07e046bfcc4874d315f5842 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Mon, 2 Sep 2024 15:52:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BD=E4=BA=A7=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=96=AD=E5=BC=80usb=E8=BF=9E=E6=8E=A5=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=89=AB=E6=8F=8F=E4=B8=8D=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=96=AD=E5=BC=80=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9BBUG-1275?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner2/mainwindow.cpp | 5 +++++ app/scantool/mainwindow.cpp | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/scanner2/mainwindow.cpp b/app/scanner2/mainwindow.cpp index 5793dae8..c5132fae 100644 --- a/app/scanner2/mainwindow.cpp +++ b/app/scanner2/mainwindow.cpp @@ -782,6 +782,7 @@ void MainWindow::on_AcquireInto2() if (HGSANE_ERR_DEVICEOFFLINE == ret) { deviceIsOnline = false; + QMessageBox::information(this, tr("Prompt"), tr("Device is offline")); } #endif @@ -1536,6 +1537,7 @@ void MainWindow::on_scanFinishEvent() if (HGSANE_ERR_DEVICEOFFLINE == ret) { deviceIsOnline = false; + QMessageBox::information(this, tr("Prompt"), tr("Device is offline")); } #endif @@ -3740,6 +3742,7 @@ void MainWindow::on_act_acquire_triggered() if (HGSANE_ERR_DEVICEOFFLINE == ret) { deviceIsOnline = false; + QMessageBox::information(this, tr("Prompt"), tr("Device is offline")); } #endif @@ -3872,6 +3875,7 @@ void MainWindow::on_act_acquireInto_triggered() if (HGSANE_ERR_DEVICEOFFLINE == ret) { deviceIsOnline = false; + QMessageBox::information(this, tr("Prompt"), tr("Device is offline")); } #endif @@ -3960,6 +3964,7 @@ void MainWindow::on_act_insertFromScanner_triggered() if (HGSANE_ERR_DEVICEOFFLINE == ret) { deviceIsOnline = false; + QMessageBox::information(this, tr("Prompt"), tr("Device is offline")); } #endif diff --git a/app/scantool/mainwindow.cpp b/app/scantool/mainwindow.cpp index b0384ea3..cebbc133 100644 --- a/app/scantool/mainwindow.cpp +++ b/app/scantool/mainwindow.cpp @@ -25,7 +25,7 @@ MainWindow::MainWindow(QWidget *parent) , m_dlgScanInfo(nullptr) , m_devHandle(nullptr) , m_scanning(false) - , m_isFirstConnectServer(false) + , m_isFirstConnectServer(true) , m_dpi(200) , m_scanFileName("") , m_scanImgFmtWriter(nullptr) @@ -1263,10 +1263,6 @@ void MainWindow::timerEvent(QTimerEvent *e) this->killTimer(m_timerId); m_timerId = -1; } - else - { - m_timerId = this->startTimer(5000); - } } }