From f02fce44c8a751af983875e734904cf8e50ab21a Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 24 Mar 2011 13:11:52 +0100 Subject: stuff --- src/fbgui.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 2618ebf..b56b585 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -37,14 +37,10 @@ fbgui::fbgui() qxtLog->debug() << "Initializing fbgui..."; } - // setup base layout of the gui + // setup layout of the gui: debug split or browser _webView = new QWebView(this); - // debug console split or normal browser - if (debugMode == 1) - setupDebugSplit(); - else { - setCentralWidget(_webView); - } + if (debugMode == 1) setupDebugSplit(); + else setCentralWidget(_webView); createActions(); // initialize javascript interface @@ -65,7 +61,7 @@ fbgui::fbgui() QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi, SLOT(callbackOnFinished())); - // load content + // load filler page & start watching for fileToTriggerURL _webView->load(QUrl("qrc:/html/loadAbout.html")); watchForTrigger(); @@ -173,22 +169,14 @@ QByteArray fbgui::generatePOSTData(){ // fetch serial number from usb rootfs QByteArray serial; QFile file(serialLocation); - if (!file.exists()){ - qxtLog->debug() << "[post] No such file: " << file.fileName(); - serial = "10-23-43-55-67"; // tests - } if (!file.open(QIODevice::ReadOnly)){ - qxtLog->debug() << "[post] Could not open: " << file.fileName(); + qxtLog->debug() << "[post] No such file: " << file.fileName(); serial = "10-23-43-55-67"; // tests } // everything ok, read data serial = file.readAll(); file.close(); - - if (serial.isEmpty()) - qxtLog->debug() << "[post] No data in file: " << file.fileName(); - - serial.chop(1); + serial.chop(1); // chop EOF qxtLog->debug() << "[post] Serial number is: " << serial; // construct final byte array -- cgit v1.2.3-55-g7522