diff options
| author | Jonathan Bauer | 2011-03-24 13:11:52 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-24 13:11:52 +0100 |
| commit | f02fce44c8a751af983875e734904cf8e50ab21a (patch) | |
| tree | 1fde481d21e57f45d78f1aba09e794da5d0d3bb7 /src | |
| parent | _watcher disconnect once loadURL succeeded (diff) | |
| download | fbgui-f02fce44c8a751af983875e734904cf8e50ab21a.tar.gz fbgui-f02fce44c8a751af983875e734904cf8e50ab21a.tar.xz fbgui-f02fce44c8a751af983875e734904cf8e50ab21a.zip | |
stuff
Diffstat (limited to 'src')
| -rw-r--r-- | src/fbgui.cpp | 24 |
1 files 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 |
