summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-13 12:28:13 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-13 12:28:13 +0200
commitde679206b0d8954c9c31dd2b1c6ea4b52f42a04b (patch)
treea40b022376ab71f6c2d0a89e37f8275a74ddd7f2 /src
parentFix memory leaks (diff)
downloadrekonq-de679206b0d8954c9c31dd2b1c6ea4b52f42a04b.tar.xz
Fixed mailto link handling
BUG: 203625
Diffstat (limited to 'src')
-rw-r--r--src/webpage.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index c9a9b840..2bc054a4 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -48,7 +48,7 @@
#include <KStandardDirs>
#include <KUrl>
#include <KDebug>
-
+#include <KToolInvocation>
#include <KDE/KParts/BrowserRun>
#include <KDE/KMimeTypeTrader>
@@ -92,7 +92,13 @@ WebPage::~WebPage()
bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
{
m_requestedUrl = request.url();
-
+
+ if (m_requestedUrl.scheme() == QLatin1String("mailto"))
+ {
+ KToolInvocation::invokeMailer(m_requestedUrl);
+ return false;
+ }
+
if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)
{
Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab);