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,13 +30,13 @@
|
||||
#ifndef DEBUGGER_SOURCEFILEWINDOW_H
|
||||
#define DEBUGGER_SOURCEFILEWINDOW_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QTreeView>
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class SourceFilesModel;
|
||||
|
||||
class SourceFilesWindow : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -44,20 +44,14 @@ class SourceFilesWindow : public QTreeView
|
||||
public:
|
||||
SourceFilesWindow(QWidget *parent = 0);
|
||||
|
||||
void setSourceFiles(const QMap<QString, QString> &sourceFiles);
|
||||
void removeAll();
|
||||
|
||||
signals:
|
||||
void reloadSourceFilesRequested();
|
||||
void fileOpenRequested(QString file);
|
||||
|
||||
private slots:
|
||||
void sourceFileActivated(const QModelIndex &index);
|
||||
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
|
||||
|
||||
private:
|
||||
void contextMenuEvent(QContextMenuEvent *ev);
|
||||
SourceFilesModel *m_model;
|
||||
void setModelData(int role, const QVariant &value = QVariant(),
|
||||
const QModelIndex &index = QModelIndex());
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user