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 65314b6ce8.
Task-number: QTBUG-72349
Change-Id: I7f909d1fcc5c4045c738b5a5c491b2ac1de6eac5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
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 title = QString::fromLatin1(detail->title.text, detail->title.size);
|
||||
charFmt.setAnchorHref(url);
|
||||
charFmt.setAnchorName(title);
|
||||
charFmt.setAnchorNames(QStringList(title));
|
||||
charFmt.setForeground(m_palette.link());
|
||||
qCDebug(lcMD) << "anchor" << url << title;
|
||||
} break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue