macOS: fix 32-bit builds
Change-Id: I767b8907f91fd45f662b67ba7b9a8378a3e4851e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>bb10
parent
a6b8b03f86
commit
8f06124b70
|
|
@ -132,7 +132,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
|
|||
QPixmap pm = dragPixmap(m_drag, hotSpot);
|
||||
QSize pmDeviceIndependentSize = pm.size() / pm.devicePixelRatio();
|
||||
NSImage *nsimage = qt_mac_create_nsimage(pm);
|
||||
[nsimage setSize:pmDeviceIndependentSize.toCGSize()];
|
||||
[nsimage setSize:NSSizeFromCGSize(pmDeviceIndependentSize.toCGSize())];
|
||||
|
||||
QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacInternalPasteboardMime::MIME_DND);
|
||||
m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ QRect QCocoaWindow::geometry() const
|
|||
NSRect screenRect = [[m_contentView window] convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 1, 1)];
|
||||
NSPoint screenPoint = screenRect.origin;
|
||||
QPoint position = qt_mac_flipPoint(screenPoint).toPoint();
|
||||
QSize size = QRectF::fromCGRect([m_contentView bounds]).toRect().size();
|
||||
QSize size = QRectF::fromCGRect(NSRectToCGRect([m_contentView bounds])).toRect().size();
|
||||
return QRect(position, size);
|
||||
}
|
||||
|
||||
|
|
@ -1117,7 +1117,7 @@ void QCocoaWindow::propagateSizeHints()
|
|||
QSize sizeIncrement = windowSizeIncrement();
|
||||
if (sizeIncrement.isEmpty())
|
||||
sizeIncrement = QSize(1, 1);
|
||||
[m_nsWindow setResizeIncrements:sizeIncrement.toCGSize()];
|
||||
[m_nsWindow setResizeIncrements:NSSizeFromCGSize(sizeIncrement.toCGSize())];
|
||||
|
||||
QRect rect = geometry();
|
||||
QSize baseSize = windowBaseSize();
|
||||
|
|
|
|||
|
|
@ -340,10 +340,10 @@ static bool _q_dontOverrideCtrlLMB = false;
|
|||
geometry = QRect(windowRect.origin.x, qt_mac_flipYCoordinate(windowRect.origin.y + rect.size.height), rect.size.width, rect.size.height);
|
||||
} else if (m_platformWindow->m_contentViewIsToBeEmbedded) {
|
||||
// embedded child window, use the frame rect ### merge with case below
|
||||
geometry = QRectF::fromCGRect([self bounds]).toRect();
|
||||
geometry = QRectF::fromCGRect(NSRectToCGRect([self bounds])).toRect();
|
||||
} else {
|
||||
// child window, use the frame rect
|
||||
geometry = QRectF::fromCGRect([self frame]).toRect();
|
||||
geometry = QRectF::fromCGRect(NSRectToCGRect([self frame])).toRect();
|
||||
}
|
||||
|
||||
if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry())
|
||||
|
|
@ -557,7 +557,7 @@ static bool _q_dontOverrideCtrlLMB = false;
|
|||
|
||||
- (void) drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
qCDebug(lcQpaCocoaWindow) << "[QNSView drawRect:]" << m_window << QRectF::fromCGRect(dirtyRect);
|
||||
qCDebug(lcQpaCocoaWindow) << "[QNSView drawRect:]" << m_window << QRectF::fromCGRect(NSRectToCGRect(dirtyRect));
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (m_glContext && m_shouldSetGLContextinDrawRect) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue