From c367b08df4778bf2b83eb37f0caa79e97fbc01b4 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 18 Apr 2017 20:11:39 +0200 Subject: Fix build for -no-feature-texthtmlparser Change-Id: I9ab2c7b494aff0059f871a2bedee414559272a73 Reviewed-by: Paul Olav Tvete --- .../qdeclarativegeomapcopyrightsnotice.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp') 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 ©rig // Divfy, so we can style the background. The extra is a // workaround to QTBUG-58838 and should be removed when it gets fixed. +#if QT_CONFIG(texthtmlparser) m_html = QStringLiteral(""); +#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); -- cgit v1.2.1