[PC-BSD Commits] r622 - pcbsd/trunk/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Fri Aug 24 09:22:50 PDT 2007


Author: tim
Date: 2007-08-24 09:22:49 -0700 (Fri, 24 Aug 2007)
New Revision: 622

Modified:
   pcbsd/trunk/NetworkManager/NetworkManager.pro
   pcbsd/trunk/NetworkManager/networkman.ui
   pcbsd/trunk/NetworkManager/networkman.ui.h
Log:
Don't allow spaces in hostnames. TODO: Fix this properly once we're allowed to change interfaces again, post 1.4-RELEASE

Modified: pcbsd/trunk/NetworkManager/NetworkManager.pro
===================================================================
--- pcbsd/trunk/NetworkManager/NetworkManager.pro	2007-08-23 21:20:28 UTC (rev 621)
+++ pcbsd/trunk/NetworkManager/NetworkManager.pro	2007-08-24 16:22:49 UTC (rev 622)
@@ -1,9 +1,7 @@
+TEMPLATE	= lib
 LANGUAGE	= C++
-TEMPLATE	= lib
 
 CONFIG	+= qt warn_on debug release
-TARGET  = kcm_pcbsdnetwork
-DESTDIR = /usr/local/lib/kde3/
 
 HEADERS	+= kcm.h
 
@@ -16,6 +14,13 @@
 IMAGES	= connect_to_network.png \
 	network_local.png
 
+TARGET  = kcm_pcbsdnetwork
+DESTDIR = /usr/local/lib/kde3/
+
+
+
+
+
 TRANSLATIONS = NetworkManager_en.ts
 
 unix {

Modified: pcbsd/trunk/NetworkManager/networkman.ui
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui	2007-08-23 21:20:28 UTC (rev 621)
+++ pcbsd/trunk/NetworkManager/networkman.ui	2007-08-24 16:22:49 UTC (rev 622)
@@ -765,12 +765,6 @@
         <slot>slotPPPOEChanged()</slot>
     </connection>
     <connection>
-        <sender>comboPPPOEDev</sender>
-        <signal>highlighted(const QString&amp;)</signal>
-        <receiver>NetworkMan</receiver>
-        <slot>slotCheckGlobalText(const QString&amp;)</slot>
-    </connection>
-    <connection>
         <sender>checkPPPAlwaysOn</sender>
         <signal>clicked()</signal>
         <receiver>NetworkMan</receiver>
@@ -859,7 +853,7 @@
     <slot access="private">refreshDevices()</slot>
     <slot access="private">slotSysTray()</slot>
     <slot>save()</slot>
-    <slot access="private">slotCheckGlobalText( const QString &amp; text )</slot>
+    <slot access="private">slotCheckGlobalText()</slot>
     <slot access="private">slotDoubleClick( QListBoxItem * item )</slot>
     <slot>slotPPPOECheckBox()</slot>
     <slot access="private">slotPPPOEChanged()</slot>

Modified: pcbsd/trunk/NetworkManager/networkman.ui.h
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui.h	2007-08-23 21:20:28 UTC (rev 621)
+++ pcbsd/trunk/NetworkManager/networkman.ui.h	2007-08-24 16:22:49 UTC (rev 622)
@@ -36,14 +36,14 @@
     connect(listNetDev, SIGNAL(doubleClicked( QListBoxItem *) ), this, SLOT(slotDoubleClick(QListBoxItem *) ) );
          
     // Connect the slots to determine if we need to enable the apply button
-    connect( lineHostname, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
-    connect( lineGateway, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
-    connect( lineDNS1, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
-    connect( lineDNS2, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
-    connect( linePPPUsername, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
-    connect( linePPPPassword, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    connect( lineHostname, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
+    connect( lineGateway, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
+    connect( lineDNS1, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
+    connect( lineDNS2, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
+    connect( linePPPUsername, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
+    connect( linePPPPassword, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
     
-    connect( lineIPv6Gateway, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    connect( lineIPv6Gateway, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText() ) );
     
     
     // Load any global settings
@@ -882,7 +882,7 @@
 }
 
 
-void NetworkMan::slotCheckGlobalText( const QString &text )
+void NetworkMan::slotCheckGlobalText()
 {
   
   
@@ -905,6 +905,9 @@
 	 return;
      }
      
+     //TODO - Warn about invalid hostnames and regexp their validity. Since we're in an interface freeze right now, we'll just have to strip out whitespace instead.
+     lineHostname->setText(lineHostname->text().remove(" "));
+     
      Changed=TRUE;
      emit changed(TRUE);
 }
@@ -1078,8 +1081,7 @@
 void NetworkMan::slotPPPOEChanged()
 {
     // Run the check to see if we need to enable the apply button
-    slotCheckGlobalText( "");
-
+    slotCheckGlobalText();
 }
 
 



More information about the Commits mailing list