[PC-BSD Commits] r17258 - pcbsd/current/src-qt4/pc-netmanager/src/wificonfig
svn at pcbsd.org
svn at pcbsd.org
Tue Jun 12 07:49:36 PDT 2012
Author: kris
Date: 2012-06-12 14:49:35 +0000 (Tue, 12 Jun 2012)
New Revision: 17258
Modified:
pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Log:
Fix displaying static WIFI IP address
Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2012-06-12 14:03:33 UTC (rev 17257)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp 2012-06-12 14:49:35 UTC (rev 17258)
@@ -1169,15 +1169,18 @@
} else {
// Look for an IP configuration
tmp2 = tmp;
- tmp2.remove(0, tmp2.lastIndexOf("laggport") + 9);
+
+ if ( tmp.indexOf("laggport") != -1 )
+ tmp2.remove(0, tmp2.lastIndexOf("laggport") + 9);
+
tmp2 = tmp2.simplified();
- tmp2.remove(0, tmp2.indexOf(" "));
- tmp2 = tmp2.simplified();
- tmp2.truncate(tmp2.indexOf(" "));
+ if ( tmp.indexOf("WPA") == 0)
+ tmp2.remove(0, tmp2.indexOf(" ") + 1);
+
if ( ! tmp2.isEmpty()) {
// Get the IP address first
- lineIP->setText(tmp2);
+ lineIP->setText(tmp2.section(" ", 0, 0));
// Look for the netmask
if ( tmp.indexOf("netmask") != -1 ) {
More information about the Commits
mailing list