replace my printf calls with qDebug

This commit is contained in:
iTrooz 2024-11-16 23:47:43 +01:00
parent fe28a051d5
commit 0a379a05ff
No known key found for this signature in database
GPG Key ID: 8B83F77667B1BC6A
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ public:
readBytesExactFromSocket(resp, length-resp.size());
if (length != resp.size()) {
printf("Warning: Packet length doesn't match actual packet size (%d expected vs %d received)\n", length, resp.size());
qDebug() << "Warning: Packet length doesn't match actual packet size (" << length << " expected vs " << resp.size() << " received)";
}
qDebug() << "Received response successfully";

View File

@ -30,14 +30,14 @@ private:
lookup->deleteLater();
if (lookup->error() != QDnsLookup::NoError) {
printf("Warning: SRV record lookup failed (%v), trying A record lookup\n", lookup->errorString().toStdString());
qDebug() << "Warning: SRV record lookup failed (" << lookup->errorString().toStdString() << "), trying A record lookup";
pingWithDomainA(domain, port);
return;
}
auto records = lookup->serviceRecords();
if (records.isEmpty()) {
printf("Warning: no SRV entries found for domain, trying A record lookup\n");
qDebug() << "Warning: no SRV entries found for domain, trying A record lookup";
pingWithDomainA(domain, port);
return;
}
@ -71,7 +71,7 @@ private:
}
void emitFail(std::string error) {
printf("Ping error: %s\n", error.c_str());
qDebug() << "Ping error:" << QString::fromStdString(error);
emit fail();
}