Update of /cvsroot/compbench/CompBenchmarks++/Qt-4/Plan
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2875
Modified Files:
PlanDefineBatch.cpp PlanDefineBatch.h
Log Message:
Plan definition now accepts compiler unregistering (global message).
Index: PlanDefineBatch.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Plan/PlanDefineBatch.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PlanDefineBatch.cpp 20 May 2007 16:34:37 -0000 1.2
--- PlanDefineBatch.cpp 20 May 2007 17:11:34 -0000 1.3
***************
*** 143,155 ****
{
connect(this, SIGNAL(sigPlanBatchRegister(CBM::PlanBatch*)),
! this, SLOT(doPlanBatchRegister(CBM::PlanBatch*)));
connect(this, SIGNAL(sigPlanBatchUnregister(CBM::PlanBatch*)),
! this, SLOT(doPlanBatchUnregister(CBM::PlanBatch*)));
connect(this, SIGNAL(sigPlanBatchRenamed(CBM::PlanBatch*,
QString)),
this, SLOT(doPlanBatchRenamed(CBM::PlanBatch*,
! QString)));
headerItem()->setHidden(true);
--- 143,163 ----
{
connect(this, SIGNAL(sigPlanBatchRegister(CBM::PlanBatch*)),
! this, SLOT(doPlanBatchRegister(CBM::PlanBatch*)),
! Qt::QueuedConnection);
connect(this, SIGNAL(sigPlanBatchUnregister(CBM::PlanBatch*)),
! this, SLOT(doPlanBatchUnregister(CBM::PlanBatch*)),
! Qt::QueuedConnection);
connect(this, SIGNAL(sigPlanBatchRenamed(CBM::PlanBatch*,
QString)),
this, SLOT(doPlanBatchRenamed(CBM::PlanBatch*,
! QString)),
! Qt::QueuedConnection);
!
! connect(this, SIGNAL(sigCompilerUnregister(CBM::Compiler*)),
! this, SLOT(doCompilerUnregister(CBM::Compiler*)),
! Qt::QueuedConnection);
!
headerItem()->setHidden(true);
***************
*** 180,183 ****
--- 188,197 ----
}
+ void PlanDefineBatchList::doCompilerUnregister(CBM::Compiler *_compiler)
+ {
+ doCompilerUnregister(_compiler,
+ invisibleRootItem());
+ }
+
void PlanDefineBatchList::planBatchRegister(CBM::PlanBatch *_batch)
{
***************
*** 197,200 ****
--- 211,219 ----
}
+ void PlanDefineBatchList::compilerUnregister(CBM::Compiler *_compiler)
+ {
+ emit sigCompilerUnregister(_compiler);
+ }
+
void PlanDefineBatchList::contextMenuEvent(QContextMenuEvent *event)
***************
*** 205,208 ****
--- 224,252 ----
+ void PlanDefineBatchList::doCompilerUnregister(CBM::Compiler *_compiler,
+ QTreeWidgetItem *_from)
+ {
+ int i;
+ QTreeWidgetItem *c;
+ PlanDefineBatchListItem *I;
+
+ for(i=0;i<_from->childCount();i++) {
+ c=_from->child(i);
+ I=dynamic_cast<PlanDefineBatchListItem*>(c);
+ if (!I)
+ continue;
+ if (I->type()==PICompiler) {
+ if (I->Compiler()==_compiler) {
+ I=(PlanDefineBatchListItem*) _from->takeChild(i);
+ delete(I);
+ }
+ } else
+ if ((I->type()==PICompilers) ||
+ (I->type()==PIPlanBatch))
+ doCompilerUnregister(_compiler, c);
+ }
+
+ }
+
void PlanDefineBatchList::dragEnterEvent(QDragEnterEvent *event)
{
Index: PlanDefineBatch.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Plan/PlanDefineBatch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PlanDefineBatch.h 20 May 2007 16:34:37 -0000 1.2
--- PlanDefineBatch.h 20 May 2007 17:11:34 -0000 1.3
***************
*** 74,77 ****
--- 74,82 ----
virtual void contextMenuEvent(QContextMenuEvent *event);
+ virtual void doCompilerUnregister(CBM::Compiler *_compiler,
+ QTreeWidgetItem *_from);
+
+
+
signals:
void sigPlanBatchRegister(CBM::PlanBatch *_batch);
***************
*** 80,83 ****
--- 85,90 ----
QString _newname);
+ void sigCompilerUnregister(CBM::Compiler *_compiler);
+
protected slots:
virtual void doPlanBatchRegister(CBM::PlanBatch *_batch);
***************
*** 86,89 ****
--- 93,98 ----
QString _newname);
+ void doCompilerUnregister(CBM::Compiler *_compiler);
+
public:
PlanDefineBatchList(QWidget *parent = 0);
***************
*** 94,97 ****
--- 103,108 ----
QString _newname);
+ virtual void compilerUnregister(CBM::Compiler *_compiler);
+
virtual ~PlanDefineBatchList();
};
|