Changeset View
Changeset View
Standalone View
Standalone View
src/mode/katemodemanager.cpp
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Line(s) | 253 | if (type->mimetypes.indexOf(mtName) > -1) { | |||
---|---|---|---|---|---|
254 | types.append(type); | 254 | types.append(type); | ||
255 | } | 255 | } | ||
256 | } | 256 | } | ||
257 | 257 | | |||
258 | if (!types.isEmpty()) { | 258 | if (!types.isEmpty()) { | ||
259 | int pri = -1; | 259 | int pri = -1; | ||
260 | QString name; | 260 | QString name; | ||
261 | 261 | | |||
262 | foreach (KateFileType *type, types) { | 262 | for (KateFileType *type : qAsConst(types)) { | ||
263 | if (type->priority > pri) { | 263 | if (type->priority > pri) { | ||
264 | pri = type->priority; | 264 | pri = type->priority; | ||
265 | name = type->name; | 265 | name = type->name; | ||
266 | } | 266 | } | ||
267 | } | 267 | } | ||
268 | 268 | | |||
269 | return name; | 269 | return name; | ||
270 | } | 270 | } | ||
Show All 36 Lines |