Skip to content

Commit 8ca93da

Browse files
author
Dimitri van Heesch
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 558958d + 17cde9d commit 8ca93da

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

addon/doxywizard/doxywizard.cpp

100644100755
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <QVBoxLayout>
1111
#include <QLineEdit>
1212
#include <QLabel>
13-
#include <QTextEdit>
13+
#include <QTextBrowser>
1414
#include <QStatusBar>
1515
#include <QProcess>
1616
#include <QTimer>
@@ -31,6 +31,10 @@
3131

3232
const int messageTimeout = 5000; //!< status bar message timeout in milliseconds.
3333

34+
#define APPQT(x) QString::fromLatin1("<qt><pre>") + x + QString::fromLatin1("</pre></qt>")
35+
36+
static QString text1 = QString::fromLatin1("");
37+
3438
MainWindow &MainWindow::instance()
3539
{
3640
static MainWindow *theInstance = new MainWindow;
@@ -101,7 +105,9 @@ MainWindow::MainWindow()
101105
runTabLayout->addLayout(runLayout);
102106
runTabLayout->addWidget(new QLabel(tr("Output produced by doxygen")));
103107
QGridLayout *grid = new QGridLayout;
104-
m_outputLog = new QTextEdit;
108+
//m_outputLog = new QTextEdit;
109+
m_outputLog = new QTextBrowser;
110+
//m_outputLog = new QPlainTextEdit;
105111
m_outputLog->setReadOnly(true);
106112
m_outputLog->setFontFamily(QString::fromLatin1("courier"));
107113
m_outputLog->setMinimumWidth(600);
@@ -484,11 +490,12 @@ void MainWindow::runDoxygen()
484490
args << QString::fromLatin1("-"); // read config from stdin
485491

486492
m_outputLog->clear();
493+
text1 = QString::fromLatin1("");
487494
m_runProcess->start(doxygenPath + QString::fromLatin1("doxygen"), args);
488495

489496
if (!m_runProcess->waitForStarted())
490497
{
491-
m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n"));
498+
m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
492499
return;
493500
}
494501
QTextStream t(m_runProcess);
@@ -497,7 +504,7 @@ void MainWindow::runDoxygen()
497504

498505
if (m_runProcess->state() == QProcess::NotRunning)
499506
{
500-
m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n"));
507+
m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
501508
}
502509
else
503510
{
@@ -527,7 +534,9 @@ void MainWindow::readStdout()
527534
QString text = QString::fromUtf8(data);
528535
if (!text.isEmpty())
529536
{
530-
m_outputLog->append(text.trimmed());
537+
text1 += text;
538+
m_outputLog->clear();
539+
m_outputLog->append(APPQT(text1.trimmed()));
531540
}
532541
}
533542
}
@@ -536,11 +545,11 @@ void MainWindow::runComplete()
536545
{
537546
if (m_running)
538547
{
539-
m_outputLog->append(tr("*** Doxygen has finished\n"));
548+
m_outputLog->append(APPQT(tr("*** Doxygen has finished\n")));
540549
}
541550
else
542551
{
543-
m_outputLog->append(tr("*** Cancelled by user\n"));
552+
m_outputLog->append(APPQT(tr("*** Cancelled by user\n")));
544553
}
545554
m_outputLog->ensureCursorVisible();
546555
m_run->setText(tr("Run doxygen"));
@@ -602,7 +611,7 @@ void MainWindow::showSettings()
602611
QTextStream t(&text);
603612
m_expert->writeConfig(t,true);
604613
m_outputLog->clear();
605-
m_outputLog->append(text);
614+
m_outputLog->append(APPQT(text));
606615
m_outputLog->ensureCursorVisible();
607616
m_saveLog->setEnabled(true);
608617
}

addon/doxywizard/doxywizard.h

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Wizard;
1010
class QLabel;
1111
class QLineEdit;
1212
class QPushButton;
13-
class QTextEdit;
13+
class QTextBrowser;
1414
class QMenu;
1515
class QProcess;
1616
class QTimer;
@@ -71,7 +71,7 @@ class MainWindow : public QMainWindow
7171
QPushButton *m_saveLog;
7272
QPushButton *m_launchHtml;
7373
QPushButton *m_launchPdf;
74-
QTextEdit *m_outputLog;
74+
QTextBrowser *m_outputLog;
7575
QLabel *m_runStatus;
7676
Expert *m_expert;
7777
Wizard *m_wizard;

0 commit comments

Comments
 (0)