Changeset View
Changeset View
Standalone View
Standalone View
src/kxmlguiversionhandler.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 38 | { | |||
---|---|---|---|---|---|
45 | } | 45 | } | ||
46 | return toolbars; | 46 | return toolbars; | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | static void removeAllToolBars(QDomDocument &doc) | 49 | static void removeAllToolBars(QDomDocument &doc) | ||
50 | { | 50 | { | ||
51 | QDomElement parent = doc.documentElement(); | 51 | QDomElement parent = doc.documentElement(); | ||
52 | const QList<QDomElement> toolBars = extractToolBars(doc); | 52 | const QList<QDomElement> toolBars = extractToolBars(doc); | ||
53 | Q_FOREACH (const QDomElement &e, toolBars) { | 53 | for (const QDomElement &e : toolBars) { | ||
54 | parent.removeChild(e); | 54 | parent.removeChild(e); | ||
55 | } | 55 | } | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | static void insertToolBars(QDomDocument &doc, const QList<QDomElement> &toolBars) | 58 | static void insertToolBars(QDomDocument &doc, const QList<QDomElement> &toolBars) | ||
59 | { | 59 | { | ||
60 | QDomElement parent = doc.documentElement(); | 60 | QDomElement parent = doc.documentElement(); | ||
61 | QDomElement menuBar = parent.namedItem(QStringLiteral("MenuBar")).toElement(); | 61 | QDomElement menuBar = parent.namedItem(QStringLiteral("MenuBar")).toElement(); | ||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |