PIM Text Edit: Fix compile with Qt 5.13 and QT_DISABLE_DEPRECATED_BEFORE=0x060000
ClosedPublic

Authored by marten on Feb 26 2019, 3:02 PM.

Details

Summary

In this Qt version, obsolete functions and variables are now actually hidden in the header files if that compile definition is used.

QLayout::setMargin() -> setContentsMargins()
QPalette::Background -> QPalette::Window
QPainter::drawRoundRect() -> drawRoundedRect()

Test Plan

Builds and runs correctly with Qt version 5.13.0.

Diff Detail

Repository
R86 PIM: Text Editor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten created this revision.Feb 26 2019, 3:02 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptFeb 26 2019, 3:02 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
marten requested review of this revision.Feb 26 2019, 3:02 PM
dvratil accepted this revision.Feb 26 2019, 4:48 PM
This revision is now accepted and ready to land.Feb 26 2019, 4:48 PM
mlaurent requested changes to this revision.Feb 27 2019, 7:08 AM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
src/texteditor/commonwidget/textmessageindicator.cpp
189

it's wrong see:
void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd)
{

drawRoundedRect(r, xRnd, yRnd, Qt::RelativeSize);

}

but

void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius,
                     Qt::SizeMode mode = Qt::AbsoluteSize);

you use 2 differents sizemode

This revision now requires changes to proceed.Feb 27 2019, 7:08 AM
marten updated this revision to Diff 52704.Feb 27 2019, 9:19 AM

Thanks for spotting this, diff updated to use Qt::RelativeSize

marten marked an inline comment as done.Feb 27 2019, 9:19 AM
mlaurent accepted this revision.Feb 27 2019, 12:19 PM
This revision is now accepted and ready to land.Feb 27 2019, 12:19 PM
This revision was automatically updated to reflect the committed changes.