From d31d57cbd4037c166e36c87fdb86daf98d933ede Mon Sep 17 00:00:00 2001 From: fong Date: Tue, 30 Jan 2024 21:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BB=A5Ping=20=E4=BD=86=E4=B8=8D?= =?UTF-8?q?=E5=87=86=E7=A1=AE=20Signed-off-by:=20fong=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ip_sacaner/scan_run.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ip_sacaner/scan_run.cpp b/ip_sacaner/scan_run.cpp index ff98dcf..53bd4ba 100644 --- a/ip_sacaner/scan_run.cpp +++ b/ip_sacaner/scan_run.cpp @@ -34,7 +34,7 @@ trytryping::trytryping() void trytryping::run() { emit try_one(1); - qint16 exitCode; + qint16 exitCode=0; QString ip=this->ipstr; #ifdef Q_OS_WIN QString strArg = "ping " + ip + " -n 1 -i 2"; @@ -46,12 +46,12 @@ void trytryping::run() if(0 == exitCode) { //it's alive - qDebug() << "shell ping " + ip + " sucessed!"; - emit connect_ok(this->ipstr); + //qDebug() << "shell ping " + ip + " sucessed!"; + emit connect_ok(QString("Ping ").append(ip)); //发射该IP在线的信号 } else { - qDebug() << "shell ping " + ip + " failed!"; + //qDebug() << "shell ping " + ip + " failed!"; //发射IP离线的信号 }