Changeset View
Changeset View
Standalone View
Standalone View
src/partmanager.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 123 | { | |||
---|---|---|---|---|---|
126 | 126 | | |||
127 | d->m_policy = Direct; | 127 | d->m_policy = Direct; | ||
128 | 128 | | |||
129 | addManagedTopLevelWidget(topLevel); | 129 | addManagedTopLevelWidget(topLevel); | ||
130 | } | 130 | } | ||
131 | 131 | | |||
132 | PartManager::~PartManager() | 132 | PartManager::~PartManager() | ||
133 | { | 133 | { | ||
134 | foreach (const QWidget *w, d->m_managedTopLevelWidgets) { | 134 | for (const QWidget *w : qAsConst(d->m_managedTopLevelWidgets)) { | ||
135 | disconnect(w, &QWidget::destroyed, | 135 | disconnect(w, &QWidget::destroyed, | ||
136 | this, &PartManager::slotManagedTopLevelWidgetDestroyed); | 136 | this, &PartManager::slotManagedTopLevelWidgetDestroyed); | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | foreach (Part *it, d->m_parts) { | 139 | for (Part *it : qAsConst(d->m_parts)) { | ||
140 | it->setManager(nullptr); | 140 | it->setManager(nullptr); | ||
141 | } | 141 | } | ||
142 | 142 | | |||
143 | // core dumps ... setActivePart( 0 ); | 143 | // core dumps ... setActivePart( 0 ); | ||
144 | qApp->removeEventFilter(this); | 144 | qApp->removeEventFilter(this); | ||
145 | delete d; | 145 | delete d; | ||
146 | } | 146 | } | ||
147 | 147 | | |||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |