Commit ecc27721 authored by Laurent Montel's avatar Laurent Montel
Browse files

Simplify code

parent f70f9713
......@@ -467,10 +467,8 @@ void ViewerPrivate::createOpenWithMenu(QMenu *topMenu, const QString &contentTyp
}
//qCDebug(MESSAGEVIEWER_LOG) << offers.count() << "offers" << topMenu << menu;
KService::List::ConstIterator it = offers.constBegin();
KService::List::ConstIterator end = offers.constEnd();
for (; it != end; ++it) {
QAction *act = MessageViewer::Util::createAppAction(*it,
for (const KService::Ptr &ser : offers) {
QAction *act = MessageViewer::Util::createAppAction(ser,
// no submenu -> prefix single offer
menu == topMenu, actionGroup, menu);
menu->addAction(act);
......
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