diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-14 23:45:27 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-14 23:45:27 -0600 |
commit | 5e04c37a6ce7a090adb9e6ea02a04761dea8a33e (patch) | |
tree | b361ace08a667135125ac6bf00c82452b61c23d5 /src/kernel/qwidget.cpp | |
parent | 30c5994817cb87f4a291eec0bc6eaec485eefb15 (diff) | |
download | qt3-5e04c37a6ce7a090adb9e6ea02a04761dea8a33e.tar.gz qt3-5e04c37a6ce7a090adb9e6ea02a04761dea8a33e.zip |
Increase style method call speed
This breaks the style ABI
Diffstat (limited to 'src/kernel/qwidget.cpp')
-rw-r--r-- | src/kernel/qwidget.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 28328b8..704681d 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -1184,6 +1184,9 @@ void QWidget::createExtra() #endif extra->size_policy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + + extra->m_ceData = NULL; + createSysExtra(); } } @@ -3591,7 +3594,15 @@ bool QWidget::isActiveWindow() const if(tlw == qApp->activeWindow() || ( isVisible() && tlw->isPopup() )) return TRUE; #ifndef QT_NO_STYLE - if(style().styleHint(QStyle::SH_Widget_ShareActivation, this )) { + const_cast<QWidget*>(this)->createExtra(); + if (!extra->m_ceData) { + const_cast<QWidget*>(this)->extra->m_ceData = new QStyleControlElementData(); + } + //extra->m_ceData->widgetObjectTypes = getObjectTypeListForObject(this); + extra->m_ceData->widgetObjectTypes.clear(); + extra->m_ceData->allDataPopulated = false; + //if(style().styleHint(QStyle::SH_Widget_ShareActivation, *extra->m_ceData, getControlElementFlagsForObject(this, extra->m_ceData->widgetObjectTypes, QStyleOption(), false), QStyleOption(), NULL, this)) { + if(style().styleHint(QStyle::SH_Widget_ShareActivation, *extra->m_ceData, QStyle::CEF_None, QStyleOption(), NULL, this)) { if((tlw->isDialog() || (tlw->testWFlags(Qt::WStyle_Tool) && !tlw->isPopup())) && !tlw->testWFlags(Qt::WShowModal) && (!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow())) |