Commit e4a5da96 authored by Carl Schwan's avatar Carl Schwan 🚴 Committed by Ivan Podkurkov
Browse files

Apply corrections (code-style, const qualifiers)

parent 0ece70a8
Pipeline #98080 passed with stage
in 1 minute and 51 seconds
......@@ -345,7 +345,9 @@ static bool isFilterValid(const QStringList &filters, const QVariantMap &filter)
{
auto i = filter.constBegin();
while (i != filter.constEnd()) {
if (!filters.contains(i.key())) return false;
if (!filters.contains(i.key())) {
return false;
}
i++;
}
return true;
......@@ -392,7 +394,7 @@ void AdapterTest::discoveryFilterTest()
PendingCall* p = unit.adapter->getDiscoveryFilters(); p->waitForFinished();
Q_ASSERT(p->isFinished());
QCOMPARE(p->error(), PendingCall::NoError);
QStringList filters = p->value().toStringList();
const QStringList filters = p->value().toStringList();
// Verify filter
QCOMPARE(isFilterValid(filters, filter), isValid);
......@@ -409,12 +411,11 @@ void AdapterTest::discoveryFilterTest()
// Set discovery filter
unit.adapter->setDiscoveryFilter(filter);
if (shouldBeDiscoverable)
{
if (shouldBeDiscoverable) {
// Check if adapter became discoverable
QTRY_COMPARE(adapterSpy.count(), 1);
QList<QVariant> adapterArguments = adapterSpy.takeFirst();
const QList<QVariant> adapterArguments = adapterSpy.takeFirst();
QCOMPARE(adapterArguments.at(0).toBool(), true);
Autotests::verifyPropertiesChangedSignal(dbusSpy, QStringLiteral("Discoverable"), true);
......
......@@ -288,7 +288,7 @@ public:
/**
* Set the discovery filter for the caller.
*
* When this method is called with no filter parameter, filter is removed.
* When this method is called with no filter parameter, the filter is removed.
*
* For details and available filter options, see [Bluez documentation for Adapter object](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt)
*
......@@ -302,7 +302,7 @@ public:
/**
* Get the discovery filters for the caller.
*
* Return available filters that can be given to setDiscoveryFilter, for details see [Bluez documentation for Adapter object](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt)
* This returns the available filters that can be given to setDiscoveryFilter, for details see [Bluez documentation for Adapter object](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt)
*
* Possible errors: PendingCall::Failed
*
......
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