Fix some compiler warnings

Unused lambda captures, unused private field, missing override.

Change-Id: I8b1d9d40af87fdfbd449841e9f112aad4682d8c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2024-02-01 08:46:49 +01:00
parent acf7d30cbd
commit 02ee8b183e
3 changed files with 6 additions and 10 deletions

View File

@@ -808,7 +808,8 @@ private:
}
}
QModelIndex indexForCheck(const QString &check) const {
QModelIndex indexForCheck(const QString &check) const override
{
if (check == "*")
return index(0, 0, QModelIndex());

View File

@@ -5,6 +5,7 @@
#include <utils/launcherinterface.h>
#include <utils/temporarydirectory.h>
#include <valgrind/valgrindprocess.h>
#include <valgrind/xmlprotocol/frame.h>
#include <valgrind/xmlprotocol/parser.h>
#include <valgrind/xmlprotocol/stack.h>
@@ -32,7 +33,7 @@ int main(int argc, char *argv[])
ValgrindProcess runner;
runner.setValgrindCommand({VALGRIND_FAKE_PATH,
{"-i", PARSERTESTS_DATA_DIR "/memcheck-output-sample1.xml"}});
ModelDemo demo(&runner);
ModelDemo demo;
QObject::connect(&runner, &ValgrindProcess::processErrorReceived, &app, [](const QString &err) {
qDebug() << err;
});

View File

@@ -12,17 +12,14 @@
#include <valgrind/xmlprotocol/error.h>
#include <valgrind/xmlprotocol/errorlistmodel.h>
#include <valgrind/xmlprotocol/stackmodel.h>
#include <valgrind/valgrindprocess.h>
class ModelDemo : public QObject
{
Q_OBJECT
public:
explicit ModelDemo(Valgrind::ValgrindProcess *r, QObject *parent = 0)
explicit ModelDemo(QObject *parent = 0)
: QObject(parent)
, runner(r)
{
}
{}
Valgrind::XmlProtocol::StackModel* stackModel;
@@ -35,7 +32,4 @@ public Q_SLOTS:
qDebug() << idx.row() << err.what();
stackModel->setError(err);
}
private:
Valgrind::ValgrindProcess *runner;
};