summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextmarkdownimporter.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-02 11:55:36 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-02 15:24:09 +0000
commit0d39cf6865301c96b69cfdc0df587f5962252e8e (patch)
tree4ca7368a6a38b3ac65a049d703d35d2d286e6d62 /src/gui/text/qtextmarkdownimporter.cpp
parent884dc0be7f85e08d2f25d48d728db69b9557ce04 (diff)
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>
Diffstat (limited to 'src/gui/text/qtextmarkdownimporter.cpp')
-rw-r--r--src/gui/text/qtextmarkdownimporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextmarkdownimporter.cpp b/src/gui/text/qtextmarkdownimporter.cpp
index 2477e0bc74..bcb0b777d4 100644
--- a/src/gui/text/qtextmarkdownimporter.cpp
+++ b/src/gui/text/qtextmarkdownimporter.cpp
@@ -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;