VirtualBox

Changeset 59106 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 11, 2015 4:36:55 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 45): QPixmap API changes for Mac OS X.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp

    r59105 r59106  
    3030#include <QPixmap>
    3131#include <QContextMenuEvent>
     32#if QT_VERSION >= 0x050000
     33# include <QtMac>
     34#endif /* QT_VERSION >= 0x050000 */
    3235
    3336#include <Carbon/Carbon.h>
     
    326329                                              kCGImageAlphaPremultipliedFirst);
    327330    /* Get the CGImageRef from Qt */
     331#if QT_VERSION < 0x050000
    328332    CGImageRef qtPixmap = pPixmap->toMacCGImageRef();
     333#else /* QT_VERSION >= 0x050000 */
     334    CGImageRef qtPixmap = QtMac::toCGImageRef(*pPixmap);
     335#endif /* QT_VERSION >= 0x050000 */
    329336    /* Draw the image from Qt & convert the context back to a new CGImageRef. */
    330337    CGContextDrawImage(ctx, CGRectMake(0, 0, pPixmap->width(), pPixmap->height()), qtPixmap);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette