From e9e362bc2430fa54bfe1fcab8eb361721d93a4f1 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 7 Mar 2011 23:42:54 +0100 Subject: jso --- src/JSObject.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/JSObject.cpp') 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(); } -- cgit v1.2.3-55-g7522