mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 20:36:44 +01:00
Merge pull request #6508 from jonaski/qocoa
Replace use of QtMac::toCGImageRef with QImage::toCGImage
This commit is contained in:
commit
63cd5d4918
5
3rdparty/qocoa/qocoa_mac.h
vendored
5
3rdparty/qocoa/qocoa_mac.h
vendored
@ -22,10 +22,11 @@ THE SOFTWARE.
|
||||
|
||||
#include <AppKit/NSImage.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <QImage>
|
||||
#include <QMacCocoaViewContainer>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
#include <QtMacExtras>
|
||||
|
||||
static inline NSString* fromQString(const QString &string)
|
||||
{
|
||||
@ -43,7 +44,7 @@ static inline QString toQString(NSString *string)
|
||||
|
||||
static inline NSImage* fromQPixmap(const QPixmap &pixmap)
|
||||
{
|
||||
CGImageRef cgImage = QtMac::toCGImageRef(pixmap);
|
||||
CGImageRef cgImage = pixmap.toImage().toCGImage();
|
||||
return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user