summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/webkitwidgets/browser/history.cpp2
-rw-r--r--examples/webkitwidgets/browser/tabwidget.cpp2
-rw-r--r--examples/webkitwidgets/browser/webview.cpp2
3 files changed, 6 insertions, 0 deletions
diff --git a/examples/webkitwidgets/browser/history.cpp b/examples/webkitwidgets/browser/history.cpp
index 7969194..d036d3d 100644
--- a/examples/webkitwidgets/browser/history.cpp
+++ b/examples/webkitwidgets/browser/history.cpp
@@ -711,6 +711,7 @@ void HistoryDialog::open()
void HistoryDialog::copy()
{
+#ifndef QT_NO_CLIPBOARD
QModelIndex index = tree->currentIndex();
if (!index.parent().isValid())
return;
@@ -718,6 +719,7 @@ void HistoryDialog::copy()
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(url);
+#endif
}
HistoryFilterModel::HistoryFilterModel(QAbstractItemModel *sourceModel, QObject *parent)
diff --git a/examples/webkitwidgets/browser/tabwidget.cpp b/examples/webkitwidgets/browser/tabwidget.cpp
index f4ad36d..33ed084 100644
--- a/examples/webkitwidgets/browser/tabwidget.cpp
+++ b/examples/webkitwidgets/browser/tabwidget.cpp
@@ -658,6 +658,7 @@ void TabWidget::contextMenuEvent(QContextMenuEvent *event)
void TabWidget::mouseReleaseEvent(QMouseEvent *event)
{
+#ifndef QT_NO_CLIPBOARD
if (event->button() == Qt::MidButton && !childAt(event->pos())
// Remove the line below when QTabWidget does not have a one pixel frame
&& event->pos().y() < (tabBar()->y() + tabBar()->height())) {
@@ -667,6 +668,7 @@ void TabWidget::mouseReleaseEvent(QMouseEvent *event)
webView->setUrl(url);
}
}
+#endif
}
void TabWidget::loadUrlInCurrentTab(const QUrl &url)
diff --git a/examples/webkitwidgets/browser/webview.cpp b/examples/webkitwidgets/browser/webview.cpp
index 83a4e2d..92c4ee9 100644
--- a/examples/webkitwidgets/browser/webview.cpp
+++ b/examples/webkitwidgets/browser/webview.cpp
@@ -288,12 +288,14 @@ void WebView::mousePressEvent(QMouseEvent *event)
void WebView::mouseReleaseEvent(QMouseEvent *event)
{
QWebView::mouseReleaseEvent(event);
+#ifndef QT_NO_CLIPBOARD
if (!event->isAccepted() && (m_page->m_pressedButtons & Qt::MidButton)) {
QUrl url(QApplication::clipboard()->text(QClipboard::Selection));
if (!url.isEmpty() && url.isValid() && !url.scheme().isEmpty()) {
setUrl(url);
}
}
+#endif
}
void WebView::setStatusBarText(const QString &string)