forked from qt-creator/qt-creator
debugger: The DebuggerEngine refactoring.
This replaces the (de facto) singleton engines and data handlers by classes that are instantiated per run. The DebuggerRunControl will now create an object of (a class derived from) DebuggerEngine that contains all the relevant "dynamic" data. DebuggerManager is no more. The "singleton" bits are merged into DebuggerPlugin, whereas the data bits went to DebuggerEngine. There is no formal notion of a "current" DebuggerEngine. However, as there's only one DebuggerEngine at a time that has its data models connected to the view, there's still some "de facto" notion of a "current" engine. Calling SomeModel::setData(int role, QVariant data) with custom role is used as the primary dispatch mechanism from the views to the "current" data models (and the engine, as all data models know their engine).
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#ifndef DEBUGGER_BREAKPOINT_H
|
||||
#define DEBUGGER_BREAKPOINT_H
|
||||
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Debugger {
|
||||
@@ -58,13 +60,17 @@ public:
|
||||
BreakHandler *handler() { return m_handler; }
|
||||
|
||||
bool isLocatedAt(const QString &fileName, int lineNumber) const;
|
||||
bool isSimilarTo(const BreakpointData *needle) const;
|
||||
bool conditionsMatch() const;
|
||||
|
||||
protected:
|
||||
// This copies only the static data.
|
||||
BreakpointData(const BreakpointData &);
|
||||
|
||||
private:
|
||||
// Intentionally unimplemented.
|
||||
// Making it copyable is tricky because of the markers.
|
||||
void operator=(const BreakpointData &);
|
||||
BreakpointData(const BreakpointData &);
|
||||
|
||||
// Our owner
|
||||
BreakHandler *m_handler; // Not owned.
|
||||
@@ -116,8 +122,11 @@ private:
|
||||
BreakpointMarker *marker;
|
||||
};
|
||||
|
||||
typedef QList<BreakpointData *> Breakpoints;
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
Q_DECLARE_METATYPE(Debugger::Internal::BreakpointData *);
|
||||
|
||||
#endif // DEBUGGER_BREAKPOINT_H
|
||||
|
||||
Reference in New Issue
Block a user