[PATCH] wpa_gui-qt4: silence compile warning + wpsTab enable/disable

Kel Modderman kel
Sun Jan 11 04:45:39 PST 2009


Fix compile warning by renaming gridLayout to wpsGridLayout in wpagui.ui, it
seems to be used internally.

/usr/bin/uic-qt4 eventhistory.ui -o .ui/ui_eventhistory.h
/usr/bin/uic-qt4 scanresults.ui -o .ui/ui_scanresults.h
/usr/bin/uic-qt4 wpagui.ui -o .ui/ui_wpagui.h
Warning: name gridLayout is already used
/usr/bin/uic-qt4 userdatarequest.ui -o .ui/ui_userdatarequest.h
/usr/bin/uic-qt4 networkconfig.ui -o .ui/ui_networkconfig.h

Also disable WPS tab if the running supplicant doesn't support that, just as
the WPS action menu is.

Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.ui
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.ui
@@ -293,7 +293,7 @@
        <attribute name="title" >
         <string>WPS</string>
        </attribute>
-       <layout class="QGridLayout" name="gridLayout" >
+       <layout class="QGridLayout" name="wpsGridLayout" >
         <item row="0" column="0" >
          <widget class="QLabel" name="label_2" >
           <property name="text" >
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -407,6 +407,7 @@ int WpaGui::openCtrlConnection(const cha
 		QString res(buf);
 		QStringList types = res.split(QChar(' '));
 		actionWPS->setEnabled(types.contains("WSC"));
+		wpsTab->setEnabled(types.contains("WSC"));
 	}
 
 	return 0;
---



More information about the Hostap mailing list