From fc081c31741e1011d659fd758bbd7ab3a90ee123 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Fri, 20 Apr 2012 10:06:45 +0200 Subject: Fix assistant build with QT_NO_CLIPBOARD Change-Id: I2c31525cba5b613ad13368fe11869789e003cbd1 Reviewed-by: Stephen Kelly --- src/assistant/assistant/helpviewer_qtb.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/assistant/assistant/helpviewer_qtb.cpp') diff --git a/src/assistant/assistant/helpviewer_qtb.cpp b/src/assistant/assistant/helpviewer_qtb.cpp index a42f4781b..620debed1 100644 --- a/src/assistant/assistant/helpviewer_qtb.cpp +++ b/src/assistant/assistant/helpviewer_qtb.cpp @@ -51,7 +51,9 @@ #include #include +#ifndef QT_NO_CLIPBOARD #include +#endif #include QT_BEGIN_NAMESPACE @@ -248,11 +250,13 @@ bool HelpViewer::findText(const QString &text, FindFlags flags, bool incremental // -- public slots +#ifndef QT_NO_CLIPBOARD void HelpViewer::copy() { TRACE_OBJ QTextBrowser::copy(); } +#endif void HelpViewer::forward() { @@ -356,13 +360,17 @@ void HelpViewer::contextMenuEvent(QContextMenuEvent *event) if (!link.isEmpty() && link.isValid()) copyAnchorAction = menu.addAction(tr("Copy &Link Location")); } else if (!selectedText().isEmpty()) { +#ifndef QT_NO_CLIPBOARD menu.addAction(tr("Copy"), this, SLOT(copy())); +#endif } else { menu.addAction(tr("Reload"), this, SLOT(reload())); } +#ifndef QT_NO_CLIPBOARD if (copyAnchorAction == menu.exec(event->globalPos())) QApplication::clipboard()->setText(link.toString()); +#endif } QVariant HelpViewer::loadResource(int type, const QUrl &name) -- cgit v1.2.3