Bump QCoreApplicationPrivate::app_compile_version to 0x050000
authorBradley T. Hughes <bradley.hughes@nokia.com>
Wed, 2 Nov 2011 14:23:50 +0000 (15:23 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 7 Nov 2011 15:45:16 +0000 (16:45 +0100)
The minimum compile version is 0x050000 now, it cannot be less. Remove
checks for 0x040200 in the widget code, which provided compatibility in
the 4.x series for binaries compiled with 4.0 and 4.1.

Change-Id: Ia01da90de26dca6aeeb79d29c754cbeeecf809af
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
src/corelib/kernel/qcoreapplication.cpp
src/widgets/kernel/qwidget.cpp

index f7d1d3d..9408d41 100644 (file)
@@ -176,7 +176,10 @@ CApaCommandLine* QCoreApplicationPrivate::symbianCommandLine()
 extern QString qAppFileName();
 #endif
 
-int QCoreApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0
+#if QT_VERSION >= 0x060000
+# error "Bump QCoreApplicatoinPrivate::app_compile_version to 0x060000"
+#endif
+int QCoreApplicationPrivate::app_compile_version = 0x050000; //we don't know exactly, but it's at least 5.0.0
 
 #if !defined(Q_OS_WIN)
 #ifdef Q_OS_MAC
index c419856..91a4036 100644 (file)
@@ -1227,11 +1227,9 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
     if (++QWidgetPrivate::instanceCounter > QWidgetPrivate::maxInstances)
         QWidgetPrivate::maxInstances = QWidgetPrivate::instanceCounter;
 
-    if (QApplicationPrivate::app_compile_version < 0x040200
-        || QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation))
+    if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation))
         q->create();
 
-
     QEvent e(QEvent::Create);
     QApplication::sendEvent(q, &e);
     QApplication::postEvent(q, new QEvent(QEvent::PolishRequest));
@@ -9673,9 +9671,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
         oldBs->moveStaticWidgets(this);
     }
 
-    if ((QApplicationPrivate::app_compile_version < 0x040200
-         || QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation))
-        && !testAttribute(Qt::WA_WState_Created))
+    if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation) && !testAttribute(Qt::WA_WState_Created))
         create();
 
     d->reparentFocusWidgets(oldtlw);