forked from qt-creator/qt-creator
Valgrind: Use QString for processOutput signal
Change-Id: I446f1a06b2c00280679dd09cd1818c1dd69c7e11 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -113,8 +113,8 @@ bool ValgrindRunControl::startEngine()
|
||||
run->setConnectionParameters(sp.connParams);
|
||||
run->setStartMode(sp.startMode);
|
||||
|
||||
connect(run, SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)),
|
||||
SLOT(receiveProcessOutput(QByteArray,Utils::OutputFormat)));
|
||||
connect(run, SIGNAL(processOutputReceived(QString,Utils::OutputFormat)),
|
||||
SLOT(receiveProcessOutput(QString,Utils::OutputFormat)));
|
||||
connect(run, SIGNAL(processErrorReceived(QString,QProcess::ProcessError)),
|
||||
SLOT(receiveProcessError(QString,QProcess::ProcessError)));
|
||||
connect(run, SIGNAL(finished()), SLOT(runnerFinished()));
|
||||
@@ -178,13 +178,13 @@ void ValgrindRunControl::runnerFinished()
|
||||
|
||||
m_progress->reportFinished();
|
||||
|
||||
disconnect(runner(), SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)),
|
||||
this, SLOT(receiveProcessOutput(QByteArray,Utils::OutputFormat)));
|
||||
disconnect(runner(), SIGNAL(processOutputReceived(QString,Utils::OutputFormat)),
|
||||
this, SLOT(receiveProcessOutput(QString,Utils::OutputFormat)));
|
||||
disconnect(runner(), SIGNAL(finished()),
|
||||
this, SLOT(runnerFinished()));
|
||||
}
|
||||
|
||||
void ValgrindRunControl::receiveProcessOutput(const QByteArray &output, OutputFormat format)
|
||||
void ValgrindRunControl::receiveProcessOutput(const QString &output, OutputFormat format)
|
||||
{
|
||||
int progress = m_progress->progressValue();
|
||||
if (progress < 5 * progressMaximum / 10)
|
||||
@@ -192,7 +192,7 @@ void ValgrindRunControl::receiveProcessOutput(const QByteArray &output, OutputFo
|
||||
else if (progress < 9 * progressMaximum / 10)
|
||||
progress += progress / 1000;
|
||||
m_progress->setProgressValue(progress);
|
||||
appendMessage(QString::fromLocal8Bit(output), format);
|
||||
appendMessage(output, format);
|
||||
}
|
||||
|
||||
void ValgrindRunControl::receiveProcessError(const QString &message, QProcess::ProcessError error)
|
||||
|
||||
@@ -70,7 +70,7 @@ private slots:
|
||||
void handleProgressFinished();
|
||||
void runnerFinished();
|
||||
|
||||
void receiveProcessOutput(const QByteArray &output, Utils::OutputFormat format);
|
||||
void receiveProcessOutput(const QString &output, Utils::OutputFormat format);
|
||||
void receiveProcessError(const QString &message, QProcess::ProcessError error);
|
||||
|
||||
private:
|
||||
|
||||
@@ -197,7 +197,7 @@ void ValgrindProcess::handleReadyReadStandardError()
|
||||
else
|
||||
b = m_remote.m_process->readAllStandardError();
|
||||
if (!b.isEmpty())
|
||||
emit processOutput(b, Utils::StdErrFormat);
|
||||
emit processOutput(QString::fromLocal8Bit(b), Utils::StdErrFormat);
|
||||
}
|
||||
|
||||
void ValgrindProcess::handleReadyReadStandardOutput()
|
||||
@@ -208,7 +208,7 @@ void ValgrindProcess::handleReadyReadStandardOutput()
|
||||
else
|
||||
b = m_remote.m_process->readAllStandardOutput();
|
||||
if (!b.isEmpty())
|
||||
emit processOutput(b, Utils::StdOutFormat);
|
||||
emit processOutput(QString::fromLocal8Bit(b), Utils::StdOutFormat);
|
||||
}
|
||||
|
||||
/// Remote
|
||||
|
||||
@@ -83,7 +83,7 @@ signals:
|
||||
void started();
|
||||
void finished(int, QProcess::ExitStatus);
|
||||
void error(QProcess::ProcessError);
|
||||
void processOutput(const QByteArray &, Utils::OutputFormat format);
|
||||
void processOutput(const QString &, Utils::OutputFormat format);
|
||||
|
||||
private slots:
|
||||
void handleReadyReadStandardError();
|
||||
|
||||
@@ -96,8 +96,8 @@ void ValgrindRunner::Private::run(ValgrindProcess *_process)
|
||||
// May be slower to start but without it we get no filenames for symbols.
|
||||
valgrindArgs << QLatin1String("--dsymutil=yes");
|
||||
|
||||
QObject::connect(process, SIGNAL(processOutput(QByteArray,Utils::OutputFormat)),
|
||||
q, SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)));
|
||||
QObject::connect(process, SIGNAL(processOutput(QString,Utils::OutputFormat)),
|
||||
q, SIGNAL(processOutputReceived(QString,Utils::OutputFormat)));
|
||||
QObject::connect(process, SIGNAL(started()),
|
||||
q, SLOT(processStarted()));
|
||||
QObject::connect(process, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
|
||||
@@ -88,7 +88,7 @@ protected:
|
||||
virtual QString tool() const = 0;
|
||||
|
||||
signals:
|
||||
void processOutputReceived(const QByteArray &, Utils::OutputFormat);
|
||||
void processOutputReceived(const QString &, Utils::OutputFormat);
|
||||
void processErrorReceived(const QString &, QProcess::ProcessError);
|
||||
void started();
|
||||
void finished();
|
||||
|
||||
Reference in New Issue
Block a user