summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index 3ee9f83..d4b5c82 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -37,8 +37,15 @@ fbgui::fbgui()
//watchDHCP();
// PBS test (working dont delete)
+ QFileInfo fi("/tmp/serial");
+ if (fi.exists())
+ qxtLog->debug() << "Found /tmp/serial !";
+ else
+ qxtLog->debug() << "No file /tmp/serial !";
+ // TODO append serial number to postData.
+
QNetworkRequest req(baseURL);
- QByteArray postData = "mac=d8:d3:85:80:81:8b&hardwarehash=12341234123412341234123412341234&bootisoID=1";
+ QByteArray postData = "mac=d8:d3:85:80:81:8b&hardwarehash=12341234123412341234123412341234&bootisoID=1&serial=";
_webView->load(req, QNetworkAccessManager::PostOperation, postData);
@@ -146,8 +153,8 @@ void fbgui::watchDHCP()
{
_webView->load(QUrl("qrc:/html/loadAbout.html"));
// TODO change directory to the right one...
- qxtLog->debug() << "Watching /etc/fbgui";
- QStringList pathToWatch("/etc/fbgui");
+ qxtLog->debug() << "Watching " << fileToTriggerURL;
+ QStringList pathToWatch(fileToTriggerURL);
_watcher = new QFileSystemWatcher(pathToWatch, this);
QObject::connect(_watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(netAccessible(const QString&)));
}