aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/resourcepreviewhoverhandler.cpp')
-rw-r--r--src/plugins/cppeditor/resourcepreviewhoverhandler.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp b/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
index 0937df32ab6..6c282b879cc 100644
--- a/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
+++ b/src/plugins/cppeditor/resourcepreviewhoverhandler.cpp
@@ -166,7 +166,7 @@ void ResourcePreviewHoverHandler::operateTooltip(TextEditorWidget *editorWidget,
{
const QString tt = makeTooltip();
if (!tt.isEmpty())
- Utils::ToolTip::show(point, tt, editorWidget);
+ Utils::ToolTip::show(point, tt, Qt::MarkdownText, editorWidget);
else
Utils::ToolTip::hide();
}
@@ -180,10 +180,8 @@ QString ResourcePreviewHoverHandler::makeTooltip() const
const Utils::MimeType mimeType = Utils::mimeTypeForFile(m_resPath);
if (mimeType.name().startsWith("image", Qt::CaseInsensitive))
- ret += QString("<img src=\"file:///%1\" /><br/>").arg(m_resPath);
-
- ret += QString("<a href=\"file:///%1\">%2</a>")
- .arg(m_resPath, QDir::toNativeSeparators(m_resPath));
+ ret += QString("![image](%1) \n").arg(m_resPath);
+ ret += QString("[%1](%2)").arg(QDir::toNativeSeparators(m_resPath), m_resPath);
return ret;
}