diff options
author | Martin Smith <msmith@trolltech.com> | 2010-04-14 08:48:19 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-04-14 08:48:19 (GMT) |
commit | 4ca8db7b01793a97489b75d093e289a8ec9c23a0 (patch) | |
tree | af3b666fdf2b6887d7f10c20c1d36f84390606fa | |
parent | 4607210dfef3b51933f03deab1037c98cbb8869c (diff) | |
parent | d3e91e4124b96869b8c4e2c8492b4d4cec913ebc (diff) | |
download | Qt-4ca8db7b01793a97489b75d093e289a8ec9c23a0.zip Qt-4ca8db7b01793a97489b75d093e289a8ec9c23a0.tar.gz Qt-4ca8db7b01793a97489b75d093e289a8ec9c23a0.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 15 | ||||
-rw-r--r-- | src/gui/kernel/qcursor_mac.mm | 10 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qcvdisplaylink.h | 2 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm | 3 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movierenderer.h | 2 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movievideowidget.h | 2 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movieviewoutput.mm | 3 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm | 3 | ||||
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 3 |
9 files changed, 30 insertions, 13 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 9c5380b..dd12f65 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -673,13 +673,14 @@ static int qCocoaViewCount = 0; // Send mouse move and hover events as well: if (!qAppInstance()->activePopupWidget() || qAppInstance()->activePopupWidget() == qwidget->window()) { - if (qwidget->testAttribute(Qt::WA_MouseTracking)) { - NSEvent *mouseEvent = [NSEvent mouseEventWithType:NSMouseMoved - location:windowPoint modifierFlags:[event modifierFlags] timestamp:[event timestamp] - windowNumber:[event windowNumber] context:[event context] eventNumber:[event eventNumber] - clickCount:0 pressure:0]; - qt_mac_handleMouseEvent(self, mouseEvent, QEvent::MouseMove, Qt::NoButton); - } + // This mouse move event should be sendt, even when mouse + // tracking is switched off (to trigger tooltips): + NSEvent *mouseEvent = [NSEvent mouseEventWithType:NSMouseMoved + location:windowPoint modifierFlags:[event modifierFlags] timestamp:[event timestamp] + windowNumber:[event windowNumber] context:[event context] eventNumber:[event eventNumber] + clickCount:0 pressure:0]; + qt_mac_handleMouseEvent(self, mouseEvent, QEvent::MouseMove, Qt::NoButton); + if (qwidget->testAttribute(Qt::WA_Hover)) { QHoverEvent he(QEvent::HoverEnter, QPoint(viewPoint.x, viewPoint.y), QPoint(-1, -1)); QApplicationPrivate::instance()->notify_helper(qwidget, &he); diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index 03e38b0..c3d6c54 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -224,6 +224,15 @@ QPoint QCursor::pos() void QCursor::setPos(int x, int y) { +#ifdef QT_MAC_USE_COCOA + CGPoint pos; + pos.x = x; + pos.y = y; + + CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0); + CGEventPost(kCGHIDEventTap, e); + CFRelease(e); +#else CGWarpMouseCursorPosition(CGPointMake(x, y)); /* I'm not too keen on doing this, but this makes it a lot easier, so I just @@ -240,6 +249,7 @@ void QCursor::setPos(int x, int y) QApplication::mouseButtons(), QApplication::keyboardModifiers()); qt_sendSpontaneousEvent(widget, &me); } +#endif } void QCursorData::initCursorFromBitmap() diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.h b/src/plugins/mediaservices/qt7/qcvdisplaylink.h index 5cd8f73..5a1180d 100644 --- a/src/plugins/mediaservices/qt7/qcvdisplaylink.h +++ b/src/plugins/mediaservices/qt7/qcvdisplaylink.h @@ -45,7 +45,7 @@ #include <QtCore/qobject.h> #include <QtCore/qmutex.h> -#include <CoreVideo/CVDisplayLink.h> +#include <QuartzCore/CVDisplayLink.h> QT_BEGIN_HEADER diff --git a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm b/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm index 3778b58..7c02f9f 100644 --- a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm +++ b/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm @@ -41,6 +41,9 @@ #include "qt7ciimagevideobuffer.h" +#include <QuartzCore/CIFilter.h> +#include <QuartzCore/CIVector.h> + QT7CIImageVideoBuffer::QT7CIImageVideoBuffer(CIImage *image) : QAbstractVideoBuffer(CoreImageHandle) , m_image(image) diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.h b/src/plugins/mediaservices/qt7/qt7movierenderer.h index c2dd177..5953b54 100644 --- a/src/plugins/mediaservices/qt7/qt7movierenderer.h +++ b/src/plugins/mediaservices/qt7/qt7movierenderer.h @@ -53,7 +53,7 @@ #include <QtGui/qmacdefines_mac.h> #include "qt7videooutputcontrol.h" -#include <CoreVideo/CVOpenGLTexture.h> +#include <QuartzCore/CVOpenGLTexture.h> #include <QuickTime/QuickTime.h> diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h index 831a18d..3ff14f5 100644 --- a/src/plugins/mediaservices/qt7/qt7movievideowidget.h +++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.h @@ -51,7 +51,7 @@ #include <QtGui/qmacdefines_mac.h> #include "qt7videooutputcontrol.h" -#include <CoreVideo/CVOpenGLTexture.h> +#include <QuartzCore/CVOpenGLTexture.h> #include <QuickTime/QuickTime.h> diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm index 20f1a02..06299a3 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm @@ -48,6 +48,9 @@ #include "qt7playersession.h" #include <QtCore/qdebug.h> +#include <QuartzCore/CIFilter.h> +#include <QuartzCore/CIVector.h> + #define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];} diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm index 33a6970..5af9809 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm @@ -55,6 +55,9 @@ #include <QtMultimedia/qabstractvideosurface.h> #include <QtMultimedia/qvideosurfaceformat.h> +#include <QuartzCore/CIFilter.h> +#include <QuartzCore/CIVector.h> + QT_BEGIN_NAMESPACE diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 1b2944e..76e20b9 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -6056,9 +6056,6 @@ void tst_QWidget::setToolTip() #ifdef Q_OS_WINCE_WM QSKIP("Mouse over doesn't work on Windows mobile.", SkipAll); #endif -#ifdef QT_MAC_USE_COCOA - QSKIP("Temporarily disable the rest on cocoa due to QCursor::setPos problems.", SkipAll); -#endif for (int pass = 0; pass < 2; ++pass) { QWidget *popup = new QWidget(0, Qt::Popup); |