Compile on Windows
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Wed, 4 May 2011 07:10:45 +0000 (09:10 +0200)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Wed, 4 May 2011 07:12:40 +0000 (09:12 +0200)
The SPI_FONTSMOOTHINGCONTRAST macro is not defined everywhere. When
the code was refactored, the workaround for this was lost. This
resubmits the work-around to make it compile.

Reviewed-by: Samuel
(cherry picked from commit 4c3630c1fcd2b3008f540a8906a19c533604f36a)

src/gui/kernel/qapplication_win.cpp

index 1a490c9..72a05af 100644 (file)
@@ -656,7 +656,7 @@ static void qt_win_read_cleartype_settings()
 #endif
 
     int winSmooth;
-    if (SystemParametersInfo(SPI_GETFONTSMOOTHINGCONTRAST, 0, &winSmooth, 0)) {
+    if (SystemParametersInfo(0x200C /* SPI_GETFONTSMOOTHINGCONTRAST */, 0, &winSmooth, 0)) {
         qt_fontsmoothing_gamma = winSmooth / qreal(1000.0);
     } else {
         qt_fontsmoothing_gamma = 1.0;