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

Method setCurrentThread

kdevplatform/debugger/framestack/framestackmodel.cpp:300–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void FrameStackModel::setCurrentThread(int threadNumber)
301{
302 Q_D(FrameStackModel);
303
304 qCDebug(DEBUGGER) << threadNumber;
305 if (d->m_currentThread != threadNumber && threadNumber != -1) {
306 // FIXME: this logic means that if we switch to thread 3 and
307 // then to thread 2 and then to thread 3, we'll request frames
308 // for thread 3 again, even if the program was not run in between
309 // and therefore frames could not have changed.
310 d->m_currentFrame = 0; //set before fetchFrames else --frame argument would be wrong
311 d->m_updateCurrentFrameOnNextFetch = true;
312 fetchFrames(threadNumber, 0, 20);
313 }
314 if (threadNumber != d->m_currentThread) {
315 d->m_currentFrame = 0;
316 d->m_currentThread = threadNumber;
317 emit currentFrameChanged(d->m_currentFrame);
318 }
319 qCDebug(DEBUGGER) << "currentThread: " << d->m_currentThread << "currentFrame: " << d->m_currentFrame;
320 emit currentThreadChanged(threadNumber);
321 session()->raiseEvent(IDebugSession::thread_or_frame_changed);
322}
323
324void FrameStackModel::setCurrentThread(const QModelIndex& index)
325{

Callers 3

setThreadShownMethod · 0.80
testStackSwitchThreadMethod · 0.80

Calls 4

raiseEventMethod · 0.45
isValidMethod · 0.45
columnMethod · 0.45
rowMethod · 0.45

Tested by 2

testStackSwitchThreadMethod · 0.64