forked from qt-creator/qt-creator
Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -4603,7 +4603,7 @@ void TextEditorWidgetPrivate::paintCursor(const PaintEventData &data, QPainter &
|
||||
|
||||
void TextEditorWidgetPrivate::clearSelectionBackground(PaintEventData &data) const
|
||||
{
|
||||
if (m_inBlockSelectionMode && data.context.selections.count()
|
||||
if (m_inBlockSelectionMode && !data.context.selections.isEmpty()
|
||||
&& data.context.selections.last().cursor == data.textCursor) {
|
||||
data.blockSelectionIndex = data.context.selections.size() - 1;
|
||||
data.context.selections[data.blockSelectionIndex].format.clearBackground();
|
||||
|
||||
Reference in New Issue
Block a user