Changeset View
Changeset View
Standalone View
Standalone View
src/declarative/runnermodel.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 141 | } else if (role == Enabled) { | |||
---|---|---|---|---|---|
142 | return m_matches.at(index.row()).isEnabled(); | 142 | return m_matches.at(index.row()).isEnabled(); | ||
143 | } else if (role == RunnerId) { | 143 | } else if (role == RunnerId) { | ||
144 | return m_matches.at(index.row()).runner()->id(); | 144 | return m_matches.at(index.row()).runner()->id(); | ||
145 | } else if (role == RunnerName) { | 145 | } else if (role == RunnerName) { | ||
146 | return m_matches.at(index.row()).runner()->name(); | 146 | return m_matches.at(index.row()).runner()->name(); | ||
147 | } else if (role == Actions) { | 147 | } else if (role == Actions) { | ||
148 | QVariantList actions; | 148 | QVariantList actions; | ||
149 | Plasma::QueryMatch amatch = m_matches.at(index.row()); | 149 | Plasma::QueryMatch amatch = m_matches.at(index.row()); | ||
150 | QList<QAction*> theactions = m_manager->actionsForMatch(amatch); | 150 | const QList<QAction*> theactions = m_manager->actionsForMatch(amatch); | ||
151 | foreach(QAction* action, theactions) { | 151 | for (QAction* action : theactions) { | ||
152 | actions += qVariantFromValue<QObject*>(action); | 152 | actions += qVariantFromValue<QObject*>(action); | ||
153 | } | 153 | } | ||
154 | return actions; | 154 | return actions; | ||
155 | } | 155 | } | ||
156 | 156 | | |||
157 | return QVariant(); | 157 | return QVariant(); | ||
158 | } | 158 | } | ||
159 | 159 | | |||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |