============================================================================
| 1201 | |
| 1202 | //============================================================================ |
| 1203 | void CDockAreaWidget::closeArea() |
| 1204 | { |
| 1205 | // If there is only one single dock widget and this widget has the |
| 1206 | // DeleteOnClose feature or CustomCloseHandling, then we delete the dock widget now; |
| 1207 | // in the case of CustomCloseHandling, the CDockWidget class will emit its |
| 1208 | // closeRequested signal and not actually delete unless the signal is handled in a way that deletes it |
| 1209 | auto OpenDockWidgets = openedDockWidgets(); |
| 1210 | if (OpenDockWidgets.count() == 1 && |
| 1211 | (OpenDockWidgets[0]->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) || OpenDockWidgets[0]->features().testFlag(CDockWidget::CustomCloseHandling)) |
| 1212 | && !isAutoHide()) |
| 1213 | { |
| 1214 | OpenDockWidgets[0]->closeDockWidgetInternal(); |
| 1215 | } |
| 1216 | else |
| 1217 | { |
| 1218 | for (auto DockWidget : openedDockWidgets()) |
| 1219 | { |
| 1220 | if ((DockWidget->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) && DockWidget->features().testFlag(CDockWidget::DockWidgetForceCloseWithArea)) || |
| 1221 | DockWidget->features().testFlag(CDockWidget::CustomCloseHandling)) |
| 1222 | { |
| 1223 | DockWidget->closeDockWidgetInternal(); |
| 1224 | } |
| 1225 | else if (DockWidget->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) && isAutoHide()) |
| 1226 | { |
| 1227 | DockWidget->closeDockWidgetInternal(); |
| 1228 | } |
| 1229 | else |
| 1230 | { |
| 1231 | DockWidget->toggleView(false); |
| 1232 | } |
| 1233 | } |
| 1234 | } |
| 1235 | } |
| 1236 | |
| 1237 | |
| 1238 | enum eBorderLocation |
no test coverage detected