Make ITextMark::widthFactor() and visible() non virtual

Instead make them simple properties of ITextMark
The BaseTextMark destructor calls removeMark(this), at which point the
virtual functions are already returning a possibly wrong value.

Change-Id: Ic5b58dc0bc285a9618f4b9967ecfe941d75883c7
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Daniel Teske
2012-05-02 13:10:14 +02:00
committed by hjk
parent f3d49692eb
commit 1c1736944f
5 changed files with 31 additions and 20 deletions

View File

@@ -50,6 +50,7 @@ CallgrindTextMark::CallgrindTextMark(const QPersistentModelIndex &index,
: TextEditor::BaseTextMark(fileName, lineNumber), m_modelIndex(index)
{
setPriority(TextEditor::ITextMark::HighPriority);
setWidthFactor(4.0);
}
void CallgrindTextMark::paint(QPainter *painter, const QRect &paintRect) const
@@ -100,7 +101,3 @@ const Function *CallgrindTextMark::function() const
return m_modelIndex.data(DataModel::FunctionRole).value<const Function *>();
}
double CallgrindTextMark::widthFactor() const
{
return 4.0;
}