summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jkobus@trolltech.com>2009-04-27 12:27:37 (GMT)
committerJarek Kobus <jkobus@trolltech.com>2009-04-27 12:27:37 (GMT)
commitfa6b4a76291229f29b21063f1ee8d550aec8c48b (patch)
tree53827b4eaeb564d7de37bdcb845c05af30d35f5f /src/gui/kernel/qwidget.cpp
parent96a27e24eec9356e45f1a6b6ff641a9afab24a39 (diff)
parent63a4d6652aa8d84282083e49217120c97bb0bfc8 (diff)
downloadQt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.zip
Qt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.tar.gz
Qt-fa6b4a76291229f29b21063f1ee8d550aec8c48b.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 31fed5e..eb2e9f7 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2132,6 +2132,10 @@ QWidget *QWidget::find(WId id)
If a widget is non-native (alien) and winId() is invoked on it, that widget
will be provided a native handle.
+ On Mac OS X, the type returned depends on which framework Qt was linked
+ against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt
+ is using Cocoa, {WId} is a pointer to an NSView.
+
\note We recommend that you do not store this value as it is likely to
change at run-time.
@@ -2234,9 +2238,10 @@ WId QWidget::effectiveWinId() const
The style sheet contains a textual description of customizations to the
widget's style, as described in the \l{Qt Style Sheets} document.
- \note Qt style sheets are currently not supported for QMacStyle
- (the default style on Mac OS X). We plan to address this in some future
- release.
+ Since Qt 4.5, Qt style sheets fully supports Mac OS X.
+
+ \warning Qt style sheets are currently not supported for custom QStyle
+ subclasses. We plan to address this in some future release.
\sa setStyle(), QApplication::styleSheet, {Qt Style Sheets}
*/
@@ -4708,10 +4713,13 @@ void QWidget::render(QPaintDevice *target, const QPoint &targetOffset,
if (redirected) {
target = redirected;
offset -= redirectionOffset;
- if (!inRenderWithPainter) { // Clip handled by shared painter (in qpainter.cpp).
- const QRegion redirectedSystemClip = redirected->paintEngine()->systemClip();
- if (!redirectedSystemClip.isEmpty())
- paintRegion &= redirectedSystemClip.translated(-offset);
+ }
+
+ if (!inRenderWithPainter) { // Clip handled by shared painter (in qpainter.cpp).
+ if (QPaintEngine *targetEngine = target->paintEngine()) {
+ const QRegion targetSystemClip = targetEngine->systemClip();
+ if (!targetSystemClip.isEmpty())
+ paintRegion &= targetSystemClip.translated(-offset);
}
}