forked from qt-creator/qt-creator
TextEditor: Use callback in refactoring markers
Allows to trigger actions without adding specific handling into the editor. Change-Id: Ia63d65d3feca37bcefca1b6322ade039027a92d8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "textdocumentlayout.h"
|
||||
#include "texteditor.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QPainter>
|
||||
@@ -92,4 +93,11 @@ void RefactorOverlay::paintMarker(const RefactorMarker& marker, QPainter *painte
|
||||
m_maxWidth = qMax(m_maxWidth, x + actualIconSize.width() - int(offset.x()));
|
||||
}
|
||||
|
||||
RefactorMarkers RefactorMarker::filterOutType(const RefactorMarkers &markers, const Core::Id &type)
|
||||
{
|
||||
return Utils::filtered(markers, [type](const RefactorMarker &marker) {
|
||||
return marker.type != type;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace TextEditor
|
||||
|
||||
Reference in New Issue
Block a user