summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-04-13 18:19:53 +0200
committerJonathan Bauer2011-04-13 18:19:53 +0200
commitac32b9b876e5f44f4c1a31f18c11dc06004aeee9 (patch)
tree526d9cc4613abedb0db2ae677c910d7f0c37933a /src/fbgui.cpp
parentcursor hidden until URL loaded (diff)
downloadfbgui-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.cpp20
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.