api: Make QGuiApplication::styleHints() static

Practically all functions in QGuiApplication are static.

Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Girish Ramakrishnan 2012-04-13 07:30:02 -07:00 committed by Qt by Nokia
parent 9b06be8646
commit 6094197294
2 changed files with 5 additions and 6 deletions

View File

@ -1976,12 +1976,11 @@ void QGuiApplication::restoreOverrideCursor()
\sa QStyleHints
*/
QStyleHints *QGuiApplication::styleHints() const
QStyleHints *QGuiApplication::styleHints()
{
Q_D(const QGuiApplication);
if (!d->styleHints)
const_cast<QGuiApplicationPrivate *>(d)->styleHints = new QStyleHints();
return d->styleHints;
if (!qGuiApp->d_func()->styleHints)
qGuiApp->d_func()->styleHints = new QStyleHints();
return qGuiApp->d_func()->styleHints;
}
/*!

View File

@ -124,7 +124,7 @@ public:
static inline bool isRightToLeft() { return layoutDirection() == Qt::RightToLeft; }
static inline bool isLeftToRight() { return layoutDirection() == Qt::LeftToRight; }
QStyleHints *styleHints() const;
static QStyleHints *styleHints();
static void setDesktopSettingsAware(bool on);
static bool desktopSettingsAware();