forked from qt-creator/qt-creator
ValgrindRunner: Get rid of errorString()
Change-Id: I5ef4d911f0986a721855525f6b2b7645253606fe Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -229,11 +229,6 @@ void ValgrindRunner::waitForFinished() const
|
||||
loop.exec();
|
||||
}
|
||||
|
||||
QString ValgrindRunner::errorString() const
|
||||
{
|
||||
return d->m_process.errorString();
|
||||
}
|
||||
|
||||
bool ValgrindRunner::start()
|
||||
{
|
||||
return d->run();
|
||||
|
@@ -37,8 +37,6 @@ public:
|
||||
|
||||
void waitForFinished() const;
|
||||
|
||||
QString errorString() const;
|
||||
|
||||
bool start();
|
||||
void stop();
|
||||
|
||||
|
@@ -33,7 +33,12 @@ int main(int argc, char *argv[])
|
||||
runner.setValgrindCommand({VALGRIND_FAKE_PATH,
|
||||
{"-i", PARSERTESTS_DATA_DIR "/memcheck-output-sample1.xml"}});
|
||||
ModelDemo demo(&runner);
|
||||
QObject::connect(&runner, &ValgrindRunner::done, &demo, &ModelDemo::finished);
|
||||
QObject::connect(&runner, &ValgrindRunner::processErrorReceived, &app, [](const QString &err) {
|
||||
qDebug() << err;
|
||||
});
|
||||
QObject::connect(&runner, &ValgrindRunner::done, &app, [](bool success) {
|
||||
qApp->exit(success ? 0 : 1);
|
||||
});
|
||||
ErrorListModel model;
|
||||
QObject::connect(&runner, &ValgrindRunner::error, &model, &ErrorListModel::addError,
|
||||
Qt::QueuedConnection);
|
||||
|
@@ -27,11 +27,6 @@ public:
|
||||
Valgrind::XmlProtocol::StackModel* stackModel;
|
||||
|
||||
public Q_SLOTS:
|
||||
void finished() {
|
||||
qDebug() << runner->errorString();
|
||||
qApp->exit(!runner->errorString().isEmpty());
|
||||
}
|
||||
|
||||
void selectionChanged(const QItemSelection &sel, const QItemSelection &) {
|
||||
if (sel.indexes().isEmpty())
|
||||
return;
|
||||
@@ -41,7 +36,6 @@ public Q_SLOTS:
|
||||
stackModel->setError(err);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
Valgrind::ValgrindRunner *runner;
|
||||
};
|
||||
|
Reference in New Issue
Block a user