forked from qt-creator/qt-creator
html-escape text appended to the log windows.
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtGui/QTextDocument>
|
||||
|
||||
using namespace Debugger::Internal;
|
||||
|
||||
@@ -140,8 +141,8 @@ void DebuggerRunControl::slotAddToOutputWindow(const QString &prefix, const QStr
|
||||
{
|
||||
Q_UNUSED(prefix);
|
||||
foreach (const QString &l, line.split('\n'))
|
||||
emit addToOutputWindow(this, prefix + l);
|
||||
//emit addToOutputWindow(this, prefix + line);
|
||||
emit addToOutputWindow(this, prefix + Qt::escape(l));
|
||||
//emit addToOutputWindow(this, prefix + Qt::escape(line));
|
||||
}
|
||||
|
||||
void DebuggerRunControl::stop()
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <QtCore/QEventLoop>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QTextDocument>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
@@ -165,7 +166,7 @@ void AbstractProcessStep::run(QFutureInterface<bool> & fi)
|
||||
|
||||
void AbstractProcessStep::processStarted()
|
||||
{
|
||||
emit addToOutputWindow(tr("<font color=\"#0000ff\">Starting: %1 %2</font>\n").arg(m_command, m_arguments.join(" ")));
|
||||
emit addToOutputWindow(tr("<font color=\"#0000ff\">Starting: %1 %2</font>\n").arg(m_command, Qt::escape(m_arguments.join(" "))));
|
||||
}
|
||||
|
||||
bool AbstractProcessStep::processFinished(int exitCode, QProcess::ExitStatus status)
|
||||
@@ -196,7 +197,7 @@ void AbstractProcessStep::processReadyReadStdOutput()
|
||||
|
||||
void AbstractProcessStep::stdOut(const QString &line)
|
||||
{
|
||||
emit addToOutputWindow(line);
|
||||
emit addToOutputWindow(Qt::escape(line));
|
||||
}
|
||||
|
||||
void AbstractProcessStep::processReadyReadStdError()
|
||||
@@ -211,7 +212,7 @@ void AbstractProcessStep::processReadyReadStdError()
|
||||
|
||||
void AbstractProcessStep::stdError(const QString &line)
|
||||
{
|
||||
emit addToOutputWindow(QLatin1String("<font color=\"#ff0000\">") + line + QLatin1String("</font>"));
|
||||
emit addToOutputWindow(QLatin1String("<font color=\"#ff0000\">") + Qt::escape(line) + QLatin1String("</font>"));
|
||||
}
|
||||
|
||||
void AbstractProcessStep::checkForCancel()
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QTextDocument>
|
||||
#include <QDebug>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -160,7 +161,7 @@ void ApplicationRunControl::slotError(const QString & err)
|
||||
|
||||
void ApplicationRunControl::slotAddToOutputWindow(const QString &line)
|
||||
{
|
||||
emit addToOutputWindow(this, line);
|
||||
emit addToOutputWindow(this, Qt::escape(line));
|
||||
}
|
||||
|
||||
void ApplicationRunControl::processExited(int exitCode)
|
||||
|
Reference in New Issue
Block a user