Changeset View
Changeset View
Standalone View
Standalone View
autotests/kxmlgui_unittest.cpp
Show First 20 Lines • Show All 279 Lines • ▼ Show 20 Line(s) | 236 | { | |||
---|---|---|---|---|---|
280 | // Check that the menus modified by the app are still there | 280 | // Check that the menus modified by the app are still there | ||
281 | QVERIFY(finalDoc.contains(QLatin1String("<Action name=\"file_open\""))); | 281 | QVERIFY(finalDoc.contains(QLatin1String("<Action name=\"file_open\""))); | ||
282 | // Check that the toolbars modified by the user were kept | 282 | // Check that the toolbars modified by the user were kept | ||
283 | QVERIFY(finalDoc.contains(QLatin1String("<Action name=\"home\""))); | 283 | QVERIFY(finalDoc.contains(QLatin1String("<Action name=\"home\""))); | ||
284 | } | 284 | } | ||
285 | 285 | | |||
286 | static QStringList collectMenuNames(KXMLGUIFactory &factory) | 286 | static QStringList collectMenuNames(KXMLGUIFactory &factory) | ||
287 | { | 287 | { | ||
288 | QList<QWidget *> containers = factory.containers(QStringLiteral("Menu")); | 288 | const QList<QWidget *> containers = factory.containers(QStringLiteral("Menu")); | ||
289 | QStringList containerNames; | 289 | QStringList containerNames; | ||
290 | Q_FOREACH (QWidget *w, containers) { | 290 | for (QWidget *w : containers) { | ||
291 | containerNames << w->objectName(); | 291 | containerNames << w->objectName(); | ||
292 | } | 292 | } | ||
293 | return containerNames; | 293 | return containerNames; | ||
294 | } | 294 | } | ||
295 | 295 | | |||
296 | void debugActions(const QList<QAction *> &actions) | 296 | void debugActions(const QList<QAction *> &actions) | ||
297 | { | 297 | { | ||
298 | Q_FOREACH (QAction *action, actions) { | 298 | Q_FOREACH (QAction *action, actions) { | ||
▲ Show 20 Lines • Show All 812 Lines • Show Last 20 Lines |