Opened 2 years ago

Closed 2 years ago

#65827 closed defect (fixed)

qt55-qtmultimedia @5.5.1_1, qt56-qtmultimedia @5.6.3_0: error: cannot initialize a variable of type 'CALayer *' with an rvalue of type 'NSInteger' (aka 'long')

Reported by: chrstphrchvz (Christopher Chavez) Owned by: chrstphrchvz (Christopher Chavez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: qt55-qtmultimedia qt56-qtmultimedia

Description

I attempted to fix this issue in [73de07729d5e/macports-ports], but the patch for avfvideowindowcontrol.mm does not work for Qt 5.5 and 5.6 since QT_HAS_INCLUDE() is only defined by qtbase in 5.7 and later (see qcompilerdetection.h):

avfvideowindowcontrol.mm:38:5: error: function-like macro 'QT_HAS_INCLUDE' is not defined
#if QT_HAS_INCLUDE(<AppKit/AppKit.h>)
    ^
avfvideowindowcontrol.mm:42:5: error: function-like macro 'QT_HAS_INCLUDE' is not defined
#if QT_HAS_INCLUDE(<UIKit/UIKit.h>)
    ^
…
avfvideowindowcontrol.mm:205:14: error: cannot initialize a variable of type 'CALayer *' with an rvalue of type 'NSInteger' (aka 'long')
    CALayer *nativeLayer = [m_nativeView layer];
             ^             ~~~~~~~~~~~~~~~~~~~~

Another patch is needed for the same issue in avfvideowidget.mm in Qt 5.5:

avfvideowidget.mm:106:14: error: cannot initialize a variable of type 'CALayer *' with an rvalue of type 'NSInteger' (aka 'long')
    CALayer *nativeLayer = [m_nativeView layer];
             ^             ~~~~~~~~~~~~~~~~~~~~

It is likely that I can investigate and propose a fix for this soon.

Change History (1)

comment:1 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Owner: set to chrstphrchvz
Resolution: fixed
Status: newclosed

In 88c154297ed1d2d7adea5685a393c9488e5851c8/macports-ports (master):

qt(55|56)-qtmultimedia: fix macOS 11 build again

Avoid macros not available in older Qt versions
Fixes: #65827

Apply to qt53-qtmultimedia for consistency

[skip ci]

Note: See TracTickets for help on using tickets.