summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp20
1 files changed, 10 insertions, 10 deletions
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");