Fix some compiler warnings from deprecated QFont constructor
QFont should be constructed with a list of font families. Pick-to: 6.2 Change-Id: I61141b25d3f6e25f4fea141acbfa8e164d7af58f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
f0bb95cb63
commit
761f32ae2a
@ -1763,7 +1763,7 @@ void tst_QAccessibility::textEditTest()
|
|||||||
QString text = "<p>hello world.<br/>How are you today?</p><p>I'm fine, thanks</p>";
|
QString text = "<p>hello world.<br/>How are you today?</p><p>I'm fine, thanks</p>";
|
||||||
edit.setHtml(text);
|
edit.setHtml(text);
|
||||||
if (pass == 1) {
|
if (pass == 1) {
|
||||||
QFont font("Helvetica");
|
QFont font(QStringList{"Helvetica"});
|
||||||
font.setPointSizeF(12.5);
|
font.setPointSizeF(12.5);
|
||||||
font.setWordSpacing(1.1);
|
font.setWordSpacing(1.1);
|
||||||
edit.document()->setDefaultFont(font);
|
edit.document()->setDefaultFont(font);
|
||||||
|
@ -97,7 +97,7 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||||||
|
|
||||||
// Draw text
|
// Draw text
|
||||||
if (lod >= 2) {
|
if (lod >= 2) {
|
||||||
QFont font("Times", 10);
|
QFont font(QStringList{"Times"}, 10);
|
||||||
font.setStyleStrategy(QFont::ForceOutline);
|
font.setStyleStrategy(QFont::ForceOutline);
|
||||||
painter->setFont(font);
|
painter->setFont(font);
|
||||||
painter->save();
|
painter->save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user