Bump QCoreApplicationPrivate::app_compile_version to 0x050000

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>
This commit is contained in:
Bradley T. Hughes 2011-11-02 15:23:50 +01:00 committed by Qt by Nokia
parent e8f7fccf22
commit b2bc9d2762
2 changed files with 6 additions and 7 deletions

View 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

View 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);