m_ui.actionShowErrorsDock, SLOT(setChecked(bool)));
connect(m_ui.actionShowErrorsDock, SIGNAL(triggered(bool)),
m_ui.errorsDock, SLOT(setVisible(bool)));
+ connect(m_ui.errorsTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
+ this, SLOT(slotErrorSelected(QTreeWidgetItem*)));
}
void MainWindow::replayStateFound(const ApiTraceState &state)
}
}
+void MainWindow::slotErrorSelected(QTreeWidgetItem *current)
+{
+ if (current) {
+ ApiTraceCall *call =
+ current->data(0, Qt::UserRole).value<ApiTraceCall*>();
+ Q_ASSERT(call);
+ QModelIndex index = m_proxyModel->indexForCall(call);
+ if (index.isValid()) {
+ m_ui.callView->setCurrentIndex(index);
+ } else {
+ statusBar()->showMessage(tr("Call has been filtered out."));
+ }
+ }
+}
+
#include "mainwindow.moc"
class JumpWidget;
class QModelIndex;
class QProgressBar;
+class QTreeWidgetItem;
class QUrl;
class RetraceError;
class Retracer;
void slotGoFrameEnd();
void slotTraceChanged(ApiTraceCall *call);
void slotRetraceErrors(const QList<RetraceError> &errors);
+ void slotErrorSelected(QTreeWidgetItem *current);
private:
void initObjects();