summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-11-13 11:05:06 +0100
committerEike Ziller <eike.ziller@qt.io>2019-11-15 08:57:43 +0000
commit2c029d870095ebd63ea0203d465e5cd293ea8bcf (patch)
treeb98875a21eb24edad3a89de5626381fe722a0521
parent7af9e0e827473e68560e7f26cdcfa08e031ecf67 (diff)
downloadqt-creator-2c029d870095ebd63ea0203d465e5cd293ea8bcf.tar.gz
Help: Remove hack for fixed Qt issue
The hack was a workaround for QTBUG-51962 which is fixed since Qt 5.7 Change-Id: Iad76d72359f19febecb98b245a950684e6bba16f Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/help/textbrowserhelpviewer.cpp24
-rw-r--r--src/plugins/help/textbrowserhelpviewer.h6
2 files changed, 0 insertions, 30 deletions
diff --git a/src/plugins/help/textbrowserhelpviewer.cpp b/src/plugins/help/textbrowserhelpviewer.cpp
index 67171567bf..b388d24742 100644
--- a/src/plugins/help/textbrowserhelpviewer.cpp
+++ b/src/plugins/help/textbrowserhelpviewer.cpp
@@ -457,27 +457,3 @@ void TextBrowserHelpWidget::resizeEvent(QResizeEvent *e)
QTextBrowser::resizeEvent(e);
scrollToTextPosition(topTextPosition);
}
-
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-void TextBrowserHelpWidget::setSource(const QUrl &name)
-#else
-void TextBrowserHelpWidget::doSetSource(const QUrl &name, QTextDocument::ResourceType type)
-#endif
-{
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- QTextBrowser::setSource(name);
-#else
- QTextBrowser::doSetSource(name, type);
-#endif
-
- QTextCursor cursor(document());
- while (!cursor.atEnd()) {
- QTextBlockFormat fmt = cursor.blockFormat();
- if (fmt.hasProperty(QTextFormat::LineHeightType) && fmt.lineHeightType() == QTextBlockFormat::FixedHeight) {
- fmt.setProperty(QTextFormat::LineHeightType, QTextBlockFormat::MinimumHeight);
- cursor.setBlockFormat(fmt);
- }
- if (!cursor.movePosition(QTextCursor::NextBlock))
- break;
- }
-}
diff --git a/src/plugins/help/textbrowserhelpviewer.h b/src/plugins/help/textbrowserhelpviewer.h
index ff185c4a57..b29517e61e 100644
--- a/src/plugins/help/textbrowserhelpviewer.h
+++ b/src/plugins/help/textbrowserhelpviewer.h
@@ -92,12 +92,6 @@ public:
void scaleUp();
void scaleDown();
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- void setSource(const QUrl &name) override;
-#else
- void doSetSource(const QUrl &url, QTextDocument::ResourceType type) override;
-#endif
-
void withFixedTopPosition(const std::function<void()> &action);
protected: