Index: trunk/src/gui/widgets/qeffects.cpp
===================================================================
--- trunk/src/gui/widgets/qeffects.cpp	(revision 5)
+++ trunk/src/gui/widgets/qeffects.cpp	(revision 561)
@@ -2,5 +2,6 @@
 **
 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
 **
 ** This file is part of the QtGui module of the Qt Toolkit.
@@ -21,8 +22,7 @@
 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights.  These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
 ** GNU General Public License Usage
@@ -34,6 +34,6 @@
 ** met: http://www.gnu.org/copyleft/gpl.html.
 **
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
 ** $QT_END_LICENSE$
 **
@@ -127,7 +127,7 @@
 QAlphaWidget::~QAlphaWidget()
 {
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
     // Restore user-defined opacity value
-    if (widget && QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
+    if (widget)
         widget->setWindowOpacity(windowOpacity);
 #endif
@@ -161,41 +161,38 @@
 
     showWidget = true;
-#if defined(Q_OS_WIN)
-    if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {
-        qApp->installEventFilter(this);
-        widget->setWindowOpacity(0.0);
-        widget->show();
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    qApp->installEventFilter(this);
+    widget->setWindowOpacity(0.0);
+    widget->show();
+    connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
+    anim.start(1);
+#else
+    //This is roughly equivalent to calling setVisible(true) without actually showing the widget
+    widget->setAttribute(Qt::WA_WState_ExplicitShowHide, true);
+    widget->setAttribute(Qt::WA_WState_Hidden, false);
+
+    qApp->installEventFilter(this);
+
+    move(widget->geometry().x(),widget->geometry().y());
+    resize(widget->size().width(), widget->size().height());
+
+    frontImage = QPixmap::grabWidget(widget).toImage();
+    backImage = QPixmap::grabWindow(QApplication::desktop()->winId(),
+                                widget->geometry().x(), widget->geometry().y(),
+                                widget->geometry().width(), widget->geometry().height()).toImage();
+
+    if (!backImage.isNull() && checkTime.elapsed() < duration / 2) {
+        mixedImage = backImage.copy();
+        pm = QPixmap::fromImage(mixedImage);
+        show();
+        setEnabled(false);
+
         connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
         anim.start(1);
-    } else
+    } else {
+       duration = 0;
+       render();
+    }
 #endif
-    {
-        //This is roughly equivalent to calling setVisible(true) without actually showing the widget
-        widget->setAttribute(Qt::WA_WState_ExplicitShowHide, true);
-        widget->setAttribute(Qt::WA_WState_Hidden, false);
-
-        qApp->installEventFilter(this);
-
-        move(widget->geometry().x(),widget->geometry().y());
-        resize(widget->size().width(), widget->size().height());
-
-        frontImage = QPixmap::grabWidget(widget).toImage();
-        backImage = QPixmap::grabWindow(QApplication::desktop()->winId(),
-                                    widget->geometry().x(), widget->geometry().y(),
-                                    widget->geometry().width(), widget->geometry().height()).toImage();
-
-        if (!backImage.isNull() && checkTime.elapsed() < duration / 2) {
-            mixedImage = backImage.copy();
-            pm = QPixmap::fromImage(mixedImage);
-            show();
-            setEnabled(false);
-
-            connect(&anim, SIGNAL(timeout()), this, SLOT(render()));
-            anim.start(1);
-        } else {
-           duration = 0;
-           render();
-        }
-    }
 }
 
@@ -271,17 +268,15 @@
         alpha = 1;
 
-#if defined(Q_OS_WIN)
-    if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {
-        if (alpha >= windowOpacity || !showWidget) {
-            anim.stop();
-            qApp->removeEventFilter(this);
-            widget->setWindowOpacity(windowOpacity);
-            q_blend = 0;
-            deleteLater();
-        } else {
-            widget->setWindowOpacity(alpha);
-        }
-    } else
-#endif
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    if (alpha >= windowOpacity || !showWidget) {
+        anim.stop();
+        qApp->removeEventFilter(this);
+        widget->setWindowOpacity(windowOpacity);
+        q_blend = 0;
+        deleteLater();
+    } else {
+        widget->setWindowOpacity(alpha);
+    }
+#else
     if (alpha >= 1 || !showWidget) {
         anim.stop();
@@ -293,5 +288,5 @@
                 setEnabled(true);
                 setFocus();
-#endif
+#endif // Q_WS_WIN
                 widget->hide();
             } else {
@@ -310,4 +305,5 @@
         repaint();
     }
+#endif // defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
 }
 
@@ -589,6 +585,6 @@
         return;
 
-    qApp->sendPostedEvents(w, QEvent::Move);
-    qApp->sendPostedEvents(w, QEvent::Resize);
+    QApplication::sendPostedEvents(w, QEvent::Move);
+    QApplication::sendPostedEvents(w, QEvent::Resize);
     Qt::WindowFlags flags = Qt::ToolTip;
 
@@ -611,6 +607,6 @@
         return;
 
-    qApp->sendPostedEvents(w, QEvent::Move);
-    qApp->sendPostedEvents(w, QEvent::Resize);
+    QApplication::sendPostedEvents(w, QEvent::Move);
+    QApplication::sendPostedEvents(w, QEvent::Resize);
 
     Qt::WindowFlags flags = Qt::ToolTip;
