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:
@@ -4443,12 +4443,22 @@ void BaseTextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
|
||||
int n = d->extraAreaToggleMarkBlockNumber;
|
||||
d->extraAreaToggleMarkBlockNumber = -1;
|
||||
if (cursor.blockNumber() == n) {
|
||||
if (TextBlockUserData *data = static_cast<TextBlockUserData *>(cursor.block().userData())) {
|
||||
foreach (ITextMark *mark, data->marks()) {
|
||||
if (mark->clickable()) {
|
||||
mark->clicked();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int line = n + 1;
|
||||
ITextEditor::MarkRequestKind kind;
|
||||
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
|
||||
kind = ITextEditor::BookmarkRequest;
|
||||
else
|
||||
kind = ITextEditor::BreakpointRequest;
|
||||
|
||||
emit editor()->markRequested(editor(), line, kind);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user