debugger: tighten write accesss to BreakpointData

This commit is contained in:
hjk
2010-11-15 12:21:43 +01:00
parent a66c8d35d6
commit 069d4b30ee
2 changed files with 14 additions and 6 deletions

View File

@@ -46,6 +46,8 @@
namespace Debugger {
namespace Internal {
class BreakpointMarker;
class BreakHandler : public QAbstractTableModel
{
Q_OBJECT

View File

@@ -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);