forked from qt-creator/qt-creator
app output window reorga
- drop prefix magic - avoid inserting stray newlines this also fixes the overquoting of app output.
This commit is contained in:
@@ -590,9 +590,9 @@ void DebuggerManager::notifyInferiorPidChanged(int pid)
|
||||
emit inferiorPidChanged(pid);
|
||||
}
|
||||
|
||||
void DebuggerManager::showApplicationOutput(const QString &prefix, const QString &str)
|
||||
void DebuggerManager::showApplicationOutput(const QString &str)
|
||||
{
|
||||
emit applicationOutputAvailable(prefix, str);
|
||||
emit applicationOutputAvailable(str);
|
||||
}
|
||||
|
||||
void DebuggerManager::shutdown()
|
||||
|
||||
@@ -166,7 +166,7 @@ private:
|
||||
virtual ThreadsHandler *threadsHandler() = 0;
|
||||
virtual WatchHandler *watchHandler() = 0;
|
||||
|
||||
virtual void showApplicationOutput(const QString &prefix, const QString &data) = 0;
|
||||
virtual void showApplicationOutput(const QString &data) = 0;
|
||||
//virtual QAction *useCustomDumpersAction() const = 0;
|
||||
//virtual QAction *debugDumpersAction() const = 0;
|
||||
virtual bool skipKnownFrames() const = 0;
|
||||
@@ -285,7 +285,7 @@ public slots:
|
||||
private slots:
|
||||
void showDebuggerOutput(const QString &prefix, const QString &msg);
|
||||
void showDebuggerInput(const QString &prefix, const QString &msg);
|
||||
void showApplicationOutput(const QString &prefix, const QString &msg);
|
||||
void showApplicationOutput(const QString &data);
|
||||
|
||||
void reloadDisassembler();
|
||||
void disassemblerDockToggled(bool on);
|
||||
@@ -365,7 +365,7 @@ signals:
|
||||
void setSessionValueRequested(const QString &name, const QVariant &value);
|
||||
void configValueRequested(const QString &name, QVariant *value);
|
||||
void setConfigValueRequested(const QString &name, const QVariant &value);
|
||||
void applicationOutputAvailable(const QString &prefix, const QString &msg);
|
||||
void applicationOutputAvailable(const QString &output);
|
||||
|
||||
public:
|
||||
// FIXME: make private
|
||||
|
||||
@@ -108,8 +108,8 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
|
||||
{
|
||||
connect(m_manager, SIGNAL(debuggingFinished()),
|
||||
this, SLOT(debuggingFinished()));
|
||||
connect(m_manager, SIGNAL(applicationOutputAvailable(QString, QString)),
|
||||
this, SLOT(slotAddToOutputWindow(QString, QString)));
|
||||
connect(m_manager, SIGNAL(applicationOutputAvailable(QString)),
|
||||
this, SLOT(slotAddToOutputWindowInline(QString)));
|
||||
connect(m_manager, SIGNAL(inferiorPidChanged(qint64)),
|
||||
this, SLOT(bringApplicationToForeground(qint64)));
|
||||
}
|
||||
@@ -138,12 +138,9 @@ void DebuggerRunControl::start()
|
||||
debuggingFinished();
|
||||
}
|
||||
|
||||
void DebuggerRunControl::slotAddToOutputWindow(const QString &prefix, const QString &line)
|
||||
void DebuggerRunControl::slotAddToOutputWindowInline(const QString &data)
|
||||
{
|
||||
Q_UNUSED(prefix);
|
||||
foreach (const QString &l, line.split('\n'))
|
||||
emit addToOutputWindow(this, prefix + Qt::escape(l));
|
||||
//emit addToOutputWindow(this, prefix + Qt::escape(line));
|
||||
emit addToOutputWindowInline(this, data);
|
||||
}
|
||||
|
||||
void DebuggerRunControl::stop()
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void debuggingFinished();
|
||||
void slotAddToOutputWindow(const QString &prefix, const QString &line);
|
||||
void slotAddToOutputWindowInline(const QString &output);
|
||||
|
||||
private:
|
||||
DebuggerManager *m_manager;
|
||||
|
||||
@@ -275,8 +275,8 @@ void GdbEngine::init()
|
||||
connect(this, SIGNAL(gdbInputAvailable(QString,QString)),
|
||||
q, SLOT(showDebuggerInput(QString,QString)),
|
||||
Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(applicationOutputAvailable(QString,QString)),
|
||||
q, SLOT(showApplicationOutput(QString,QString)),
|
||||
connect(this, SIGNAL(applicationOutputAvailable(QString)),
|
||||
q, SLOT(showApplicationOutput(QString)),
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ void GdbEngine::handleResponse()
|
||||
//s += '\n';
|
||||
|
||||
m_inbuffer = QByteArray(from, to - from);
|
||||
emit applicationOutputAvailable("app-stdout: ", s);
|
||||
emit applicationOutputAvailable(s);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ static void fixMac(QByteArray &out)
|
||||
void GdbEngine::readGdbStandardError()
|
||||
{
|
||||
QByteArray err = m_gdbProc.readAllStandardError();
|
||||
emit applicationOutputAvailable("app-stderr:", err);
|
||||
emit applicationOutputAvailable(err);
|
||||
}
|
||||
|
||||
void GdbEngine::readGdbStandardOutput()
|
||||
@@ -1078,7 +1078,7 @@ void GdbEngine::handleStreamOutput(const QString &data, char code)
|
||||
// On Windows, the contents seem to depend on the debugger
|
||||
// version and/or OS version used.
|
||||
if (data.startsWith("warning:"))
|
||||
qq->showApplicationOutput(QString(), data);
|
||||
qq->showApplicationOutput(data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ signals:
|
||||
void gdbResponseAvailable();
|
||||
void gdbInputAvailable(const QString &prefix, const QString &msg);
|
||||
void gdbOutputAvailable(const QString &prefix, const QString &msg);
|
||||
void applicationOutputAvailable(const QString &prefix, const QString &msg);
|
||||
void applicationOutputAvailable(const QString &output);
|
||||
|
||||
private:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user