1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-24 12:17:26 +01:00

* ProjectPanel.h (class ProjectPanel): code clean-up: removed

obsolete method getAddOnLibs()
This commit is contained in:
Vadim Kurland 2009-03-07 04:32:28 +00:00
parent 4a7bb54488
commit ca833ec502
13 changed files with 20 additions and 84 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 776
#define BUILD_NUM 777

View File

@ -1,3 +1,8 @@
2009-03-06 vadim <vadim@vk.crocodile.org>
* ProjectPanel.h (class ProjectPanel): code clean-up: removed
obsolete method getAddOnLibs()
2009-03-05 vadim <vadim@vk.crocodile.org>
* RoutingCompiler_ipt.cpp (addressRangesInDst::processNext): fixed

View File

@ -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();

View File

@ -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);

View File

@ -377,8 +377,6 @@ public slots:
QString outputFileName);
listOfLibraries *getAddOnLibs();
bool isSystem(libfwbuilder::FWObject *obj);
protected:

View File

@ -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++;
}

View File

@ -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<libData>::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();

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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 )
{

View File

@ -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();

View File

@ -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();