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();
|
loop.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ValgrindRunner::errorString() const
|
|
||||||
{
|
|
||||||
return d->m_process.errorString();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ValgrindRunner::start()
|
bool ValgrindRunner::start()
|
||||||
{
|
{
|
||||||
return d->run();
|
return d->run();
|
||||||
|
@@ -37,8 +37,6 @@ public:
|
|||||||
|
|
||||||
void waitForFinished() const;
|
void waitForFinished() const;
|
||||||
|
|
||||||
QString errorString() const;
|
|
||||||
|
|
||||||
bool start();
|
bool start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
|
@@ -33,7 +33,12 @@ int main(int argc, char *argv[])
|
|||||||
runner.setValgrindCommand({VALGRIND_FAKE_PATH,
|
runner.setValgrindCommand({VALGRIND_FAKE_PATH,
|
||||||
{"-i", PARSERTESTS_DATA_DIR "/memcheck-output-sample1.xml"}});
|
{"-i", PARSERTESTS_DATA_DIR "/memcheck-output-sample1.xml"}});
|
||||||
ModelDemo demo(&runner);
|
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;
|
ErrorListModel model;
|
||||||
QObject::connect(&runner, &ValgrindRunner::error, &model, &ErrorListModel::addError,
|
QObject::connect(&runner, &ValgrindRunner::error, &model, &ErrorListModel::addError,
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
|
@@ -27,11 +27,6 @@ public:
|
|||||||
Valgrind::XmlProtocol::StackModel* stackModel;
|
Valgrind::XmlProtocol::StackModel* stackModel;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void finished() {
|
|
||||||
qDebug() << runner->errorString();
|
|
||||||
qApp->exit(!runner->errorString().isEmpty());
|
|
||||||
}
|
|
||||||
|
|
||||||
void selectionChanged(const QItemSelection &sel, const QItemSelection &) {
|
void selectionChanged(const QItemSelection &sel, const QItemSelection &) {
|
||||||
if (sel.indexes().isEmpty())
|
if (sel.indexes().isEmpty())
|
||||||
return;
|
return;
|
||||||
@@ -41,7 +36,6 @@ public Q_SLOTS:
|
|||||||
stackModel->setError(err);
|
stackModel->setError(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Valgrind::ValgrindRunner *runner;
|
Valgrind::ValgrindRunner *runner;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user