Skip to content

Commit 47638ea

Browse files
committed
Removed thread, keeping signal/slots as it seems to be enough for fluid operation.
Cleaning some of the unused code.
1 parent 5f3f460 commit 47638ea

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

doxygen.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,27 @@ using namespace DoxyPlugin::Internal;
5858

5959
Doxygen* Doxygen::m_instance = 0;
6060

61-
Doxygen::Doxygen()
61+
Doxygen::Doxygen(QObject *parent) :
62+
QObject(parent)
6263
{
6364
m_cancel = false;
6465

6566
m_projectProgress = new QProgressDialog();
6667
m_projectProgress->setWindowModality(Qt::WindowModal);
6768
m_projectProgress->setMinimumWidth(300);
6869
m_projectProgress->setMinimum(0);
70+
m_projectProgress->setWindowTitle("Processing project...");
6971
m_projectProgress->close();
7072

7173
m_fileProgress = new QProgressDialog();
7274
m_fileProgress->setWindowModality(Qt::WindowModal);
7375
m_fileProgress->setMinimumWidth(300);
7476
m_fileProgress->setMinimum(0);
77+
m_fileProgress->setWindowTitle("Processing file...");
7578
m_fileProgress->close();
7679

7780
connect(m_projectProgress, SIGNAL(canceled()), this, SLOT(cancelOperation()));
7881
connect(m_fileProgress, SIGNAL(canceled()), this, SLOT(cancelOperation()));
79-
80-
this->start();
8182
}
8283

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

513514
uint count = 0;
515+
emit message(fileName);
514516

515517
if (symCount > symMin)
516518
{

doxygen.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
#include <plugins/projectexplorer/project.h>
2727
#include <plugins/coreplugin/icore.h>
2828
#include <plugins/coreplugin/editormanager/ieditor.h>
29-
#include <QThread>
3029
#include <QProgressDialog>
3130

3231
namespace DoxyPlugin {
3332
namespace Internal {
3433

35-
class Doxygen : public QThread
34+
class Doxygen : public QObject
3635
{
3736
Q_OBJECT
3837
public:
@@ -54,7 +53,7 @@ private slots:
5453
void cancelOperation(void);
5554

5655
private:
57-
Doxygen();
56+
Doxygen(QObject *parent = 0);
5857
~Doxygen();
5958
void addSymbol(const CPlusPlus::Symbol* symbol, QList<const CPlusPlus::Symbol*> &symmap);
6059

doxygenplugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ bool DoxygenPlugin::initialize(const QStringList &arguments, QString *errorStrin
172172
connect(m_doxygenDoxyfileWizardAction, SIGNAL(triggered(bool)), this, SLOT(doxyfileWizard()));
173173
doxygenMenu->addAction(command);
174174

175-
// Internal connections to worker thread
175+
// Internal connections
176176
Doxygen* dox = Doxygen::instance();
177177

178178
connect(dox, SIGNAL(message(QString)), this, SLOT(externalString(QString)));

doxygensettingsstruct.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ DoxygenSettingsStruct::DoxygenSettingsStruct() :
8282
verbosePrinting(false),
8383
automaticReturnType(true)
8484
{
85+
qRegisterMetaType<DoxygenSettingsStruct>("DoxygenSettingsStruct");
8586
}
8687

8788
void DoxygenSettingsStruct::fromSettings(QSettings *settings)

doxygensettingsstruct.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,7 @@ inline bool operator!=(const DoxygenSettingsStruct &p1, const DoxygenSettingsStr
9999

100100
} // namespace Internal
101101
} // namespace DoxyPlugin
102+
103+
Q_DECLARE_METATYPE(DoxyPlugin::Internal::DoxygenSettingsStruct)
104+
102105
#endif // DOXYGENSETTINGSSTRUCT_H

0 commit comments

Comments
 (0)