diff --git a/src/common/filterscript.h b/src/common/filterscript.h index 9e2bcb7e9..255712ec9 100644 --- a/src/common/filterscript.h +++ b/src/common/filterscript.h @@ -34,24 +34,27 @@ class QDomElement; class FilterNameParameterValuesPair { public: - virtual QString filterName() const = 0; - virtual bool isXMLFilter() const = 0; -}; + virtual QString filterName() const = 0; + virtual bool isXMLFilter() const = 0; + virtual ~FilterNameParameterValuesPair(){} +}; class XMLFilterNameParameterValuesPair : public FilterNameParameterValuesPair { public: - bool isXMLFilter() const {return true;} - QString filterName() const {return pair.first;} - QPair< QString , QMap > pair; + ~XMLFilterNameParameterValuesPair(){} + bool isXMLFilter() const {return true;} + QString filterName() const {return pair.first;} + QPair< QString , QMap > pair; }; class OldFilterNameParameterValuesPair : public FilterNameParameterValuesPair { public: - bool isXMLFilter() const {return false;} - QString filterName() const {return pair.first;} - QPair< QString , RichParameterSet > pair; + ~OldFilterNameParameterValuesPair(){} + bool isXMLFilter() const {return false;} + QString filterName() const {return pair.first;} + QPair< QString , RichParameterSet > pair; }; /* @@ -72,7 +75,7 @@ public: QList< FilterNameParameterValuesPair* > filtparlist; typedef QList< FilterNameParameterValuesPair* >::iterator iterator; - + public slots: void addExecutedXMLFilter(const QString& name,const QMap& parvalue); }; diff --git a/src/meshlab/additionalgui.cpp b/src/meshlab/additionalgui.cpp index a243a57ef..eb8660b1c 100644 --- a/src/meshlab/additionalgui.cpp +++ b/src/meshlab/additionalgui.cpp @@ -651,8 +651,6 @@ void MLSyntaxHighlighter::highlightBlock( const QString& text ) index = keyword.indexIn(text, index + length); } QRegExp nokeyword = syntax.matchIdentifiersButNotReservedWords(); - QString tmp = nokeyword.pattern(); - SyntaxTreeNode* root = syntax.functionsLibrary()->getItem(QModelIndex()); index = 0; //QTextCharFormat form; //form.setForeground(Qt::red); @@ -660,10 +658,7 @@ void MLSyntaxHighlighter::highlightBlock( const QString& text ) { index = nokeyword.indexIn(text,index); if (index >= 0) - { - bool matchedchar = colorTextIfInsideTree(nokeyword.cap(),root,index); index = index + nokeyword.matchedLength(); - } } setCurrentBlockState(0); } diff --git a/src/meshlab/filterthread.cpp b/src/meshlab/filterthread.cpp index ed8274fa9..7724fe678 100644 --- a/src/meshlab/filterthread.cpp +++ b/src/meshlab/filterthread.cpp @@ -9,7 +9,7 @@ FilterThread* FilterThread::_cur = NULL; FilterThread::FilterThread(const QString& fname,const QMap& parexpval,PluginManager& pm, MeshDocument& md) -:QThread(),_glwid(NULL),_fname(fname),_parexpval(parexpval),_pm(pm),_md(md) +:QThread(),_fname(fname),_parexpval(parexpval),_pm(pm),_md(md),_glwid(NULL) { _glwid = new QGLWidget(); } diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 8311773ef..d4b5bd5e8 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -1146,10 +1146,6 @@ void MainWindow::startFilter() // if no dialog is created the filter must be executed immediatel if(!xmldialog->showAutoDialog(filt,PM,meshDoc(), this, GLA())) { - MeshLabFilterInterface *ifilter = filt.filterInterface; - bool jscode = (filt.xmlInfo->filterScriptCode(filt.act->text()) != ""); - bool filtercpp = (ifilter != NULL) && (!jscode); - /*Mock Parameters (there are no ones in the filter indeed) for the filter history.The filters with parameters are inserted by the applyClick of the XMLStdParDialog. That is the only place where I can easily evaluate the parameter values without writing a long, boring and horrible if on the filter type for the correct evaluation of the expressions contained inside the XMLWidgets*/ QMap mock; @@ -1332,7 +1328,6 @@ void MainWindow::initDocumentMeshRenderState(MeshLabXMLFilterContainer* mfc) { Env env; QScriptValue val = env.loadMLScriptEnv(*meshDoc(),PM); - bool err = val.isError(); EnvWrap envwrap(env); //I have to check which are the meshes requested as parameters by the filter. It's disgusting but there is not other way. MLXMLPluginInfo::XMLMapList params = mfc->xmlInfo->filterParameters(fname); diff --git a/src/meshlab/xmlstdpardialog.cpp b/src/meshlab/xmlstdpardialog.cpp index 612d94a8e..604f66b7d 100644 --- a/src/meshlab/xmlstdpardialog.cpp +++ b/src/meshlab/xmlstdpardialog.cpp @@ -5,7 +5,7 @@ #include MeshLabXMLStdDialog::MeshLabXMLStdDialog(QWidget *p) - :QDockWidget(QString("Plugin"), p),isfilterexecuting(false),showHelp(false),env() + :QDockWidget(QString("Plugin"), p),isfilterexecuting(false),env(),showHelp(false) { curmask = 0;