summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-01 01:23:16 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-01 01:23:16 +0200
commite90d7c5b9b4df9694580161186268c82907da634 (patch)
tree5c4de8b7580cabf9309a945df2bed1e07b1c3948
parent4b27aba1df5315b12e72425d3fd9a6803612646b (diff)
parent079a2b6bd9ef3b5190371b088e3ba786e7d508df (diff)
Merge branch '1.0' of scm.dev.nokia.troll.no:qtmobility/qtm-systeminfo into 1.0-integration
* '1.0' of scm.dev.nokia.troll.no:qtmobility/qtm-systeminfo: fix build do not return mac address is wifi has no power fix misspelling MMC -> MCC
-rw-r--r--examples/sysinfo/dialog.ui4
-rw-r--r--examples/sysinfo/dialog_landscape.ui8
-rw-r--r--examples/sysinfo/dialog_s60.ui4
-rw-r--r--src/systeminfo/qsysteminfo_linux_common.cpp13
4 files changed, 20 insertions, 9 deletions
diff --git a/examples/sysinfo/dialog.ui b/examples/sysinfo/dialog.ui
index cbab66ae26..cb3d136869 100644
--- a/examples/sysinfo/dialog.ui
+++ b/examples/sysinfo/dialog.ui
@@ -797,7 +797,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_48">
<property name="text">
- <string>Current MMC:</string>
+ <string>Current MCC:</string>
</property>
</widget>
</item>
@@ -863,7 +863,7 @@
<item row="4" column="0">
<widget class="QLabel" name="label_49">
<property name="text">
- <string>Home MMC:</string>
+ <string>Home MCC:</string>
</property>
</widget>
</item>
diff --git a/examples/sysinfo/dialog_landscape.ui b/examples/sysinfo/dialog_landscape.ui
index 3354e70b2e..2794583210 100644
--- a/examples/sysinfo/dialog_landscape.ui
+++ b/examples/sysinfo/dialog_landscape.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>553</width>
- <height>227</height>
+ <width>794</width>
+ <height>237</height>
</rect>
</property>
<property name="windowTitle">
@@ -1269,7 +1269,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Current MMC:</string>
+ <string>Current MCC:</string>
</property>
</widget>
</item>
@@ -1303,7 +1303,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Home MMC:</string>
+ <string>Home MCC:</string>
</property>
</widget>
</item>
diff --git a/examples/sysinfo/dialog_s60.ui b/examples/sysinfo/dialog_s60.ui
index e9eb8c9784..fa3017de2a 100644
--- a/examples/sysinfo/dialog_s60.ui
+++ b/examples/sysinfo/dialog_s60.ui
@@ -1372,7 +1372,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Current MMC:</string>
+ <string>Current MCC:</string>
</property>
</widget>
</item>
@@ -1444,7 +1444,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Home MMC:</string>
+ <string>Home MCC:</string>
</property>
</widget>
</item>
diff --git a/src/systeminfo/qsysteminfo_linux_common.cpp b/src/systeminfo/qsysteminfo_linux_common.cpp
index 62fea1aa75..fe93d1b266 100644
--- a/src/systeminfo/qsysteminfo_linux_common.cpp
+++ b/src/systeminfo/qsysteminfo_linux_common.cpp
@@ -541,12 +541,23 @@ QString QSystemNetworkInfoLinuxCommonPrivate::macAddress(QSystemNetworkInfo::Net
const QString devFile = baseSysDir + dir;
const QFileInfo fi(devFile + "/wireless");
if(fi.exists()) {
+ bool powered=false;
+ QFile linkmode(devFile+"/link_mode"); //check for dev power
+ if(linkmode.exists() && linkmode.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&linkmode);
+ in >> result;
+ if(result.contains("1"))
+ powered = true;
+ linkmode.close();
+ }
+
QFile rx(devFile + "/address");
if(rx.exists() && rx.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream in(&rx);
in >> result;
rx.close();
- return result;
+ if(powered)
+ return result;
}
}
}