Changeset 2615
- Timestamp:
- 08/19/08 14:42:24 (3 months ago)
- Location:
- pcbsd/trunk/kcmPFManager
- Files:
-
- 9 modified
-
adddlg.ui (modified) (2 diffs)
-
config/packetfilter.cpp (modified) (4 diffs)
-
config/rcconfig.cpp (modified) (3 diffs)
-
config/services.cpp (modified) (3 diffs)
-
kcm.cpp (modified) (1 diff)
-
pfaddlg.cpp (modified) (1 diff)
-
pfaddlg.hpp (modified) (3 diffs)
-
pfmanagerdlg.cpp (modified) (3 diffs)
-
pfmanagerdlg.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/trunk/kcmPFManager/adddlg.ui
r2178 r2615 97 97 </item> 98 98 <item row="0" column="1" colspan="2" > 99 <widget class="Q ComboBox" name="cbServices" >99 <widget class="Q3ComboBox" name="cbServices" > 100 100 <property name="editable" > 101 101 <bool>true</bool> … … 107 107 </item> 108 108 <item row="4" column="2" > 109 <widget class="Q ComboBox" name="cbDirection" />109 <widget class="Q3ComboBox" name="cbDirection" /> 110 110 </item> 111 111 <item row="5" column="2" > 112 <widget class="Q ComboBox" name="cbProtocol" />112 <widget class="Q3ComboBox" name="cbProtocol" /> 113 113 </item> 114 114 <item rowspan="2" row="6" column="2" > 115 <widget class="Q ComboBox" name="cbInterfaces" />115 <widget class="Q3ComboBox" name="cbInterfaces" /> 116 116 </item> 117 117 <item row="4" column="0" colspan="2" > -
pcbsd/trunk/kcmPFManager/config/packetfilter.cpp
r2178 r2615 10 10 #include <Q3Process> 11 11 #include <Q3UrlOperator> 12 #include <qmessagebox.h> 13 #include <Q3TextStream> 12 14 13 15 #include <iostream> … … 108 110 void PacketFilter::init ( void ) 109 111 { 112 110 113 RcConfig *config = RcConfig::fromDefault(); 111 114 … … 131 134 _rules.clear(); 132 135 133 if ( file.open( IO_ReadOnly) )134 { 135 Q TextStream stream(&file);136 if ( file.open(QIODevice::ReadOnly) ) 137 { 138 Q3TextStream stream(&file); 136 139 QString line; 137 140 … … 156 159 if ( file.open(IO_WriteOnly) ) 157 160 { 158 Q TextStream stream(&file);161 Q3TextStream stream(&file); 159 162 160 163 for ( size_t i = 0; i < _lines.size(); ++i ) -
pcbsd/trunk/kcmPFManager/config/rcconfig.cpp
r2178 r2615 5 5 #include <iostream> 6 6 #include <QRegExp> 7 #include <Q3TextStream> 7 8 8 9 RcConfig::RcConfig ( void ) … … 27 28 if ( file.open(IO_ReadOnly) ) 28 29 { // It went good 29 Q TextStream stream(&file);30 Q3TextStream stream(&file); 30 31 QString line; 31 32 … … 93 94 if ( file.open(IO_WriteOnly) ) 94 95 { 95 Q TextStream stream(&file);96 Q3TextStream stream(&file); 96 97 97 98 for ( qstr_vector_cit it = _lines.begin(); -
pcbsd/trunk/kcmPFManager/config/services.cpp
r2178 r2615 5 5 #include <qstringlist.h> 6 6 #include <qregexp.h> 7 #include <Q3TextStream> 7 8 8 9 const QString services::_service_file = "/etc/services"; … … 11 12 services::services ( void ) 12 13 { 14 load(); 13 15 } 14 16 … … 26 28 if ( serv.open(IO_ReadOnly) ) 27 29 { 28 Q TextStream stream(&serv);30 Q3TextStream stream(&serv); 29 31 QString line; 30 32 -
pcbsd/trunk/kcmPFManager/kcm.cpp
r2614 r2615 33 33 { // Show our dialog 34 34 _dlg = new PFManagerDlg(); 35 35 _dlg->load(); 36 36 _dlg->reparent(this, QPoint()); 37 37 load(); -
pcbsd/trunk/kcmPFManager/pfaddlg.cpp
r2178 r2615 7 7 #include <qlineedit.h> 8 8 #include <qpushbutton.h> 9 #include <QMessageBox> 9 10 #include <Q3ListBox> 10 11 11 PFAddDlg::PFAddDlg ( QWidget *parent, rule *rules ) 12 : AddDlg() 12 void PFAddDlg::init(void) 13 13 { 14 rule *rules = 0; 15 14 16 // Well: The incoming thing must always be the first item 15 17 // Otherwise it won't work -
pcbsd/trunk/kcmPFManager/pfaddlg.hpp
r2178 r2615 10 10 11 11 class PFAddDlg : public QDialog, private Ui::AddDlg 12 13 12 { 14 13 Q_OBJECT … … 22 21 public: 23 22 24 PFAddDlg ( QWidget *parent = 0, rule *rules = 0); 23 PFAddDlg() : QDialog() 24 { 25 setupUi(this); 26 } 27 25 28 ~PFAddDlg ( void ); 26 29 … … 41 44 void okClicked ( void ); 42 45 void cancelClicked ( void ); 46 void init(void ); 43 47 }; 44 48 -
pcbsd/trunk/kcmPFManager/pfmanagerdlg.cpp
r2181 r2615 86 86 void PFManagerDlg::addClicked ( void ) 87 87 { 88 PFAddDlg dlg(this); 88 PFAddDlg *dlg = new PFAddDlg(); 89 dlg->init(); 89 90 90 if ( dlg .exec() == QDialog::Accepted )91 if ( dlg->exec() == QDialog::Accepted ) 91 92 { 92 _firewall.add_rule(* dlg.rules());93 _firewall.add_rule(* dlg->rules()); 93 94 // Save content 94 95 _firewall.save(); … … 105 106 if (cur != 0) 106 107 { 107 PFAddDlg dlg(this); 108 PFAddDlg *dlg = new PFAddDlg(); 109 dlg->init(); 108 110 size_t tag = 0; 109 111 rule *rule = 0; … … 115 117 rule = &_firewall.rules()[tag]; 116 118 // Show 117 dlg .rules(rule);118 if ( dlg .exec() == QDialog::Accepted )119 dlg->rules(rule); 120 if ( dlg->exec() == QDialog::Accepted ) 119 121 { // Refresh the list 120 122 _firewall.save(); -
pcbsd/trunk/kcmPFManager/pfmanagerdlg.hpp
r2181 r2615 11 11 { 12 12 Q_OBJECT 13 14 PacketFilter _firewall;15 13 16 14 public: … … 49 47 } 50 48 49 // Create the _firewall object 50 PacketFilter _firewall; 51 51 52 ~PFManagerDlg ( void ); 52 53
