From 71b78e1085a0833216dabdc88372604fdd3621ba Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 12 Jul 2017 13:40:13 +0200 Subject: [PATCH] Help: Remove workaround for fixed Qt bug QTBUG-26593 is fixed since Qt 5.3.2. The bug lead to e.g. the mouse cursor not changing it's shape when hovering over links. Change-Id: Ib8d2188cbbe87592217f4159286f38bc1c6f2b28 Reviewed-by: Christian Stenger --- src/plugins/help/macwebkithelpviewer.mm | 38 +------------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/src/plugins/help/macwebkithelpviewer.mm b/src/plugins/help/macwebkithelpviewer.mm index b3c0c5f9085..49744104e40 100644 --- a/src/plugins/help/macwebkithelpviewer.mm +++ b/src/plugins/help/macwebkithelpviewer.mm @@ -393,42 +393,6 @@ static NSMenuItem *menuItem(NSURL *url, id target, SEL action, const QString &ti @end -// #pragma mark -- MyWebView -@interface MyWebView : WebView -@end - -// work around Qt + WebView issue QTBUG-26593, that Qt does not pass mouseMoved: events up the event chain, -// but the Web(HTML)View is only handling mouse moved for hovering etc if the event was passed up -// to the NSWindow (arguably a bug in Web(HTML)View) -@implementation MyWebView - -- (void)updateTrackingAreas -{ - [super updateTrackingAreas]; - if (NSArray *trackingArray = [self trackingAreas]) { - NSUInteger size = [trackingArray count]; - for (NSUInteger i = 0; i < size; ++i) { - NSTrackingArea *t = [trackingArray objectAtIndex:i]; - [self removeTrackingArea:t]; - } - } - NSUInteger trackingOptions = NSTrackingActiveInActiveApp | NSTrackingInVisibleRect - | NSTrackingMouseMoved; - NSTrackingArea *ta = [[[NSTrackingArea alloc] initWithRect:[self frame] - options:trackingOptions - owner:self - userInfo:nil] - autorelease]; - [self addTrackingArea:ta]; -} - -- (void)mouseMoved:(NSEvent *)theEvent -{ - [self.window mouseMoved:theEvent]; -} - -@end - namespace Help { namespace Internal { @@ -469,7 +433,7 @@ MacWebKitHelpWidget::MacWebKitHelpWidget(MacWebKitHelpViewer *parent) d->m_toolTipTimer.setSingleShot(true); connect(&d->m_toolTipTimer, &QTimer::timeout, this, &MacWebKitHelpWidget::showToolTip); @autoreleasepool { - d->m_webView = [[MyWebView alloc] init]; + d->m_webView = [[WebView alloc] init]; // Turn layered rendering on. // Otherwise the WebView will render empty after any QQuickWidget was shown. d->m_webView.wantsLayer = YES;