diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/html/sysInfoTest.html | 21 | ||||
-rw-r--r-- | src/sysInfo.cpp | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/html/sysInfoTest.html b/src/html/sysInfoTest.html new file mode 100644 index 0000000..ab4247c --- /dev/null +++ b/src/html/sysInfoTest.html @@ -0,0 +1,21 @@ + + +<html> +<head> +<script type="text/javascript"> +function getInfo(){ + var tmp = jsObject.getSysInfo(document.form.info.value); + document.form.returnFromQT.value = tmp; +} +</script> +</head> +<body> +<form name="form"> + <p> + <input type="text" name="info"> + <input type="button" name="toQT" value="Request info" + onclick="getInfo()"> + <input type="text" name="returnFromQT"> + </p> +</body> +</html> diff --git a/src/sysInfo.cpp b/src/sysInfo.cpp index b64fdce..8775777 100644 --- a/src/sysInfo.cpp +++ b/src/sysInfo.cpp @@ -3,11 +3,13 @@ #include <QTime> #include <QNetworkInterface> -sysInfo::sysInfo(){} +sysInfo::sysInfo(){ + if (debug) qDebug() << "sysInfo created."; +} sysInfo::~sysInfo(){} QString sysInfo::getInfo(QString& infoName){ if (debug) qDebug() << "sysInfo : getInfo(" << infoName << ")"; - if (infoName == QString("MAC")) + if (infoName == QString("mac")) return getMACAddress(); // still here? --> error return "error"; |