diff options
Diffstat (limited to 'src/declarative/items/qsgtext.cpp')
-rw-r--r-- | src/declarative/items/qsgtext.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/declarative/items/qsgtext.cpp b/src/declarative/items/qsgtext.cpp index 6b725610e6..f936c3f32b 100644 --- a/src/declarative/items/qsgtext.cpp +++ b/src/declarative/items/qsgtext.cpp @@ -50,13 +50,13 @@ #include <private/qsgtexture_p.h> #include <QtDeclarative/qdeclarativeinfo.h> -#include <QtGui/qgraphicssceneevent.h> +#include <QtGui/qevent.h> #include <QtGui/qabstracttextdocumentlayout.h> #include <QtGui/qpainter.h> #include <QtGui/qtextdocument.h> #include <QtGui/qtextobject.h> #include <QtGui/qtextcursor.h> -#include <QtGui/qapplication.h> +#include <QtGui/qguiapplication.h> #include <private/qdeclarativestyledtext_p.h> #include <private/qdeclarativepixmapcache_p.h> @@ -1166,7 +1166,7 @@ bool QSGTextPrivate::determineHorizontalAlignment() { Q_Q(QSGText); if (hAlignImplicit && q->isComponentComplete()) { - bool alignToRight = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : rightToLeftText; + bool alignToRight = text.isEmpty() ? QGuiApplication::keyboardInputDirection() == Qt::RightToLeft : rightToLeftText; return setHAlign(alignToRight ? QSGText::AlignRight : QSGText::AlignLeft); } return false; @@ -1684,15 +1684,15 @@ void QSGText::componentComplete() } /*! \internal */ -void QSGText::mousePressEvent(QGraphicsSceneMouseEvent *event) +void QSGText::mousePressEvent(QMouseEvent *event) { Q_D(QSGText); - if (!d->richText || !d->doc || d->doc->documentLayout()->anchorAt(event->pos()).isEmpty()) { + if (!d->richText || !d->doc || d->doc->documentLayout()->anchorAt(event->localPos()).isEmpty()) { event->setAccepted(false); d->activeLink.clear(); } else { - d->activeLink = d->doc->documentLayout()->anchorAt(event->pos()); + d->activeLink = d->doc->documentLayout()->anchorAt(event->localPos()); } // ### may malfunction if two of the same links are clicked & dragged onto each other) @@ -1703,12 +1703,12 @@ void QSGText::mousePressEvent(QGraphicsSceneMouseEvent *event) } /*! \internal */ -void QSGText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +void QSGText::mouseReleaseEvent(QMouseEvent *event) { Q_D(QSGText); // ### confirm the link, and send a signal out - if (d->richText && d->doc && d->activeLink == d->doc->documentLayout()->anchorAt(event->pos())) + if (d->richText && d->doc && d->activeLink == d->doc->documentLayout()->anchorAt(event->localPos())) emit linkActivated(d->activeLink); else event->setAccepted(false); |