Debugger: Improve exit handling.

This commit is contained in:
Friedemann Kleint
2010-08-18 11:08:50 +02:00
parent 172288b593
commit 83f3119c97
4 changed files with 34 additions and 12 deletions

View File

@@ -286,10 +286,22 @@ void SnapshotHandler::setCurrentIndex(int index)
reset();
}
DebuggerRunControl *SnapshotHandler::at(int i)
DebuggerRunControl *SnapshotHandler::at(int i) const
{
return m_snapshots.at(i).data();
}
QList<DebuggerRunControl*> SnapshotHandler::runControls() const
{
// Return unique list of run controls
QList<DebuggerRunControl*> rc;
rc.reserve(m_snapshots.size());
foreach(const QPointer<DebuggerRunControl> &runControlPtr, m_snapshots)
if (DebuggerRunControl *runControl = runControlPtr)
if (!rc.contains(runControl))
rc.push_back(runControl);
return rc;
}
} // namespace Internal
} // namespace Debugger