summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-23 08:23:26 (GMT)
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-23 08:23:26 (GMT)
commit5c152d375cabd73eb7757f1ae621f9fb7ba3733c (patch)
tree911a1358cf9a2726ebeadd1ac627952b25276789
parent9f58befa3305a4b7294b6a38e5f010230f224226 (diff)
Specify mime when calling URL opener
-rw-r--r--src/detailinfodlg.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
index 42265f8..076c338 100644
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -158,7 +158,6 @@ void DetailedInfoDlg::fillHTMLTab(KHTMLPart* htmlpart, const QString& htmlcode)
QString DetailedInfoDlg::getHtml(DATATYPE type)
{
-
QString html =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
"<html><head><title>Chemical data</title>"
@@ -575,13 +574,12 @@ QString DetailedInfoDlg::createWikiLink(QString link, QString displayString)
void DetailedInfoDlg::slotLinkClicked(const QUrl &url)
{
- if (!url.isEmpty() && url.isValid()) {
- KRun *krun = new KRun(url, 0);
- krun->setAutoDelete(true);
+ if (url.isEmpty() || !url.isValid()) {
+ return;
}
+ KRun::runUrl(url, QStringLiteral("text/html"), nullptr);
}
-
void DetailedInfoDlg::slotHelp()
{
//TODO fix this stuff...