From 30c5994817cb87f4a291eec0bc6eaec485eefb15 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 14 Nov 2012 14:48:47 -0600 Subject: Speed up application loading --- src/kernel/qstyle.cpp | 6 +++++- src/kernel/qstyle.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/kernel') diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp index 4e689c2..75d448d 100644 --- a/src/kernel/qstyle.cpp +++ b/src/kernel/qstyle.cpp @@ -2579,7 +2579,11 @@ QSize QStyle::sizeFromContents(ContentsType contents, int QStyle::styleHint(StyleHint sh, const QWidget * w, const QStyleOption &so, QStyleHintReturn *shr) const { - QStyleControlElementData ceData = populateControlElementDataFromWidget(w, so, false); + bool ceDataNotNeeded = false; + if (sh == SH_Widget_ShareActivation) { + ceDataNotNeeded = true; + } + QStyleControlElementData ceData = populateControlElementDataFromWidget(w, so, false, ceDataNotNeeded); return styleHint(sh, ceData, getControlElementFlagsForObject(w, ceData.widgetObjectTypes, QStyleOption(), false), so, shr, w); } diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h index f76b970..63acec6 100644 --- a/src/kernel/qstyle.h +++ b/src/kernel/qstyle.h @@ -1231,6 +1231,7 @@ Q_EXPORT QStyleControlElementData populateControlElementDataFromWidget(const QWi Q_EXPORT QStyleControlElementData populateControlElementDataFromApplication(const QApplication* app, const QStyleOption& opt, bool populateReliantFields=true); Q_EXPORT QStyle::ControlElementFlags getControlElementFlagsForObject(const QObject* object, QStringList objectTypeList, const QStyleOption& opt, bool populateReliantFields=true); Q_EXPORT QStringList getObjectTypeListForObject(const QObject* object); +Q_EXPORT QStyleControlElementData populateControlElementDataFromWidget(const QWidget* widget, const QStyleOption& opt, bool populateReliantFields, bool populateMinimumNumberOfFields); #endif // QT_NO_STYLE #endif // QSTYLE_H -- cgit v1.2.1