aboutsummaryrefslogtreecommitdiff
path: root/src/renderers/geminirenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderers/geminirenderer.cpp')
-rw-r--r--src/renderers/geminirenderer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/renderers/geminirenderer.cpp b/src/renderers/geminirenderer.cpp
index 6bcd3a4..3a49706 100644
--- a/src/renderers/geminirenderer.cpp
+++ b/src/renderers/geminirenderer.cpp
@@ -36,7 +36,7 @@ std::unique_ptr<GeminiDocument> GeminiRenderer::render(
QUrl const &root_url,
DocumentStyle const & themed_style,
DocumentOutlineModel &outline,
- QString* const page_title)
+ QString & page_title)
{
TextStyleInstance text_style { themed_style };
@@ -72,8 +72,7 @@ std::unique_ptr<GeminiDocument> GeminiRenderer::render(
// Set the last line of the preformatted block to have
// standard line height.
QTextBlockFormat fmt = text_style.preformatted_format;
- fmt.setLineHeight(themed_style.line_height_p,
- QTextBlockFormat::LineDistanceHeight);
+ fmt.setLineHeight(themed_style.line_height_p, QTextBlockFormat::LineDistanceHeight);
cursor.movePosition(QTextCursor::PreviousBlock);
cursor.setBlockFormat(fmt);
@@ -190,9 +189,9 @@ std::unique_ptr<GeminiDocument> GeminiRenderer::render(
outline.appendH1(heading, id);
// Use first heading as the page's title.
- if (page_title != nullptr && page_title->isEmpty())
+ if (page_title.isEmpty())
{
- *page_title = heading;
+ page_title = heading;
}
// Centre the first heading. We can't use the above code block