Commit 575d4591 authored by Marco Martin's avatar Marco Martin
Browse files

always the the regext as ^foo$

in order to not match too much, always put the query within ^ and $
to match the whole string to not have unintended matches
parent 523f89e0
......@@ -125,7 +125,7 @@ void KSysGuard::SensorQuery::Private::updateResult(const QDBusPendingReply<Senso
return;
}
auto regexp = QRegularExpression{path};
auto regexp = QRegularExpression{QStringLiteral("^") % path % QStringLiteral("$")};
const auto sensorIds = reply.value().keys();
for (auto id : sensorIds) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment