summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-04-18 20:11:39 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-04-19 08:34:15 +0000
commitc367b08df4778bf2b83eb37f0caa79e97fbc01b4 (patch)
tree6d4219d5bd483fcea187326be3c94c98753cc705 /src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp
parent12e45e9e4052a18d70048624e2303ecdcf24f22e (diff)
downloadqtlocation-c367b08df4778bf2b83eb37f0caa79e97fbc01b4.tar.gz
Fix build for -no-feature-texthtmlparser
Change-Id: I9ab2c7b494aff0059f871a2bedee414559272a73 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp b/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp
index fdfb645a..b1393105 100644
--- a/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp
@@ -169,7 +169,11 @@ void QDeclarativeGeoMapCopyrightNotice::setStyleSheet(const QString &styleSheet)
if (!m_html.isEmpty() && m_copyrightsHtml) {
delete m_copyrightsHtml;
createCopyright();
+#if QT_CONFIG(texthtmlparser)
m_copyrightsHtml->setHtml(m_html);
+#else
+ m_copyrightsHtml->setPlainText(m_html);
+#endif
}
rasterizeHtmlAndUpdate();
emit styleSheetChanged(m_styleSheet);
@@ -289,12 +293,20 @@ void QDeclarativeGeoMapCopyrightNotice::copyrightsChanged(const QString &copyrig
// Divfy, so we can style the background. The extra <span> is a
// workaround to QTBUG-58838 and should be removed when it gets fixed.
+#if QT_CONFIG(texthtmlparser)
m_html = QStringLiteral("<div id='copyright-root'><span>") + copyrightsHtml + QStringLiteral("</span></div>");
+#else
+ m_html = copyrightsHtml;
+#endif
if (!m_copyrightsHtml)
createCopyright();
+#if QT_CONFIG(texthtmlparser)
m_copyrightsHtml->setHtml(m_html);
+#else
+ m_copyrightsHtml->setPlainText(m_html);
+#endif
rasterizeHtmlAndUpdate();
}
@@ -307,7 +319,11 @@ void QDeclarativeGeoMapCopyrightNotice::onCopyrightsStyleSheetChanged(const QStr
if (!m_html.isEmpty() && m_copyrightsHtml) {
delete m_copyrightsHtml;
createCopyright();
+#if QT_CONFIG(texthtmlparser)
m_copyrightsHtml->setHtml(m_html);
+#else
+ m_copyrightsHtml->setPlainText(m_html);
+#endif
}
rasterizeHtmlAndUpdate();
emit styleSheetChanged(m_styleSheet);