diff options
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index e17306d..4828543 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1198,18 +1198,18 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const Suppose we have a \c Thumbnail class as follows: - \snippet doc/src/snippets/webkit/webpage/main.cpp 0 + \snippet webkitsnippets/webpage/main.cpp 0 The \c Thumbnail's constructor takes in a \a url. We connect our QWebPage object's \l{QWebPage::}{loadFinished()} signal to our private slot, \c render(). - \snippet doc/src/snippets/webkit/webpage/main.cpp 1 + \snippet webkitsnippets/webpage/main.cpp 1 The \c render() function shows how we can paint a thumbnail using a QWebPage object. - \snippet doc/src/snippets/webkit/webpage/main.cpp 2 + \snippet webkitsnippets/webpage/main.cpp 2 We begin by setting the \l{QWebPage::viewportSize()}{viewportSize} and then we instantiate a QImage object, \c image, with the same size as our @@ -1450,9 +1450,16 @@ void QWebPage::triggerAction(WebAction action, bool checked) openNewWindow(url, frame); break; } - case CopyLinkToClipboard: + case CopyLinkToClipboard: { +#if defined(Q_WS_X11) + bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode(); + Pasteboard::generalPasteboard()->setSelectionMode(true); + editor->copyURL(d->hitTestResult.linkUrl(), d->hitTestResult.linkText()); + Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode); +#endif editor->copyURL(d->hitTestResult.linkUrl(), d->hitTestResult.linkText()); break; + } case OpenImageInNewWindow: openNewWindow(d->hitTestResult.imageUrl(), frame); break; |