diff options
| author | Jonathan Bauer | 2011-03-20 19:37:58 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-20 19:37:58 +0100 |
| commit | 3e76f5ca4439ae87f436080b840dba180fb842d3 (patch) | |
| tree | f02a320058973ec60fa85a84491ce222c513aefd /src/sysInfo.cpp | |
| parent | debug console dummy only shown if debug mode active (diff) | |
| download | fbgui-3e76f5ca4439ae87f436080b840dba180fb842d3.tar.gz fbgui-3e76f5ca4439ae87f436080b840dba180fb842d3.tar.xz fbgui-3e76f5ca4439ae87f436080b840dba180fb842d3.zip | |
debug console now powered by qxt, custom engines, updated debug msgs. Download manager now uses notify(message) to send error/status to the javascript interface, checks for download errors (still some missing)
Diffstat (limited to 'src/sysInfo.cpp')
| -rw-r--r-- | src/sysInfo.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sysInfo.cpp b/src/sysInfo.cpp index ca20b95..a261fe5 100644 --- a/src/sysInfo.cpp +++ b/src/sysInfo.cpp @@ -8,14 +8,12 @@ // ------------------------------------------------------------------------------------------------ sysInfo::sysInfo(){ - if (debug) qDebug() << "sysInfo created."; - // Maybe search for eth0, etc } // ------------------------------------------------------------------------------------------------ sysInfo::~sysInfo(){} // ------------------------------------------------------------------------------------------------ QString sysInfo::getInfo(QString& infoName){ - if (debug) qDebug() << "sysInfo : getInfo(" << infoName << ")"; + qxtLog->debug() << "[sysInfo] requested " << infoName; if (infoName == QString("mac")) return getMACAddress(); else if (infoName == QString("ip")) @@ -32,7 +30,7 @@ QString sysInfo::getMACAddress(){ /* Returns MAC address of eth0 for now. */ QNetworkInterface qni = QNetworkInterface::interfaceFromName(QString("eth0")); if (!qni.isValid()){ - if (debug) qDebug() << "No interface matching \"eth0\" found."; + qxtLog->debug() << "No interface matching \"eth0\" found."; return "no_eth0"; } //eth0_index = qni.index(); @@ -47,12 +45,11 @@ QString sysInfo::getIPAddress(){ // This is does not return the right IP atm... foreach(QHostAddress addr, addrlist){ if (addr.protocol() == QAbstractSocket::IPv4Protocol && addr != QHostAddress::LocalHost){ - if (debug) qDebug() << "eth0: IPv4 Address: " << addr.toString(); return addr.toString(); } } // still here? - if (debug) qDebug() << "ip_error"; + qxtLog->debug() << "ip_error"; return "ip_error"; } // ------------------------------------------------------------------------------------------------ @@ -72,7 +69,7 @@ QByteArray sysInfo::getNames(){ QJson::Serializer serializer; QByteArray json = serializer.serialize(jsonV); - if (debug) qDebug() << json; + qxtLog->debug() << json; return json; } @@ -87,7 +84,7 @@ QString sysInfo::getAllInfos(){ //QJson::Serializer serializer; QByteArray json = serializer.serialize(infos); - if (debug) qDebug() << json; + qxtLog->debug() << json; return json; } // ------------------------------------------------------------------------------------------------ |
