From 27d0351664673689caeec7e56c6851b0a12ad1ef Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 24 Mar 2011 12:56:17 +0100 Subject: debug tags --- src/fbgui.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/fbgui.cpp') diff --git a/src/fbgui.cpp b/src/fbgui.cpp index fe7d4e2..c956588 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -137,9 +137,9 @@ void fbgui::checkForTrigger(const QString& dirname) void fbgui::loadURL(){ // load if host is valid if (checkHost()){ - qxtLog->debug() << "Loading URL..."; + qxtLog->debug() << "[gui] Loading URL..."; QByteArray postData = generatePOSTData(); - qxtLog->debug() << "POST data: " << postData; + qxtLog->debug() << "[gui] POST data: " << postData; QNetworkRequest req(baseURL); _webView->load(req, QNetworkAccessManager::PostOperation, postData); } @@ -149,11 +149,11 @@ bool fbgui::checkHost() const { QHostInfo hostInfo = QHostInfo::fromName(baseURL.host()); if (hostInfo.error() != QHostInfo::NoError){ - qxtLog->debug() << "Lookup of " << baseURL.host() << "failed. Exiting..."; + qxtLog->debug() << "[gui] Lookup of " << baseURL.host() << "failed. Exiting..."; return false; } else{ - qxtLog->debug() << "Lookup of " << baseURL.host() << " succeeded."; + qxtLog->debug() << "[gui] Lookup of " << baseURL.host() << " succeeded."; return true; } } @@ -162,19 +162,19 @@ QByteArray fbgui::generatePOSTData(){ // hash testing SysInfo si; QByteArray data(si.getInfo("mac").toUtf8() + "|" + si.getInfo("ip").toUtf8()); - qxtLog->debug() << "Hashing: " << data; + qxtLog->debug() << "[post] Hashing: " << data; QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Md5); - qxtLog->debug() << "MD5 Hash: " << hash.toHex(); + qxtLog->debug() << "[post] MD5 Hash: " << hash.toHex(); // fetch serial number from usb rootfs QByteArray serial; QFile file(serialLocation); if (!file.exists()){ - qxtLog->debug() << "No such file: " << file.fileName(); + qxtLog->debug() << "[post] No such file: " << file.fileName(); serial = "10-23-43-55-67"; // tests } if (!file.open(QIODevice::ReadOnly)){ - qxtLog->debug() << "Could not open: " << file.fileName(); + qxtLog->debug() << "[post] Could not open: " << file.fileName(); serial = "10-23-43-55-67"; // tests } // everything ok, read data @@ -182,10 +182,10 @@ QByteArray fbgui::generatePOSTData(){ file.close(); if (serial.isEmpty()) - qxtLog->debug() << "No data in file: " << file.fileName(); + qxtLog->debug() << "[post] No data in file: " << file.fileName(); serial.chop(1); - qxtLog->debug() << "Serial number is: " << serial; + qxtLog->debug() << "[post] Serial number is: " << serial; // construct final byte array QByteArray postData("bootisoID=1"); -- cgit v1.2.3-55-g7522