From ca833ec50237469b0588299c8c4b3c687fc19786 Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Sat, 7 Mar 2009 04:32:28 +0000 Subject: [PATCH] * ProjectPanel.h (class ProjectPanel): code clean-up: removed obsolete method getAddOnLibs() --- build_num | 2 +- doc/ChangeLog | 5 +++++ src/gui/DiscoveryDruid.cpp | 2 +- src/gui/FWWindow.cpp | 9 -------- src/gui/FWWindow.h | 2 -- src/gui/ObjectManipulator.cpp | 19 ++++++---------- src/gui/PrefsDialog.cpp | 41 ----------------------------------- src/gui/PrefsDialog.h | 1 - src/gui/ProjectPanel.cpp | 7 ------ src/gui/ProjectPanel.h | 2 -- src/gui/main.cpp | 2 -- src/gui/newFirewallDialog.cpp | 6 ++--- src/gui/newHostDialog.cpp | 6 ++--- 13 files changed, 20 insertions(+), 84 deletions(-) diff --git a/build_num b/build_num index 7e8adec89..2bd226144 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 776 +#define BUILD_NUM 777 diff --git a/doc/ChangeLog b/doc/ChangeLog index 64f500622..4f2d3ca29 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-03-06 vadim + + * ProjectPanel.h (class ProjectPanel): code clean-up: removed + obsolete method getAddOnLibs() + 2009-03-05 vadim * RoutingCompiler_ipt.cpp (addressRangesInDst::processNext): fixed diff --git a/src/gui/DiscoveryDruid.cpp b/src/gui/DiscoveryDruid.cpp index 54e8ba837..3f0d279a2 100644 --- a/src/gui/DiscoveryDruid.cpp +++ b/src/gui/DiscoveryDruid.cpp @@ -1366,7 +1366,7 @@ void DiscoveryDruid::startSNMPScan() } catch (const FWException &ex) { - //TODO: to do something usefull + //TODO: do something usefull } } libfwbuilder::SNMPCrawler *q = new SNMPCrawler(); diff --git a/src/gui/FWWindow.cpp b/src/gui/FWWindow.cpp index 543edc2de..d95df0713 100644 --- a/src/gui/FWWindow.cpp +++ b/src/gui/FWWindow.cpp @@ -1630,15 +1630,6 @@ QString FWWindow::printHeader() return ""; } -// NOTE: add-on libraries are obsolete in v3.0.0 -// TODO: remove this. -listOfLibraries *FWWindow::getAddOnLibs() -{ - if (activeProject()) return activeProject()->getAddOnLibs(); - return 0; -} - - bool FWWindow::isSystem(FWObject *obj) { if (activeProject()) return activeProject()->isSystem(obj); diff --git a/src/gui/FWWindow.h b/src/gui/FWWindow.h index e4aeaf44b..a5d454c60 100644 --- a/src/gui/FWWindow.h +++ b/src/gui/FWWindow.h @@ -377,8 +377,6 @@ public slots: QString outputFileName); - listOfLibraries *getAddOnLibs(); - bool isSystem(libfwbuilder::FWObject *obj); protected: diff --git a/src/gui/ObjectManipulator.cpp b/src/gui/ObjectManipulator.cpp index 5e1d9f092..3a1b63223 100644 --- a/src/gui/ObjectManipulator.cpp +++ b/src/gui/ObjectManipulator.cpp @@ -2070,9 +2070,10 @@ void ObjectManipulator::delObj(FWObject *obj, bool openobj) "isDelObj=%d", islib, isfw, isDelObj); /* - * TODO: we have to remove not only the object, but also all its child - * objects from the database, as well as all references to them. This - * logic should really be in FWObject::removeAllInstances(FWObject*); + * TODO: we have to remove not only the object, but also all + * its child objects from the database, as well as all + * references to them. This logic should really be in + * FWObject::removeAllInstances(FWObject*); */ /* remove from our internal tables before it is removed from the @@ -2184,9 +2185,9 @@ void ObjectManipulator::groupObjects() FWObject *lib=*i; if (libName==QString::fromUtf8(lib->getName().c_str())) { -/* TODO: need to show a dialog and say that chosen library is read-only. - * this is not critical though since newGroupDialog fills the pull-down - * only with names of read-write libraries +/* TODO: need to show a dialog and say that chosen library is + * read-only. this is not critical though since newGroupDialog fills + * the pull-down only with names of read-write libraries */ if (lib->isReadOnly()) return; FWObject *parent = m_project->getFWTree()->getStandardSlotForObject(lib,type); @@ -2590,9 +2591,6 @@ FWObject* ObjectManipulator::createObject(const QString &objType, qDebug("lib: %s %s", lib->getName().c_str(), FWObjectDatabase::getStringId(lib->getId()).c_str()); - qDebug("lib: isReadOnly=%d isLoaded=%d", - lib->isReadOnly(), - m_project->getAddOnLibs()->isLoaded( lib->getName().c_str() ) ); qDebug("libs->count()=%d", m_objectManipulator->libs->count() ); } @@ -2618,9 +2616,6 @@ FWObject* ObjectManipulator::createObject(const QString &objType, qDebug("lib: %s %s", lib->getName().c_str(), FWObjectDatabase::getStringId(lib->getId()).c_str()); - qDebug("lib: isReadOnly=%d isLoaded=%d", - lib->isReadOnly(), - m_project->getAddOnLibs()->isLoaded(lib->getName().c_str())); } i++; } diff --git a/src/gui/PrefsDialog.cpp b/src/gui/PrefsDialog.cpp index 6ad7bd32f..2c2690c79 100644 --- a/src/gui/PrefsDialog.cpp +++ b/src/gui/PrefsDialog.cpp @@ -313,47 +313,6 @@ void PrefsDialog::findSCP() if (!fp.isEmpty()) m_dialog->scpPath->setText(fp); } -void PrefsDialog::libClick(QTreeWidgetItem* itm, int col) -{ - if (itm && col==1) - { - if (itm->text(0)=="Standard") return; - - for (list::iterator i=mw->getAddOnLibs()->begin(); - i!=mw->getAddOnLibs()->end(); ++i) - { - if (i->name == itm->text(0)) //fromUtf8 - { - if (i->load) itm->setIcon(1, QIcon()); - else - { - //itm->setPixmap(1, QPixmap::fromMimeSource( "apply.png" ) ); - QPixmap pm; - QString icn = ":/Icons/apply.png"; - if ( ! QPixmapCache::find( icn, pm) ) - { - pm.load( icn ); - QPixmapCache::insert( icn, pm); - } - itm->setIcon(1, QIcon(pm)); - } - - i->load = !i->load; - -#if 0 -// commented out for bug #1620284 - if (i->load) - { - mw->loadLibrary( i->path.latin1() ); - mw->loadObjects(); - } -#endif - break; - } - } - } -} - void PrefsDialog::accept() { QString wd=m_dialog->wDir->text(); diff --git a/src/gui/PrefsDialog.h b/src/gui/PrefsDialog.h index 034e58c1b..a4b34b589 100644 --- a/src/gui/PrefsDialog.h +++ b/src/gui/PrefsDialog.h @@ -72,7 +72,6 @@ public slots: virtual void findWDir(); virtual void findSSH(); virtual void findSCP(); - virtual void libClick(QTreeWidgetItem* itm, int col); virtual void changeRedColor(); virtual void changeOrangeColor(); virtual void changeYellowColor(); diff --git a/src/gui/ProjectPanel.cpp b/src/gui/ProjectPanel.cpp index 3ef8f1f9f..4f57f7d3d 100644 --- a/src/gui/ProjectPanel.cpp +++ b/src/gui/ProjectPanel.cpp @@ -1178,13 +1178,6 @@ bool ProjectPanel::requestEditorOwnership(QWidget *w, return true; } -// NOTE: add-on libraries are obsolete in v3.0.0 -// TODO: remove this. -listOfLibraries *ProjectPanel::getAddOnLibs() -{ - return addOnLibs; -} - bool ProjectPanel::isSystem(FWObject *obj) { return objectTreeFormat->isSystem(obj); diff --git a/src/gui/ProjectPanel.h b/src/gui/ProjectPanel.h index 0f610a47d..2a4d16bb0 100644 --- a/src/gui/ProjectPanel.h +++ b/src/gui/ProjectPanel.h @@ -376,8 +376,6 @@ public: bool validate = true); void releaseEditor(); void connectEditor(QWidget *w); - listOfLibraries *getAddOnLibs(); - bool isSystem(libfwbuilder::FWObject *obj); bool isStandardId(libfwbuilder::FWObject *obj); diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 81dfba667..5af77952b 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -701,8 +701,6 @@ int main( int argc, char *argv[] ) app->exec(); mw->hide(); // must do this before settings object is destroyed - if (mw->getAddOnLibs()!=NULL) - mw->getAddOnLibs()->save(); // ditto if ( st->getStartupAction()==1 ) { diff --git a/src/gui/newFirewallDialog.cpp b/src/gui/newFirewallDialog.cpp index 1a6120a7d..a4be2f0e1 100644 --- a/src/gui/newFirewallDialog.cpp +++ b/src/gui/newFirewallDialog.cpp @@ -248,9 +248,9 @@ void newFirewallDialog::monitor() QStringList qsl; qsl << idata->name.c_str() << idata->label.c_str(); - // TODO: redesign the way we pass information from the snmp crawler - // down the line so that multiple ip addresses per interface - // can be processed. + // TODO: redesign the way we pass information from the + // snmp crawler down the line so that multiple ip + // addresses per interface can be processed. if (idata->addr_mask.size()) qsl << idata->addr_mask.front()->getAddressPtr()->toString().c_str() << idata->addr_mask.front()->getNetmaskPtr()->toString().c_str(); diff --git a/src/gui/newHostDialog.cpp b/src/gui/newHostDialog.cpp index c44ec5e87..60bf2789b 100644 --- a/src/gui/newHostDialog.cpp +++ b/src/gui/newHostDialog.cpp @@ -239,9 +239,9 @@ void newHostDialog::monitor() QStringList qsl; qsl << idata->name.c_str() << idata->label.c_str(); - // TODO: redesign the way we pass information from the snmp crawler - // down the line so that multiple ip addresses per interface - // can be processed. + // TODO: redesign the way we pass information from the + // snmp crawler down the line so that multiple ip + // addresses per interface can be processed. if (idata->addr_mask.size()) qsl << idata->addr_mask.front()->getAddressPtr()->toString().c_str() << idata->addr_mask.front()->getNetmaskPtr()->toString().c_str();