forked from qt-creator/qt-creator
Make ApplicationLauncher report QStrings, not QByteArray
Realistically, we only have UTF-8/plain ASCII messages, and if not then the conversion should happen when the message enters the "creator eco system" as there's potentially information on the actual encoding present, not at some random consumer further down the chain. Change-Id: Ie21199b99255f5c4d28fce3da7db2fd6c3bcfb3a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -48,13 +48,13 @@ public:
|
||||
|
||||
void run();
|
||||
|
||||
void handleRemoteStderr(const QByteArray &b);
|
||||
void handleRemoteStdout(const QByteArray &b);
|
||||
void handleRemoteStderr(const QString &b);
|
||||
void handleRemoteStdout(const QString &b);
|
||||
|
||||
void closed(bool success);
|
||||
void localProcessStarted();
|
||||
void remoteProcessStarted();
|
||||
void findPIDOutputReceived(const QByteArray &out);
|
||||
void findPidOutputReceived(const QString &out);
|
||||
|
||||
ValgrindRunner *q;
|
||||
StandardRunnable m_debuggee;
|
||||
@@ -121,16 +121,16 @@ void ValgrindRunner::Private::run()
|
||||
m_valgrindProcess.start(valgrind, m_device);
|
||||
}
|
||||
|
||||
void ValgrindRunner::Private::handleRemoteStderr(const QByteArray &b)
|
||||
void ValgrindRunner::Private::handleRemoteStderr(const QString &b)
|
||||
{
|
||||
if (!b.isEmpty())
|
||||
q->processOutputReceived(QString::fromUtf8(b), Utils::StdErrFormat);
|
||||
q->processOutputReceived(b, Utils::StdErrFormat);
|
||||
}
|
||||
|
||||
void ValgrindRunner::Private::handleRemoteStdout(const QByteArray &b)
|
||||
void ValgrindRunner::Private::handleRemoteStdout(const QString &b)
|
||||
{
|
||||
if (!b.isEmpty())
|
||||
q->processOutputReceived(QString::fromUtf8(b), Utils::StdOutFormat);
|
||||
q->processOutputReceived(b, Utils::StdOutFormat);
|
||||
}
|
||||
|
||||
void ValgrindRunner::Private::localProcessStarted()
|
||||
@@ -169,11 +169,11 @@ void ValgrindRunner::Private::remoteProcessStarted()
|
||||
connect(&m_findPID, &ApplicationLauncher::remoteStderr,
|
||||
this, &ValgrindRunner::Private::handleRemoteStderr);
|
||||
connect(&m_findPID, &ApplicationLauncher::remoteStdout,
|
||||
this, &ValgrindRunner::Private::findPIDOutputReceived);
|
||||
this, &ValgrindRunner::Private::findPidOutputReceived);
|
||||
m_findPID.start(findPid, m_device);
|
||||
}
|
||||
|
||||
void ValgrindRunner::Private::findPIDOutputReceived(const QByteArray &out)
|
||||
void ValgrindRunner::Private::findPidOutputReceived(const QString &out)
|
||||
{
|
||||
if (out.isEmpty())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user