mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 00:19:55 +02:00
see #2283 fixes GUI crash when importer could not create firewall object
This commit is contained in:
@@ -101,21 +101,32 @@ ImportFirewallConfigurationWizard::~ImportFirewallConfigurationWizard()
|
|||||||
|
|
||||||
void ImportFirewallConfigurationWizard::accept()
|
void ImportFirewallConfigurationWizard::accept()
|
||||||
{
|
{
|
||||||
if (platform == "pix" || platform == "fwsm")
|
if (fwbdebug) qDebug() << "ImportFirewallConfigurationWizard::accept()"
|
||||||
|
<< "fw=" << fw;
|
||||||
|
|
||||||
|
if (fw != NULL && (platform == "pix" || platform == "fwsm"))
|
||||||
dynamic_cast<IC_NetworkZonesPage*>(
|
dynamic_cast<IC_NetworkZonesPage*>(
|
||||||
page(Page_NetworkZones))->setNetworkZones();
|
page(Page_NetworkZones))->setNetworkZones();
|
||||||
|
|
||||||
|
if (fwbdebug) qDebug() << "ImportFirewallConfigurationWizard::accept()"
|
||||||
|
<< "merging object trees";
|
||||||
|
|
||||||
// merge dbcopy into db
|
// merge dbcopy into db
|
||||||
|
|
||||||
CompareObjectsDialog cod(this);
|
CompareObjectsDialog cod(this);
|
||||||
db_orig->merge(db_copy, &cod);
|
db_orig->merge(db_copy, &cod);
|
||||||
|
|
||||||
|
if (fwbdebug) qDebug() << "ImportFirewallConfigurationWizard::accept()"
|
||||||
|
<< "merge done";
|
||||||
|
|
||||||
ProjectPanel *pp = mw->activeProject();
|
ProjectPanel *pp = mw->activeProject();
|
||||||
QString filename = pp->getFileName();
|
QString filename = pp->getFileName();
|
||||||
|
|
||||||
QCoreApplication::postEvent(
|
QCoreApplication::postEvent(
|
||||||
mw, new reloadObjectTreeImmediatelyEvent(filename));
|
mw, new reloadObjectTreeImmediatelyEvent(filename));
|
||||||
|
|
||||||
|
if (fw)
|
||||||
|
{
|
||||||
QCoreApplication::postEvent(
|
QCoreApplication::postEvent(
|
||||||
pp, new showObjectInTreeEvent(filename, fw->getId()));
|
pp, new showObjectInTreeEvent(filename, fw->getId()));
|
||||||
|
|
||||||
@@ -131,7 +142,7 @@ void ImportFirewallConfigurationWizard::accept()
|
|||||||
if (first_policy)
|
if (first_policy)
|
||||||
QCoreApplication::postEvent(
|
QCoreApplication::postEvent(
|
||||||
pp, new openRulesetEvent(filename, first_policy->getId()));
|
pp, new openRulesetEvent(filename, first_policy->getId()));
|
||||||
|
}
|
||||||
|
|
||||||
QWizard::accept();
|
QWizard::accept();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user