diff options
author | Jonathan Bauer | 2011-04-13 18:19:53 +0200 |
---|---|---|
committer | Jonathan Bauer | 2011-04-13 18:19:53 +0200 |
commit | ac32b9b876e5f44f4c1a31f18c11dc06004aeee9 (patch) | |
tree | 526d9cc4613abedb0db2ae677c910d7f0c37933a /src/fbgui.cpp | |
parent | cursor hidden until URL loaded (diff) | |
download | fbgui-ac32b9b876e5f44f4c1a31f18c11dc06004aeee9.tar.gz fbgui-ac32b9b876e5f44f4c1a31f18c11dc06004aeee9.tar.xz fbgui-ac32b9b876e5f44f4c1a31f18c11dc06004aeee9.zip |
skip trigger checks if trigger is already present
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r-- | src/fbgui.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index c252bcb..f130347 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -140,15 +140,8 @@ void fbgui::watchForTrigger() // check if fileToTriggerURL already exists if (fi.exists()){ qxtLog->debug() << "[watcher] " << fileToTriggerURL << " exists already!"; - // try to remove it - QFile file(fi.absoluteFilePath()); - if (file.remove()) - qxtLog->debug() << "[watcher] Purged: " << file.fileName(); - else{ - // this shouldn't happen ... - qxtLog->debug() << "[watcher] Could not remove: " << file.fileName(); - exit(EXIT_FAILURE); - } + // load URL + if (checkHost()) loadURL(); } else { // watch the path where trigger file is expected @@ -219,13 +212,14 @@ bool fbgui::checkHost() const void fbgui::loadURL() { // disconnect _watcher, his job is done - qxtLog->debug() << "[watcher] disconnected."; - _watcher->disconnect(this); - _watcher->deleteLater(); // memory problems with watcher + //qxtLog->debug() << "[watcher] disconnected."; + //_watcher->disconnect(this); + //_watcher->deleteLater(); // memory problems with watcher qxtLog->debug() << "[gui] Loading URL..."; QByteArray postData = generatePOSTData(); qxtLog->debug() << "[gui] POST data: " << postData; QNetworkRequest req(baseURL); + // show arrow cursor qApp->setOverrideCursor(QCursor(Qt::ArrowCursor)); _webView->load(req, QNetworkAccessManager::PostOperation, postData); } @@ -234,7 +228,7 @@ void fbgui::loadURL() * This method generates the POST data body. * * This method generates the POST data body. The body contains the - * MAC address, an hardwarehas and a specific serial number. + * MAC address, an hardwarehash and a specific serial number. * The hardwarehash is a MD5 hash over the MAC address and the * mainboard serial number. * The specific serial number is set at the creation of the usb boot stick. |