Add missing references to loop variable

This commit is contained in:
Nicolas Fella 2020-07-29 00:07:40 +02:00
parent 3ca55ad794
commit e38cdb111b
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ void SmsPlugin::sendSms(const QDBusVariant& addresses, const QString& messageBod
QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses); QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
QVariantList addressMapList; QVariantList addressMapList;
for (const ConversationAddress address : addressList) { for (const ConversationAddress& address : addressList) {
QVariantMap addressMap({{QStringLiteral("address"), address.address()}}); QVariantMap addressMap({{QStringLiteral("address"), address.address()}});
addressMapList.append(addressMap); addressMapList.append(addressMap);
qDebug() <<address.address(); qDebug() <<address.address();

View file

@ -67,8 +67,8 @@ bool ConversationsSortFilterProxyModel::filterAcceptsRow(int sourceRow, const QM
} }
// This block of code compares each address in the multi target conversation to find a match // This block of code compares each address in the multi target conversation to find a match
QList<ConversationAddress> addressList = sourceModel()->data(index, ConversationListModel::AddressesRole).value<QList<ConversationAddress>>(); const QList<ConversationAddress> addressList = sourceModel()->data(index, ConversationListModel::AddressesRole).value<QList<ConversationAddress>>();
for (const ConversationAddress address : addressList) { for (const ConversationAddress& address : addressList) {
QString canonicalAddress = SmsHelper::canonicalizePhoneNumber(address.address()); QString canonicalAddress = SmsHelper::canonicalizePhoneNumber(address.address());
if (canonicalAddress.contains(filterRegExp())) { if (canonicalAddress.contains(filterRegExp())) {
return true; return true;