summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorTrond Kjernaasen <trond@trolltech.com>2009-03-30 14:15:15 (GMT)
committerTrond Kjernaasen <trond@trolltech.com>2009-03-30 14:17:06 (GMT)
commit637b8aa2361fea8c0ea6579a6308ae594e6d8633 (patch)
treeb1012ed9b6ba5d66e880ff0825ef9bd67c638184 /src/gui/image
parent444ce6c3124c183c90d22a7d39756bf943d305a3 (diff)
downloadQt-637b8aa2361fea8c0ea6579a6308ae594e6d8633.zip
Qt-637b8aa2361fea8c0ea6579a6308ae594e6d8633.tar.gz
Qt-637b8aa2361fea8c0ea6579a6308ae594e6d8633.tar.bz2
Fix threaded QImage text drawing under Windows.
qt_win_display() will always trigger an assert and should not be used in the src/painting directory. Task-number: 248266 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qnativeimage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 6b74323..33e565c 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -100,7 +100,9 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool is
bmi.blueMask = 0;
}
- hdc = CreateCompatibleDC(qt_win_display_dc());
+ HDC display_dc = GetDC(0);
+ hdc = CreateCompatibleDC(display_dc);
+ ReleaseDC(0, display_dc);
Q_ASSERT(hdc);
uchar *bits = 0;