From 3eded761167af317bab4f4d8c1ac0a12433eb03a Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 28 Apr 2010 03:50:42 +0200 Subject: A small mistake when comparing the flag. Qt::NoTextInteraction is equal to 0 so you can't compare using & because it will always be false even if the flag is set. Reviewed-by:janarve --- src/gui/text/qtextcontrol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 3c596e5..a2ee659 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -885,8 +885,10 @@ void QTextControl::processEvent(QEvent *e, const QPointF &coordinateOffset, QWid void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget) { Q_D(QTextControl); - if (d->interactionFlags & Qt::NoTextInteraction) + if (d->interactionFlags == Qt::NoTextInteraction) { + e->ignore(); return; + } d->contextWidget = contextWidget; -- cgit v0.12