From 4b586e28356629c8f6a00f1e729e5ae7fb7798b9 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Date: Sun, 24 May 2015 13:17:48 -0300
Subject: [PATCH 6/8] Nuke Qt4

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
---
 qt-ui/groupedlineedit.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp
index 71abe72..ed2428f 100644
--- a/qt-ui/groupedlineedit.cpp
+++ b/qt-ui/groupedlineedit.cpp
@@ -159,7 +159,6 @@ void GroupedLineEdit::keyPressEvent(QKeyEvent *e)
 
 void GroupedLineEdit::paintEvent(QPaintEvent *e)
 {
-#if QT_VERSION >= 0x050000 || !defined __APPLE__
 	// for reasons we don't understand, touching the painter
 	// here (even drawing the fill rect) causes the QPlainTextEdit
 	// paintEvent to not draw the text on Qt4 & MacOS.
@@ -173,11 +172,8 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e)
 	i.toFront();
 	foreach (const Private::Block &block, d->blocks) {
 		qreal start_x = line.cursorToX(block.start, QTextLine::Leading);
-#if QT_VERSION >= 0x050000
 		qreal end_x = line.cursorToX(block.end-1, QTextLine::Trailing);
-#else
-		qreal end_x = line.cursorToX(block.end, QTextLine::Trailing);
-#endif
+
 		QPainterPath path;
 		QRectF rectangle(
 			start_x - 1.0 - double(horizontalScrollBar()->value()),
@@ -196,6 +192,5 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e)
 			painter.setBrush(i.next().darker());
 		painter.drawPath(path);
 	}
-#endif
 	QPlainTextEdit::paintEvent(e);
 }
-- 
2.3.2 (Apple Git-55)

