Opened 9 years ago

Closed 9 years ago

#48516 closed defect (fixed)

qt5-mac, qt4-mac build error in qcocoacursor.mm

Reported by: eirnym (Eir Nym) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: haspatch elcapitan Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), kaveh@…, maehne (Torsten Maehne)
Port: qt4-mac qt5-mac

Description

QT5 has internal bug with qcocoacursor.mm. This fixed build with OS X 10.11 and incorrect usage for this function on previous Mac OS X releases.

This is documented in upstream: https://bugreports.qt.io/browse/QTBUG-47641

This applicable for QT4, QT5 (5.4.2 and 5.5.0), OSX 10.4+

Attachments (1)

patch-qcocoacursor.mm.diff (645 bytes) - added by eirnym (Eir Nym) 9 years ago.
patch for qcocoacursor.mm

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Cc: mcalhoun@… removed
Owner: changed from macports-tickets@… to mcalhoun@…

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Cc: mcalhoun@… added
Owner: changed from mcalhoun@… to michaelld@…
Port: qt4-mac added

Changed 9 years ago by eirnym (Eir Nym)

Attachment: patch-qcocoacursor.mm.diff added

patch for qcocoacursor.mm

comment:3 in reply to:  description Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Replying to eirnym@…:

This is documented in upstream: https://bugreports.qt.io/browse/QTBUG-47641

Yes but that is also a bug you filed, and there isn't consensus there yet that this is the correct solution.

comment:4 Changed 9 years ago by eirnym (Eir Nym)

I'll post this bug to gerrit for qt5 branch tree, so I don't know if it will be included in qt4 and even qt 5.4.x which is default for macports now.

If you review this patch, I has changed int/long to enum constants (yes, it's enum since 10.11) and this is all patch about.

Version 0, edited 9 years ago by eirnym (Eir Nym) (next)

comment:5 Changed 9 years ago by eirnym (Eir Nym)

This is already fixed very same way in future QT5.5 version, so you can take official patch from repository or take mine.

http://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/cocoa/qcocoacursor.mm?id=02ea0235216beef390e9868ff770c7a54d70db83

comment:6 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: kaveh@… added
Keywords: elcapitan added

Has duplicate #48898.

comment:7 Changed 9 years ago by maehne (Torsten Maehne)

Cc: Torsten.Maehne@… added

Cc Me!

comment:8 Changed 9 years ago by michaelld (Michael Dickens)

I like this fix. According to Apple https://developer.apple.com/library/prerelease/mac/documentation/Carbon/Reference/QuartzEventServicesRef/#//apple_ref/c/func/CGEventCreateMouseEvent , CGEventCreateMouseEvent can return NULL in which case the event should not be used or released. Checking to make sure the event is valid seems reasonable.

comment:9 Changed 9 years ago by michaelld (Michael Dickens)

Done in qt4-mac in r141285.

comment:10 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

The upstream fix for Q5 has now released (r142505)

Note: See TracTickets for help on using tickets.