MCPcopy Create free account
hub / github.com/KDE/kdevelop / showEvent

Method showEvent

kdevplatform/debugger/breakpoint/breakpointwidget.cpp:196–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void 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
216void BreakpointWidget::edit(KDevelop::Breakpoint *n)
217{

Callers

nothing calls this directly

Calls 6

headerMethod · 0.80
rowCountMethod · 0.45
breakpointModelMethod · 0.45
columnCountMethod · 0.45
modelMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected