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

Method setItem

kdevplatform/debugger/breakpoint/breakpointdetails.cpp:80–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80void BreakpointDetails::setItem(Breakpoint *breakpoint)
81{
82 Q_D(BreakpointDetails);
83
84 d->currentBreakpoint = breakpoint;
85
86 if (!breakpoint) {
87 d->status->hide();
88 d->hits->hide();
89 d->ignore->setEnabled(false);
90 return;
91 }
92
93 d->ignore->setValue(breakpoint->ignoreHits());
94
95 if (breakpoint->state() == Breakpoint::NotStartedState) {
96 d->status->hide();
97 d->hits->hide();
98 d->ignore->setEnabled(true);
99 return;
100 }
101
102 d->status->show();
103 d->hits->show();
104 d->ignore->setEnabled(true);
105
106 if (breakpoint->errorText().isEmpty()) {
107 switch (breakpoint->state()) {
108 case Breakpoint::NotStartedState:
109 Q_ASSERT(0);
110 break;
111 case Breakpoint::PendingState:
112 d->status->setText(i18n("Breakpoint is <a href=\"pending\">pending</a>"));
113 break;
114 case Breakpoint::DirtyState:
115 d->status->setText(i18n("Breakpoint is <a href=\"dirty\">dirty</a>"));
116 break;
117 case Breakpoint::CleanState:
118 d->status->setText(i18n("Breakpoint is active"));
119 break;
120 }
121
122 if (breakpoint->hitCount() == -1)
123 d->hits->clear();
124 else if (breakpoint->hitCount())
125 d->hits->setText(i18np("Hit %1 time", "Hit %1 times", breakpoint->hitCount()));
126 else
127 d->hits->setText(i18n("Not hit yet"));
128 } else {
129 d->status->setText(i18n("Breakpoint has errors"));
130 d->hits->setText(breakpoint->errorText());
131 }
132}
133
134void BreakpointDetails::showExplanation(const QString& link)
135{

Callers 4

mainFunction · 0.80
updateModelForGroupMethod · 0.80

Calls 10

ignoreHitsMethod · 0.80
showMethod · 0.80
errorTextMethod · 0.80
hitCountMethod · 0.80
setEnabledMethod · 0.45
setValueMethod · 0.45
stateMethod · 0.45
isEmptyMethod · 0.45
setTextMethod · 0.45
clearMethod · 0.45

Tested by 1

mainFunction · 0.64