diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-09-03 09:34:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-03 09:34:22 (GMT) |
commit | 17cde9d33696ca04e22d016c5cb555c427385439 (patch) | |
tree | 2a1ccc5732fa061d7cd06a23bd930a47741bab9e /addon/doxywizard/doxywizard.cpp | |
parent | 0bdf976df43dfc1eea03fd3e31d949d05422b2ca (diff) | |
parent | 894bdfdf268ba24a268fa72d7b33899a9f3a126b (diff) | |
download | Doxygen-17cde9d33696ca04e22d016c5cb555c427385439.zip Doxygen-17cde9d33696ca04e22d016c5cb555c427385439.tar.gz Doxygen-17cde9d33696ca04e22d016c5cb555c427385439.tar.bz2 |
Merge pull request #451 from albert-github/feature/bug_761641
Bug 761471 - Do not allow ligatures in log output
Diffstat (limited to 'addon/doxywizard/doxywizard.cpp')
-rwxr-xr-x[-rw-r--r--] | addon/doxywizard/doxywizard.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 8af77c8..492912b 100644..100755 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -10,7 +10,7 @@ #include <QVBoxLayout> #include <QLineEdit> #include <QLabel> -#include <QTextEdit> +#include <QTextBrowser> #include <QStatusBar> #include <QProcess> #include <QTimer> @@ -31,6 +31,10 @@ const int messageTimeout = 5000; //!< status bar message timeout in milliseconds. +#define APPQT(x) QString::fromLatin1("<qt><pre>") + x + QString::fromLatin1("</pre></qt>") + +static QString text1 = QString::fromLatin1(""); + MainWindow &MainWindow::instance() { static MainWindow *theInstance = new MainWindow; @@ -101,7 +105,9 @@ MainWindow::MainWindow() runTabLayout->addLayout(runLayout); runTabLayout->addWidget(new QLabel(tr("Output produced by doxygen"))); QGridLayout *grid = new QGridLayout; - m_outputLog = new QTextEdit; + //m_outputLog = new QTextEdit; + m_outputLog = new QTextBrowser; + //m_outputLog = new QPlainTextEdit; m_outputLog->setReadOnly(true); m_outputLog->setFontFamily(QString::fromLatin1("courier")); m_outputLog->setMinimumWidth(600); @@ -484,11 +490,12 @@ void MainWindow::runDoxygen() args << QString::fromLatin1("-"); // read config from stdin m_outputLog->clear(); + text1 = QString::fromLatin1(""); m_runProcess->start(doxygenPath + QString::fromLatin1("doxygen"), args); if (!m_runProcess->waitForStarted()) { - m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n")); + m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n"))); return; } QTextStream t(m_runProcess); @@ -497,7 +504,7 @@ void MainWindow::runDoxygen() if (m_runProcess->state() == QProcess::NotRunning) { - m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n")); + m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n"))); } else { @@ -527,7 +534,9 @@ void MainWindow::readStdout() QString text = QString::fromUtf8(data); if (!text.isEmpty()) { - m_outputLog->append(text.trimmed()); + text1 += text; + m_outputLog->clear(); + m_outputLog->append(APPQT(text1.trimmed())); } } } @@ -536,11 +545,11 @@ void MainWindow::runComplete() { if (m_running) { - m_outputLog->append(tr("*** Doxygen has finished\n")); + m_outputLog->append(APPQT(tr("*** Doxygen has finished\n"))); } else { - m_outputLog->append(tr("*** Cancelled by user\n")); + m_outputLog->append(APPQT(tr("*** Cancelled by user\n"))); } m_outputLog->ensureCursorVisible(); m_run->setText(tr("Run doxygen")); @@ -602,7 +611,7 @@ void MainWindow::showSettings() QTextStream t(&text); m_expert->writeConfig(t,true); m_outputLog->clear(); - m_outputLog->append(text); + m_outputLog->append(APPQT(text)); m_outputLog->ensureCursorVisible(); m_saveLog->setEnabled(true); } |