Replace use of QtMac::toCGImageRef with QImage::toCGImage
This commit is contained in:
parent
0308a3f9a5
commit
35a0beb8a8
|
@ -24,8 +24,9 @@ THE SOFTWARE.
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <QMacCocoaViewContainer>
|
#include <QMacCocoaViewContainer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QtMacExtras>
|
|
||||||
|
|
||||||
static inline NSString* fromQString(const QString &string)
|
static inline NSString* fromQString(const QString &string)
|
||||||
{
|
{
|
||||||
|
@ -43,7 +44,7 @@ static inline QString toQString(NSString *string)
|
||||||
|
|
||||||
static inline NSImage* fromQPixmap(const QPixmap &pixmap)
|
static inline NSImage* fromQPixmap(const QPixmap &pixmap)
|
||||||
{
|
{
|
||||||
CGImageRef cgImage = QtMac::toCGImageRef(pixmap);
|
CGImageRef cgImage = pixmap.toImage().toCGImage();
|
||||||
return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue