Commit 518e7871 authored by Milian Wolff's avatar Milian Wolff

Remove dead code: AbstractNavigationContext::fontSize{Prefix,Suffix}

These functions never return any non-null string, so just remove them.
parent 333455ce
......@@ -88,7 +88,7 @@ QString AbstractDeclarationNavigationContext::html(bool shorten)
clear();
AbstractNavigationContext::html(shorten);
modifyHtml() += QLatin1String("<html><body><p>") + fontSizePrefix(shorten);
modifyHtml() += QLatin1String("<html><body><p>");
addExternalHtml(prefix());
......@@ -367,7 +367,7 @@ QString AbstractDeclarationNavigationContext::html(bool shorten)
addExternalHtml(suffix());
modifyHtml() += fontSizeSuffix(shorten) + QLatin1String("</p></body></html>");
modifyHtml() += QLatin1String("</p></body></html>");
return currentHtml();
}
......
......@@ -77,7 +77,7 @@ TopDUContext* pickContextWithData(const QList<TopDUContext*>& duchains, uint max
QString AbstractIncludeNavigationContext::html(bool shorten)
{
clear();
modifyHtml() += QLatin1String("<html><body><p>") + fontSizePrefix(shorten);
modifyHtml() += QLatin1String("<html><body><p>");
addExternalHtml(prefix());
QUrl u = m_item.url();
......@@ -104,7 +104,7 @@ QString AbstractIncludeNavigationContext::html(bool shorten)
addExternalHtml(suffix());
modifyHtml() += fontSizeSuffix(shorten) + QLatin1String("</p></body></html>");
modifyHtml() += QLatin1String("</p></body></html>");
return currentHtml();
}
......
......@@ -545,16 +545,6 @@ QString AbstractNavigationContext::currentHtml() const
return d->m_currentText;
}
QString AbstractNavigationContext::fontSizePrefix(bool /*shorten*/) const
{
return QString();
}
QString AbstractNavigationContext::fontSizeSuffix(bool /*shorten*/) const
{
return QString();
}
QString Colorizer::operator()(const QString& str) const
{
QString ret = QLatin1String("<font color=\"#") + m_color + QLatin1String("\">") + str + QLatin1String("</font>");
......
......@@ -112,11 +112,6 @@ Q_SIGNALS:
void contentsChanged();
protected:
/// Returns the html font-size prefix (aka. &lt;small&gt; or similar) for the given mode
QString fontSizePrefix(bool shorten) const;
/// Returns the html font-size suffix (aka. &lt;small&gt; or similar) for the given mode
QString fontSizeSuffix(bool shorten) const;
AbstractNavigationContext* previousContext() const;
virtual void setPreviousContext(AbstractNavigationContext* previousContext);
......
......@@ -46,7 +46,7 @@ QString UsesNavigationContext::name() const
QString UsesNavigationContext::html(bool shorten)
{
clear();
modifyHtml() += QLatin1String("<html><body><p>") + fontSizePrefix(shorten);
modifyHtml() += QLatin1String("<html><body><p>");
if (auto context = previousContext()) {
modifyHtml() += navigationHighlight(i18n("Uses of "));
......@@ -59,7 +59,7 @@ QString UsesNavigationContext::html(bool shorten)
}
}
modifyHtml() += fontSizeSuffix(shorten) + QLatin1String("</p></body></html>");
modifyHtml() += QLatin1String("</p></body></html>");
return currentHtml();
}
......
......@@ -46,7 +46,7 @@ QString MacroNavigationContext::html(bool shorten)
{
clear();
modifyHtml() += QLatin1String("<html><body><p>") + fontSizePrefix(shorten);
modifyHtml() += QLatin1String("<html><body><p>");
addExternalHtml(prefix());
QStringList parameterList;
......@@ -79,7 +79,7 @@ QString MacroNavigationContext::html(bool shorten)
modifyHtml() += QLatin1String("<tt>") + code.toHtmlEscaped().replace(QLatin1Char('\n'), QStringLiteral("<br/>")) + QLatin1String("</tt>");
modifyHtml() += QStringLiteral("</p>");
modifyHtml() += fontSizeSuffix(shorten) + QLatin1String("</p></body></html>");
modifyHtml() += QLatin1String("</p></body></html>");
return currentHtml();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment