mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: use foreach() for iteration in KTextEdit::contextMenuEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4773c10804
commit
bbf7da7475
1 changed files with 2 additions and 3 deletions
|
@ -479,9 +479,8 @@ void KTextEdit::contextMenuEvent(QContextMenuEvent *event)
|
||||||
QAction *suggestionsAction = menu.addAction(i18n("No suggestions for %1", selectedWord));
|
QAction *suggestionsAction = menu.addAction(i18n("No suggestions for %1", selectedWord));
|
||||||
suggestionsAction->setEnabled(false);
|
suggestionsAction->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
QStringList::const_iterator end(reps.constEnd());
|
foreach (const QString &rep, reps) {
|
||||||
for (QStringList::const_iterator it = reps.constBegin(); it != end; ++it) {
|
menu.addAction(rep);
|
||||||
menu.addAction(*it);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue