[PC-BSD Commits] r17260 - pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Tue Jun 12 10:03:51 PDT 2012


Author: kris
Date: 2012-06-12 17:03:51 +0000 (Tue, 12 Jun 2012)
New Revision: 17260

Modified:
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui
Log:

Use the new restartNetworking() library function, which fixes issues losing route



Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2012-06-12 17:01:47 UTC (rev 17259)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2012-06-12 17:03:51 UTC (rev 17260)
@@ -602,16 +602,8 @@
 
 void NetworkMan::restartNetwork()
 {
+   Utils::restartNetworking();
     
-   //Set the hostname
-   //runCommand("hostname " + lineHostname->text());
-
-   // Set the gateway device name
-   if ( lineGateway->text() != "..."  ) {
-	runCommand("route delete default" );
-	runCommand("route add default " + lineGateway->text() );
-   }
-
 }
 
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui	2012-06-12 17:01:47 UTC (rev 17259)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui	2012-06-12 17:03:51 UTC (rev 17260)
@@ -474,143 +474,105 @@
          <property name="checked">
           <bool>false</bool>
          </property>
-         <widget class="QLineEdit" name="lineIPv6Gateway">
-          <property name="geometry">
-           <rect>
-            <x>123</x>
-            <y>34</y>
-            <width>311</width>
-            <height>18</height>
-           </rect>
-          </property>
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="inputMask">
-           <string/>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-         <widget class="QLineEdit" name="lineIPv6DNS1">
-          <property name="geometry">
-           <rect>
-            <x>123</x>
-            <y>62</y>
-            <width>311</width>
-            <height>18</height>
-           </rect>
-          </property>
-         </widget>
-         <widget class="QLineEdit" name="lineIPv6DNS2">
-          <property name="geometry">
-           <rect>
-            <x>123</x>
-            <y>90</y>
-            <width>311</width>
-            <height>18</height>
-           </rect>
-          </property>
-         </widget>
-         <widget class="QWidget" name="verticalLayoutWidget">
-          <property name="geometry">
-           <rect>
-            <x>10</x>
-            <y>30</y>
-            <width>111</width>
-            <height>80</height>
-           </rect>
-          </property>
-          <layout class="QVBoxLayout" name="verticalLayout_6">
-           <item>
-            <widget class="QLabel" name="textLabel11_2_4">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>IPv6 gateway:</string>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="label_IPv6_DNS1">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>IPV6 DNS 1:</string>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="label_IPv6_DNS2">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="layoutDirection">
-              <enum>Qt::LeftToRight</enum>
-             </property>
-             <property name="text">
-              <string>IPv6 DNS 2:</string>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </widget>
-         <widget class="QPushButton" name="IPV6DNS1Button">
-          <property name="geometry">
-           <rect>
-            <x>440</x>
-            <y>60</y>
-            <width>111</width>
-            <height>23</height>
-           </rect>
-          </property>
-          <property name="text">
-           <string>Public servers</string>
-          </property>
-         </widget>
-         <widget class="QPushButton" name="IPV6DNS2Button">
-          <property name="geometry">
-           <rect>
-            <x>440</x>
-            <y>90</y>
-            <width>111</width>
-            <height>23</height>
-           </rect>
-          </property>
-          <property name="text">
-           <string>Public servers</string>
-          </property>
-         </widget>
+         <layout class="QGridLayout" name="gridLayout_4">
+          <item row="0" column="0" rowspan="3">
+           <layout class="QVBoxLayout" name="verticalLayout_6">
+            <item>
+             <widget class="QLabel" name="textLabel11_2_4">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text">
+               <string>IPv6 gateway:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_IPv6_DNS1">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text">
+               <string>IPV6 DNS 1:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_IPv6_DNS2">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="layoutDirection">
+               <enum>Qt::LeftToRight</enum>
+              </property>
+              <property name="text">
+               <string>IPv6 DNS 2:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="lineIPv6Gateway">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="inputMask">
+             <string/>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QLineEdit" name="lineIPv6DNS1"/>
+          </item>
+          <item row="1" column="2">
+           <widget class="QPushButton" name="IPV6DNS1Button">
+            <property name="text">
+             <string>Public servers</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QLineEdit" name="lineIPv6DNS2"/>
+          </item>
+          <item row="2" column="2">
+           <widget class="QPushButton" name="IPV6DNS2Button">
+            <property name="text">
+             <string>Public servers</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
         </widget>
        </item>
       </layout>



More information about the Commits mailing list