1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-13 10:32:11 +01:00

Merge pull request #1628 from javierllorente/sendlink

Fix sendLink() on main menu. Closes #1625
This commit is contained in:
David Rosca 2015-03-19 23:26:12 +01:00
commit f1a6499b07

View File

@ -38,6 +38,7 @@
#include <QStatusBar> #include <QStatusBar>
#include <QWebEnginePage> #include <QWebEnginePage>
#include <QMenuBar> #include <QMenuBar>
#include <QDesktopServices>
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
extern void qt_mac_set_dock_menu(QMenu* menu); extern void qt_mac_set_dock_menu(QMenu* menu);
@ -175,9 +176,8 @@ void MainMenu::savePageScreen()
void MainMenu::sendLink() void MainMenu::sendLink()
{ {
if (m_window) { const QUrl mailUrl = QUrl::fromEncoded("mailto:%20?body=" + QUrl::toPercentEncoding(m_window->weView()->url().toEncoded()) + "&subject=" + QUrl::toPercentEncoding(m_window->weView()->title()));
m_window->weView()->savePageAs(); QDesktopServices::openUrl(mailUrl);
}
} }
void MainMenu::printPage() void MainMenu::printPage()