Commit 3c874a0d authored by hjk's avatar hjk

Debugger: Re-enable initial population of register view

Registers are only retrieved if the view is visible.
When it becomes first visible, an extra poke to initiate
population is needed.

Change-Id: I67c3e166ce98e6405707f8457ebd32d0d1939229
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent e5459fb9
......@@ -314,6 +314,12 @@ void BaseTreeView::mousePressEvent(QMouseEvent *ev)
d->toggleColumnWidth(columnAt(ev->x()));
}
void BaseTreeView::showEvent(QShowEvent *ev)
{
emit aboutToShow();
TreeView::showEvent(ev);
}
/*!
Shows a round spinning progress indicator on top of the tree view.
Creates a progress indicator widget if necessary.
......
......@@ -51,14 +51,19 @@ public:
void setSettings(QSettings *settings, const QByteArray &key);
QModelIndexList activeRows() const;
void setModel(QAbstractItemModel *model);
virtual void rowActivated(const QModelIndex &) {}
virtual void rowClicked(const QModelIndex &) {}
void mousePressEvent(QMouseEvent *ev);
void setModel(QAbstractItemModel *model) override;
void mousePressEvent(QMouseEvent *ev) override;
void showEvent(QShowEvent *ev) override;
void showProgressIndicator();
void hideProgressIndicator();
signals:
void aboutToShow();
public slots:
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
......
......@@ -687,24 +687,6 @@ public:
m_returnView->header()->resizeSection(section, newSize);
}
void sourceFilesDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadSourceFiles();
}
void modulesDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadModules();
}
void registerDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadRegisters();
}
void synchronizeBreakpoints()
{
showMessage(QLatin1String("ATTEMPT SYNC"), LogDebug);
......@@ -1327,10 +1309,16 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_modulesView = new ModulesTreeView;
m_modulesView->setSettings(settings, "Debugger.ModulesView");
connect(m_modulesView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadModules();
}, Qt::QueuedConnection);
m_modulesWindow = addSearch(m_modulesView, tr("Modules"), DOCKWIDGET_MODULES);
m_registerView = new RegisterTreeView;
m_registerView->setSettings(settings, "Debugger.RegisterView");
connect(m_registerView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadRegisters();
}, Qt::QueuedConnection);
m_registerWindow = addSearch(m_registerView, tr("Registers"), DOCKWIDGET_REGISTER);
m_stackView = new StackTreeView;
......@@ -1339,6 +1327,9 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_sourceFilesView = new SourceFilesTreeView;
m_sourceFilesView->setSettings(settings, "Debugger.SourceFilesView");
connect(m_sourceFilesView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadSourceFiles();
}, Qt::QueuedConnection);
m_sourceFilesWindow = addSearch(m_sourceFilesView, tr("Source Files"), DOCKWIDGET_SOURCE_FILES);
m_threadsView = new ThreadsTreeView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment