summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/snapshothandler.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-08-18 11:08:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-08-18 11:08:50 +0200
commit83f3119c97cb734a29135aeda608f1f2c275254f (patch)
treed7608cdba4fa8c5174e7cf44a280157faaa9cdb0 /src/plugins/debugger/snapshothandler.cpp
parent172288b5939166de60901134dc125e2a1f83cf34 (diff)
downloadqt-creator-83f3119c97cb734a29135aeda608f1f2c275254f.tar.gz
Debugger: Improve exit handling.
Diffstat (limited to 'src/plugins/debugger/snapshothandler.cpp')
-rw-r--r--src/plugins/debugger/snapshothandler.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp
index 0bcfcc9054..2e9571c753 100644
--- a/src/plugins/debugger/snapshothandler.cpp
+++ b/src/plugins/debugger/snapshothandler.cpp
@@ -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