summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-24 11:53:32 +0100
committerJonathan Bauer2011-03-24 11:53:32 +0100
commitbb779c6c002acc56af95ca0e7de6aaecc3fcd559 (patch)
tree2f44dff85ebaf9d7be95cbc2c3a3de27886b2c35 /src
parentserial path configurable (diff)
downloadfbgui-bb779c6c002acc56af95ca0e7de6aaecc3fcd559.tar.gz
fbgui-bb779c6c002acc56af95ca0e7de6aaecc3fcd559.tar.xz
fbgui-bb779c6c002acc56af95ca0e7de6aaecc3fcd559.zip
misc
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp12
-rw-r--r--src/fbgui.cpp3
-rw-r--r--src/main.cpp12
3 files changed, 13 insertions, 14 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 501b1d5..bcfaafb 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -144,17 +144,17 @@ void DownloadManager::downloadProgress(qint64 bytesIn, qint64 bytesTotal)
// calculate current speed
double speed = bytesIn * 1000 / dltime.elapsed();
QString unit;
- if (speed < 1024) {
+ if (speed < 1024){
unit = "bytes/sec";
- }
- else if (speed < 1024*1024) {
+ }
+ else if (speed < 1024*1024){
speed /= 1024;
unit = "KB/s";
- }
- else {
+ }
+ else{
speed /= 1024*1024;
unit = "MB/s";
- }
+ }
// update progress only if difference higher than the updateInterval setting
currentProgress = ((bytesIn * 100) / bytesTotal);
if (currentProgress - lastProgress >= updateInterval){
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index c0a8839..7c590c5 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -154,9 +154,8 @@ void fbgui::loadURL(){
QNetworkRequest req(baseURL);
QByteArray postData("mac=d8:d3:85:80:81:8b&hardwarehash=12341234123412341234123412341234&bootisoID=1&serial=");
- // serial number
- QByteArray serial;
// fetch serial number from usb rootfs
+ QByteArray serial;
QFile file(serialLocation);
if (!file.exists()){
qxtLog->debug() << "No such file: " << file.fileName();
diff --git a/src/main.cpp b/src/main.cpp
index 1fa82ee..514d124 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
case 'h':
clOpts.insert("help", "help");
break;
- }
+ }
opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
}
@@ -148,11 +148,11 @@ int main(int argc, char *argv[])
// basic std out engine is ugly... not yet initialised so using qDebug
qDebug() << "************* CONFIG INFO *************";
- qDebug() << "configFilePath: " << configFilePath;
- qDebug() << "baseURL: " << baseURL;
- qDebug() << "downloadDir : " << downloadPath;
- qDebug() << "trigger: " << fileToTriggerURL;
- qDebug() << "serialLocation: " << serialLocation;
+ qDebug() << "configFilePath: " << configFilePath.toUtf8();
+ qDebug() << "baseURL: " << baseURL.toString().toUtf8();
+ qDebug() << "downloadDir : " << downloadPath.toUtf8();
+ qDebug() << "trigger: " << fileToTriggerURL.toUtf8();
+ qDebug() << "serialLocation: " << serialLocation.toUtf8();
qDebug() << "*******************************************";
// start fbgui