diff options
| author | Jonathan Bauer | 2011-03-07 23:42:54 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-07 23:42:54 +0100 |
| commit | e9e362bc2430fa54bfe1fcab8eb361721d93a4f1 (patch) | |
| tree | 0896dbf72fe8e257b8843d819f0d9873fd441b0c /src/JSObject.cpp | |
| parent | typos (diff) | |
| download | fbgui-e9e362bc2430fa54bfe1fcab8eb361721d93a4f1.tar.gz fbgui-e9e362bc2430fa54bfe1fcab8eb361721d93a4f1.tar.xz fbgui-e9e362bc2430fa54bfe1fcab8eb361721d93a4f1.zip | |
jso
Diffstat (limited to 'src/JSObject.cpp')
| -rw-r--r-- | src/JSObject.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/JSObject.cpp b/src/JSObject.cpp index 2d926b5..708e825 100644 --- a/src/JSObject.cpp +++ b/src/JSObject.cpp @@ -6,12 +6,13 @@ */ #include "JSObject.h" +#include "sysInfo.h" -extern QUrl baseURL; extern bool debug; //------------------------------------------------------------------------------------------------------- JSObject::JSObject(QWebFrame *parent) { + // check for better way to use evaluateJavaScript() _parent = parent; } //------------------------------------------------------------------------------------------------------- @@ -20,9 +21,16 @@ JSObject::~JSObject() {} /* TEST */ QString JSObject::getInfo(QString info) { + static sysInfo si; if (debug) qDebug() << "Requested info: " << info; - if (info == QString("mac")) - return "MAC_ADDRESS"; + if (debug) qDebug() << "sysInfo output: " << si.getInfo(info); + if (info == QString("time")){ + return si.getInfo(info); + } + if (info == QString("mac")){ + return si.getInfo(info); + //return "MAC_ADDRESS"; + } else return "no value"; } @@ -57,7 +65,7 @@ void JSObject::updateProgressBar(int i) void JSObject::quitAll() { - qDebug() << "Quit signal."; + if (debug) qDebug() << "Quit signal."; emit signalQuitAll(); } |
