Skip to content

Commit

Permalink
Removed thread, keeping signal/slots as it seems to be enough for flu…
Browse files Browse the repository at this point in the history
…id operation.

Cleaning some of the unused code.
  • Loading branch information
fpoussin committed Dec 23, 2015
1 parent 5f3f460 commit 47638ea
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
8 changes: 5 additions & 3 deletions doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,27 @@ using namespace DoxyPlugin::Internal;

Doxygen* Doxygen::m_instance = 0;

Doxygen::Doxygen()
Doxygen::Doxygen(QObject *parent) :
QObject(parent)
{
m_cancel = false;

m_projectProgress = new QProgressDialog();
m_projectProgress->setWindowModality(Qt::WindowModal);
m_projectProgress->setMinimumWidth(300);
m_projectProgress->setMinimum(0);
m_projectProgress->setWindowTitle("Processing project...");
m_projectProgress->close();

m_fileProgress = new QProgressDialog();
m_fileProgress->setWindowModality(Qt::WindowModal);
m_fileProgress->setMinimumWidth(300);
m_fileProgress->setMinimum(0);
m_fileProgress->setWindowTitle("Processing file...");
m_fileProgress->close();

connect(m_projectProgress, SIGNAL(canceled()), this, SLOT(cancelOperation()));
connect(m_fileProgress, SIGNAL(canceled()), this, SLOT(cancelOperation()));

this->start();
}

Doxygen::~Doxygen()
Expand Down Expand Up @@ -511,6 +512,7 @@ uint Doxygen::documentFile(const DoxygenSettingsStruct &DoxySettings, Core::IEdi
QString fileName("Processing "+editor->document()->filePath().fileName()+"...");

uint count = 0;
emit message(fileName);

if (symCount > symMin)
{
Expand Down
5 changes: 2 additions & 3 deletions doxygen.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
#include <plugins/projectexplorer/project.h>
#include <plugins/coreplugin/icore.h>
#include <plugins/coreplugin/editormanager/ieditor.h>
#include <QThread>
#include <QProgressDialog>

namespace DoxyPlugin {
namespace Internal {

class Doxygen : public QThread
class Doxygen : public QObject
{
Q_OBJECT
public:
Expand All @@ -54,7 +53,7 @@ private slots:
void cancelOperation(void);

private:
Doxygen();
Doxygen(QObject *parent = 0);
~Doxygen();
void addSymbol(const CPlusPlus::Symbol* symbol, QList<const CPlusPlus::Symbol*> &symmap);

Expand Down
2 changes: 1 addition & 1 deletion doxygenplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool DoxygenPlugin::initialize(const QStringList &arguments, QString *errorStrin
connect(m_doxygenDoxyfileWizardAction, SIGNAL(triggered(bool)), this, SLOT(doxyfileWizard()));
doxygenMenu->addAction(command);

// Internal connections to worker thread
// Internal connections
Doxygen* dox = Doxygen::instance();

connect(dox, SIGNAL(message(QString)), this, SLOT(externalString(QString)));
Expand Down
1 change: 1 addition & 0 deletions doxygensettingsstruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ DoxygenSettingsStruct::DoxygenSettingsStruct() :
verbosePrinting(false),
automaticReturnType(true)
{
qRegisterMetaType<DoxygenSettingsStruct>("DoxygenSettingsStruct");
}

void DoxygenSettingsStruct::fromSettings(QSettings *settings)
Expand Down
3 changes: 3 additions & 0 deletions doxygensettingsstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@ inline bool operator!=(const DoxygenSettingsStruct &p1, const DoxygenSettingsStr

} // namespace Internal
} // namespace DoxyPlugin

Q_DECLARE_METATYPE(DoxyPlugin::Internal::DoxygenSettingsStruct)

#endif // DOXYGENSETTINGSSTRUCT_H

0 comments on commit 47638ea

Please sign in to comment.