1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-08-18 15:04:44 +02:00

fixes #2642 "GUI crashes if user cancels newFirewall dialog".

This commit is contained in:
Vadim Kurland
2011-08-11 15:48:52 -07:00
parent bd9ab07a5e
commit 1651e9c73a
4 changed files with 31 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
2011-08-11 Vadim Kurland <vadim@netcitadel.com>
* newFirewallDialog.cpp (cleanup): fixes #2642 "GUI crashes if
user cancels newFirewall dialog".
* RuleOptionsDialog.cpp (fillInterfaces): the drop-down list of
interfaces for the "route-through" rule option for PF and iptables
should include not only cluster interfaces, but also interfaces of

View File

@@ -1065,7 +1065,7 @@ bool newFirewallDialog::validateAddressAndMask(const QString &addr,
return true;
}
void newFirewallDialog::cancelClicked()
void newFirewallDialog::cleanup()
{
if (nfw)
{
@@ -1079,7 +1079,11 @@ void newFirewallDialog::cancelClicked()
delete tmpldb;
tmpldb = NULL;
}
}
void newFirewallDialog::cancelClicked()
{
cleanup();
reject();
}

View File

@@ -77,7 +77,7 @@ class newFirewallDialog : public QDialog, public FakeWizard
std::list<std::string> possible_inside_interface_labels;
std::list<std::string> possible_outside_interface_labels;
std::list<std::string> possible_dmz_interface_labels;
void fillInterfaceData(libfwbuilder::Interface *intf, QTextBrowser *qte);
void fillInterfaceSLList();
@@ -135,6 +135,7 @@ protected slots:
void nextClicked();
void backClicked();
void cleanup();
};
#endif // __NEWFIREWALLDIALOG_H

View File

@@ -67,7 +67,7 @@
</size>
</property>
<property name="currentIndex">
<number>4</number>
<number>2</number>
</property>
<widget class="QWidget" name="page1">
<layout class="QGridLayout" name="gridLayout_4">
@@ -1049,5 +1049,25 @@ You can change interface names and their IP addresses on the next page. Templat
</hint>
</hints>
</connection>
<connection>
<sender>newFirewallDialog_q</sender>
<signal>rejected()</signal>
<receiver>newFirewallDialog_q</receiver>
<slot>cleanup()</slot>
<hints>
<hint type="sourcelabel">
<x>324</x>
<y>294</y>
</hint>
<hint type="destinationlabel">
<x>324</x>
<y>294</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>cancelClicked()</slot>
<slot>cleanup()</slot>
</slots>
</ui>