QTextMarkdownImporter: Fix deprecation warning
Use QTextCharFormat::setAnchorNames(), fixing: text/qtextmarkdownimporter.cpp:322:36: warning: 'void QTextCharFormat::setAnchorName(const QString&)' is deprecated: Use setAnchorNames() instead [-Wdeprecated-declarations] Amends 65314b6ce88cdbb28a22be0cab9856ec9bc9604b. Task-number: QTBUG-72349 Change-Id: I7f909d1fcc5c4045c738b5a5c491b2ac1de6eac5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
884dc0be7f
commit
0d39cf6865
@ -319,7 +319,7 @@ int QTextMarkdownImporter::cbEnterSpan(MD_SPANTYPE type, void *det)
|
|||||||
QString url = QString::fromLatin1(detail->href.text, detail->href.size);
|
QString url = QString::fromLatin1(detail->href.text, detail->href.size);
|
||||||
QString title = QString::fromLatin1(detail->title.text, detail->title.size);
|
QString title = QString::fromLatin1(detail->title.text, detail->title.size);
|
||||||
charFmt.setAnchorHref(url);
|
charFmt.setAnchorHref(url);
|
||||||
charFmt.setAnchorName(title);
|
charFmt.setAnchorNames(QStringList(title));
|
||||||
charFmt.setForeground(m_palette.link());
|
charFmt.setForeground(m_palette.link());
|
||||||
qCDebug(lcMD) << "anchor" << url << title;
|
qCDebug(lcMD) << "anchor" << url << title;
|
||||||
} break;
|
} break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user