| 194 | } |
| 195 | |
| 196 | void BreakpointWidget::showEvent(QShowEvent *) |
| 197 | { |
| 198 | Q_D(BreakpointWidget); |
| 199 | |
| 200 | if (d->firstShow && d->debugController->breakpointModel()->rowCount() > 0) { |
| 201 | for (int i = 0; i < d->breakpointsView->model()->columnCount(); ++i) { |
| 202 | if(i == Breakpoint::LocationColumn){ |
| 203 | continue; |
| 204 | } |
| 205 | d->breakpointsView->resizeColumnToContents(i); |
| 206 | } |
| 207 | //for some reasons sometimes width can be very small about 200... But it doesn't matter as we use tooltip anyway. |
| 208 | int width = d->breakpointsView->size().width(); |
| 209 | |
| 210 | QHeaderView* header = d->breakpointsView->header(); |
| 211 | header->resizeSection(Breakpoint::LocationColumn, width > 400 ? width/2 : header->sectionSize(Breakpoint::LocationColumn)*2 ); |
| 212 | d->firstShow = false; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void BreakpointWidget::edit(KDevelop::Breakpoint *n) |
| 217 | { |
nothing calls this directly
no test coverage detected