summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-07 10:59:16 (GMT)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-07 10:59:16 (GMT)
commit6e13559503040963c28dd8f5b6881e3a2b9d5596 (patch)
tree3e030548ffb1667d5fa8cd2020fd7b28749d0411 /src/gui/kernel/qwidget_mac.mm
parent939623b2bc8e441618ee1a1886cc656880bee62b (diff)
parentd8f76432c3937690c37972136c02a5a264bc941f (diff)
downloadQt-6e13559503040963c28dd8f5b6881e3a2b9d5596.zip
Qt-6e13559503040963c28dd8f5b6881e3a2b9d5596.tar.gz
Qt-6e13559503040963c28dd8f5b6881e3a2b9d5596.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp src/gui/painting/qtransform.cpp
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index a3c026b..9eac321 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3268,6 +3268,20 @@ void QWidgetPrivate::show_sys()
qt_event_request_window_change(q);
}
+
+QPoint qt_mac_nativeMapFromParent(const QWidget *child, const QPoint &pt)
+{
+#ifndef QT_MAC_USE_COCOA
+ CGPoint nativePoint = CGPointMake(pt.x(), pt.y());
+ HIViewConvertPoint(&nativePoint, qt_mac_nativeview_for(child->parentWidget()),
+ qt_mac_nativeview_for(child));
+#else
+ NSPoint nativePoint = [qt_mac_nativeview_for(child) convertPoint:NSMakePoint(pt.x(), pt.y()) fromView:qt_mac_nativeview_for(child->parentWidget())];
+#endif
+ return QPoint(nativePoint.x, nativePoint.y);
+}
+
+
void QWidgetPrivate::hide_sys()
{
Q_Q(QWidget);