minor refactor
This commit is contained in:
parent
a9295caff2
commit
66e48cbf41
|
@ -1334,9 +1334,9 @@ int DocumentLine::glyphWidth(int i)
|
||||||
return calcSegmentInterval(mGlyphStartPositionList, mWidth, i);
|
return calcSegmentInterval(mGlyphStartPositionList, mWidth, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DocumentLine::width(bool forceUpdate)
|
int DocumentLine::width()
|
||||||
{
|
{
|
||||||
if(mWidth<0 || forceUpdate)
|
if(mWidth<0)
|
||||||
updateWidth();
|
updateWidth();
|
||||||
return mWidth;
|
return mWidth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,17 +68,13 @@ private:
|
||||||
*
|
*
|
||||||
* @return the glyphs count
|
* @return the glyphs count
|
||||||
*/
|
*/
|
||||||
int glyphsCount() const {
|
int glyphsCount() const { return mGlyphStartCharList.length(); }
|
||||||
return mGlyphStartCharList.length();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get list of start index of the glyphs in the line text
|
* @brief get list of start index of the glyphs in the line text
|
||||||
* @return start indice of the glyph.
|
* @return start indice of the glyph.
|
||||||
*/
|
*/
|
||||||
const QList<int>& glyphStartCharList() const {
|
const QList<int>& glyphStartCharList() const { return mGlyphStartCharList; }
|
||||||
return mGlyphStartCharList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get list of start position of the glyphs in the line text
|
* @brief get list of start position of the glyphs in the line text
|
||||||
|
@ -131,7 +127,7 @@ private:
|
||||||
* @brief get the width (pixel) of the line text
|
* @brief get the width (pixel) of the line text
|
||||||
* @return the width (in width)
|
* @return the width (in width)
|
||||||
*/
|
*/
|
||||||
int width(bool forceUpdate=false);
|
int width();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the state of the syntax highlighter after this line is parsed
|
* @brief get the state of the syntax highlighter after this line is parsed
|
||||||
|
|
Loading…
Reference in New Issue