forked from qt-creator/qt-creator
Make TaskMarks clickable and jump to the right task in the taskwindow
That means it is no longer possible to make bookmarks on lines with errors or warnings by simply clicking. That's not nice. It might be better to do something different, but let's see how the feedback to this is. Change-Id: I34788ff638ed49c21001d03cd60f992ffabd6153 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -304,6 +304,8 @@ TaskWindow::TaskWindow(TaskHub *taskhub) : d(new TaskWindowPrivate)
|
||||
this, SLOT(setCategoryVisibility(Core::Id,bool)));
|
||||
connect(d->m_taskHub, SIGNAL(popupRequested(bool)),
|
||||
this, SLOT(popup(bool)));
|
||||
connect(d->m_taskHub, SIGNAL(showTask(uint)),
|
||||
this, SLOT(showTask(uint)));
|
||||
}
|
||||
|
||||
TaskWindow::~TaskWindow()
|
||||
@@ -388,6 +390,14 @@ void TaskWindow::updatedTaskLineNumber(unsigned int id, int line)
|
||||
emit tasksChanged();
|
||||
}
|
||||
|
||||
void TaskWindow::showTask(unsigned int id)
|
||||
{
|
||||
int sourceRow = d->m_model->rowForId(id);
|
||||
QModelIndex sourceIdx = d->m_model->index(sourceRow, 0);
|
||||
QModelIndex filterIdx = d->m_filter->mapFromSource(sourceIdx);
|
||||
d->m_listview->setCurrentIndex(filterIdx);
|
||||
}
|
||||
|
||||
void TaskWindow::triggerDefaultHandler(const QModelIndex &index)
|
||||
{
|
||||
if (!index.isValid())
|
||||
|
||||
Reference in New Issue
Block a user