aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-05-24 13:17:48 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-24 09:37:23 -0700
commitdbed94f12c514c885bc0ecb0751bb424c067683c (patch)
tree737ff74afa3f045d2720f3ff90396540eb8661ea
parent4eeecf73156c5d15058b4570dcbe905494604e5e (diff)
downloadsubsurface-dbed94f12c514c885bc0ecb0751bb424c067683c.tar.gz
Remove support for Qt4 (part 6)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/groupedlineedit.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp
index 71abe72a0..ed2428fd7 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);
}