diff --git a/duchaincontrolflowinternaljob.cpp b/duchaincontrolflowinternaljob.cpp index 701c8a3..d05592e 100644 --- a/duchaincontrolflowinternaljob.cpp +++ b/duchaincontrolflowinternaljob.cpp @@ -1,80 +1,83 @@ /*************************************************************************** * Copyright 2009 Sandro Andrade * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "duchaincontrolflowinternaljob.h" #include "duchaincontrolflow.h" #include "kdevcontrolflowgraphviewplugin.h" #include DUChainControlFlowInternalJob::DUChainControlFlowInternalJob(DUChainControlFlow *duchainControlFlow, KDevControlFlowGraphViewPlugin *plugin) : m_duchainControlFlow(duchainControlFlow), m_plugin(plugin), m_controlFlowJobType(DUChainControlFlowInternalJob::ControlFlowJobInteractive) { } DUChainControlFlowInternalJob::~DUChainControlFlowInternalJob() { } void DUChainControlFlowInternalJob::setControlFlowJobType(DUChainControlFlowInternalJob::ControlFlowJobType controlFlowJobType) { m_controlFlowJobType = controlFlowJobType; } void DUChainControlFlowInternalJob::requestAbort() { if (m_plugin) { qDebug() << "Requesting abort"; m_plugin->requestAbort(); } } void DUChainControlFlowInternalJob::run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) { + Q_UNUSED(self); + Q_UNUSED(thread); + switch(m_controlFlowJobType) { case ControlFlowJobInteractive: { if (m_duchainControlFlow) m_duchainControlFlow->run(); break; } case ControlFlowJobBatchForFunction: { if (m_plugin) m_plugin->generateControlFlowGraph(); break; } case ControlFlowJobBatchForClass: { if (m_plugin) m_plugin->generateClassControlFlowGraph(); break; } case ControlFlowJobBatchForProject: { if (m_plugin) m_plugin->generateProjectControlFlowGraph(); break; } }; emit done(); }