diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-02-04 10:07:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 06:29:20 +0100 |
commit | 41fea09d63c562a6b0bc678221eac95149250c33 (patch) | |
tree | 5c1b6635284ba99f65064d5048e6ff0004626ff1 /src | |
parent | d01f0213b837d71dd77e29752ebcbf161f227a11 (diff) |
Obsolete AA_ImmediateWidgetCreation.
This attribute is not guaranteed to fully work with QPA.
Task-number: QTBUG-36489
Change-Id: I638a8e00851288012be553b5316aa6088dd67cff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 21 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 3 |
3 files changed, 14 insertions, 17 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 2cadd07f8f..a9158b034c 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -106,15 +106,6 @@ QCoreApplication::setAttribute(), and can be tested for with QCoreApplication::testAttribute(). - \value AA_ImmediateWidgetCreation Ensures that widgets are created - as soon as they are constructed. By default, resources for - widgets are allocated on demand to improve efficiency and - minimize resource usage. Setting or clearing this attribute - affects widgets constructed after the change. Setting it - tells Qt to create toplevel windows immediately. - Therefore, if it is important to minimize resource - consumption, do not set this attribute. - \value AA_MSWindowsUseDirect3DByDefault This value is obsolete and has no effect. @@ -176,6 +167,18 @@ sizes in layout geometry calculations should typically divide by QPixmap::devicePixelRatio() to get device-independent layout geometry. + The following values are obsolete: + + \value AA_ImmediateWidgetCreation This attribute is no longer fully + supported in Qt 5. It ensures that widgets are created + as soon as they are constructed. By default, resources for + widgets are allocated on demand to improve efficiency and + minimize resource usage. Setting or clearing this attribute + affects widgets constructed after the change. Setting it + tells Qt to create toplevel windows immediately. + Therefore, if it is important to minimize resource + consumption, do not set this attribute. + \omitvalue AA_AttributeCount */ diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 68bec5472f..3118034b88 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -847,13 +847,6 @@ bool QCoreApplication::isSetuidAllowed() Sets the attribute \a attribute if \a on is true; otherwise clears the attribute. - One of the attributes that can be set with this method is - Qt::AA_ImmediateWidgetCreation. It tells Qt to create toplevel - windows immediately. Normally, resources for widgets are allocated - on demand to improve efficiency and minimize resource usage. - Therefore, if it is important to minimize resource consumption, do - not set this attribute. - \sa testAttribute() */ void QCoreApplication::setAttribute(Qt::ApplicationAttribute attribute, bool on) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 596b92e06b..dbeaef5bee 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1188,7 +1188,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) if (++QWidgetPrivate::instanceCounter > QWidgetPrivate::maxInstances) QWidgetPrivate::maxInstances = QWidgetPrivate::instanceCounter; - if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation)) + if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation)) // ### fixme: Qt 6: Remove AA_ImmediateWidgetCreation. q->create(); QEvent e(QEvent::Create); @@ -9632,6 +9632,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) oldBs->moveStaticWidgets(this); } + // ### fixme: Qt 6: Remove AA_ImmediateWidgetCreation. if (QApplicationPrivate::testAttribute(Qt::AA_ImmediateWidgetCreation) && !testAttribute(Qt::WA_WState_Created)) create(); |