AtSpiAdaptor: eradicate remaining Q_FOREACH loops
... and replace them by C++11 range-for loops. Change-Id: I6975121f606ec1fcda7a624b02a68edf829bb70b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
3f5d27bfda
commit
cbd5a2dcb8
@ -2050,8 +2050,8 @@ QVariantList AtSpiAdaptor::getAttributes(QAccessibleInterface *interface, int of
|
||||
int endOffset;
|
||||
|
||||
QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);
|
||||
QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
foreach (const QString &attr, attributes) {
|
||||
const QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
for (const QString &attr : attributes) {
|
||||
QStringList items;
|
||||
items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);
|
||||
@ -2069,14 +2069,13 @@ QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, in
|
||||
{
|
||||
QString mapped;
|
||||
QString joined;
|
||||
QStringList attributes;
|
||||
QSpiAttributeSet map;
|
||||
int startOffset;
|
||||
int endOffset;
|
||||
|
||||
joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);
|
||||
attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
foreach (const QString& attr, attributes) {
|
||||
const QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
for (const QString& attr : attributes) {
|
||||
QStringList items;
|
||||
items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user