mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:23:23 +00:00
Remove support for Qt4 (part 6)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4eeecf7315
commit
dbed94f12c
1 changed files with 1 additions and 6 deletions
|
@ -159,7 +159,6 @@ void GroupedLineEdit::keyPressEvent(QKeyEvent *e)
|
||||||
|
|
||||||
void GroupedLineEdit::paintEvent(QPaintEvent *e)
|
void GroupedLineEdit::paintEvent(QPaintEvent *e)
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x050000 || !defined __APPLE__
|
|
||||||
// for reasons we don't understand, touching the painter
|
// for reasons we don't understand, touching the painter
|
||||||
// here (even drawing the fill rect) causes the QPlainTextEdit
|
// here (even drawing the fill rect) causes the QPlainTextEdit
|
||||||
// paintEvent to not draw the text on Qt4 & MacOS.
|
// paintEvent to not draw the text on Qt4 & MacOS.
|
||||||
|
@ -173,11 +172,8 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e)
|
||||||
i.toFront();
|
i.toFront();
|
||||||
foreach (const Private::Block &block, d->blocks) {
|
foreach (const Private::Block &block, d->blocks) {
|
||||||
qreal start_x = line.cursorToX(block.start, QTextLine::Leading);
|
qreal start_x = line.cursorToX(block.start, QTextLine::Leading);
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
qreal end_x = line.cursorToX(block.end-1, QTextLine::Trailing);
|
qreal end_x = line.cursorToX(block.end-1, QTextLine::Trailing);
|
||||||
#else
|
|
||||||
qreal end_x = line.cursorToX(block.end, QTextLine::Trailing);
|
|
||||||
#endif
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
QRectF rectangle(
|
QRectF rectangle(
|
||||||
start_x - 1.0 - double(horizontalScrollBar()->value()),
|
start_x - 1.0 - double(horizontalScrollBar()->value()),
|
||||||
|
@ -196,6 +192,5 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e)
|
||||||
painter.setBrush(i.next().darker());
|
painter.setBrush(i.next().darker());
|
||||||
painter.drawPath(path);
|
painter.drawPath(path);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
QPlainTextEdit::paintEvent(e);
|
QPlainTextEdit::paintEvent(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue