[PC-BSD Commits] r2079 - pcbsd/trunk/ethernetconfig

svn at pcbsd.org svn at pcbsd.org
Tue Jun 10 07:43:00 PDT 2008


Author: tim
Date: 2008-06-10 07:42:59 -0700 (Tue, 10 Jun 2008)
New Revision: 2079

Modified:
   pcbsd/trunk/ethernetconfig/ethernetconfigwidget.cpp
Log:
Refactored for libpcbsd

Modified: pcbsd/trunk/ethernetconfig/ethernetconfigwidget.cpp
===================================================================
--- pcbsd/trunk/ethernetconfig/ethernetconfigwidget.cpp	2008-06-10 14:38:52 UTC (rev 2078)
+++ pcbsd/trunk/ethernetconfig/ethernetconfigwidget.cpp	2008-06-10 14:42:59 UTC (rev 2079)
@@ -36,7 +36,6 @@
 #include <qapplication.h>
 #include <qtimer.h>
 #include <qpushbutton.h>
-#include <qregexp.h>
 
 #include <iostream>
 
@@ -468,10 +467,8 @@
 
 QString ethernetconfigWidget::getNameForIdent( QString ident )
 {
-    uint pos = ident.find(QRegExp("[0-9]+$"));
-    QString devNum = ident.mid(pos);
-    ident.truncate(pos);
-    return Utils::sysctl("dev." + ident + "." + devNum + ".%desc");  
+    NetworkInterface ifr(ident);
+    return ifr.desc();
 }
 
 QString ethernetconfigWidget::getIpForIdent( QString ident )



More information about the Commits mailing list