From 069d4b30ee1e253c917b863d6e437d64a07d1c53 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Mon, 15 Nov 2010 12:21:43 +0100 Subject: [PATCH] debugger: tighten write accesss to BreakpointData --- src/plugins/debugger/breakhandler.h | 2 ++ src/plugins/debugger/breakpoint.h | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h index 877b19a541f..06345d53db0 100644 --- a/src/plugins/debugger/breakhandler.h +++ b/src/plugins/debugger/breakhandler.h @@ -46,6 +46,8 @@ namespace Debugger { namespace Internal { +class BreakpointMarker; + class BreakHandler : public QAbstractTableModel { Q_OBJECT diff --git a/src/plugins/debugger/breakpoint.h b/src/plugins/debugger/breakpoint.h index c013df2ef02..a558fd7ed04 100644 --- a/src/plugins/debugger/breakpoint.h +++ b/src/plugins/debugger/breakpoint.h @@ -43,8 +43,12 @@ typedef quint64 BreakpointId; // FIXME: make Internal. namespace Internal { -class BreakpointMarker; +class BreakWindow; +class BreakpointDialog; class BreakHandler; +class BreakpointData; + +QDataStream &operator>>(QDataStream& stream, BreakpointData &data); ////////////////////////////////////////////////////////////////// // @@ -78,13 +82,15 @@ enum BreakpointState class BreakpointData { private: - - // Intentionally unimplemented. - // Making it copyable is tricky because of the markers. + // Intentionally unimplemented. BreakpointData objects are supposed + // to be added to the BreakHandler soon after construction. BreakpointData(const BreakpointData &); void operator=(const BreakpointData &); - friend class BreakHandler; + friend class BreakHandler; // This should be the only class manipulating data. + friend class BreakWindow; // FIXME: Remove. + friend class BreakpointDialog; // FIXME: Remove. + friend QDataStream &operator>>(QDataStream& stream, BreakpointData &data); public: BreakpointData(); @@ -118,7 +124,7 @@ public: static const char *throwFunction; static const char *catchFunction; -//private: +private: // All setters return true on change. bool setUseFullPath(bool on); bool setMarkerFileName(const QString &file); -- GitLab