Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
4.7.3
-
None
-
Debian GNU/Linux wheezy
Description
Qt embedded was builded with the "-no-feature-clipboard" option.
Here's the code:
qtextcontrol.cpp:
#ifndef QT_NO_CONTEXTMENU QMenu *QTextControl::createStandardContextMenu(const QPointF &pos, QWidget *parent) { Q_D(QTextControl); const bool showTextSelectionActions = d->interactionFlags & (Qt::TextEditable | Qt::TextSelectableByKeyboard | Qt::TextSelectableByMouse); d->linkToCopy = QString(); if (!pos.isNull()) d->linkToCopy = anchorAt(pos); if (d->linkToCopy.isEmpty() && !showTextSelectionActions) return 0; QMenu *menu = new QMenu(parent); QAction *a; if (d->interactionFlags & Qt::TextEditable) { a = menu->addAction(tr("&Undo") + ACCEL_KEY(QKeySequence::Undo), this, SLOT(undo())); a->setEnabled(d->doc->isUndoAvailable()); a = menu->addAction(tr("&Redo") + ACCEL_KEY(QKeySequence::Redo), this, SLOT(redo())); a->setEnabled(d->doc->isRedoAvailable()); menu->addSeparator(); a = menu->addAction(tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut), this, SLOT(cut())); a->setEnabled(d->cursor.hasSelection()); } if (showTextSelectionActions) { 2043> a = menu->addAction(tr("&Copy") + ACCEL_KEY(QKeySequence::Copy), this, SLOT(copy())); a->setEnabled(d->cursor.hasSelection()); }
and qtextcontrol_p.h
public Q_SLOTS: void setPlainText(const QString &text); void setHtml(const QString &text); #ifndef QT_NO_CLIPBOARD void cut(); void copy(); void paste(QClipboard::Mode mode = QClipboard::Clipboard); #endif
In accordance with the qfeatures.txt file, CLIPBOARD option depend only on QWS_PROPERTIES(enabled in my case).
Therefore, it seems, we can simply include conditional compilation for cut(),copy() and paste().