diff options
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
| -rw-r--r-- | src/widgets/kernel/qwidget.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index eaf6d00942e..3d05dca4629 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1682,7 +1682,7 @@ void QWidgetPrivate::deleteExtra() { if (extra) { // if exists deleteSysExtra(); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) // dereference the stylesheet style if (QStyleSheetStyle *proxy = qt_styleSheet(extra->style)) proxy->deref(); @@ -2542,7 +2542,7 @@ void QWidget::setScreen(QScreen *screen) d->setScreen(screen); } -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) /*! \property QWidget::styleSheet @@ -2647,7 +2647,7 @@ void QWidget::setStyle(QStyle *style) Q_D(QWidget); setAttribute(Qt::WA_SetStyle, style != nullptr); d->createExtra(); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) if (QStyleSheetStyle *styleSheetStyle = qt_styleSheet(style)) { //if for some reason someone try to set a QStyleSheetStyle, ref it //(this may happen for example in QButtonDialogBox which propagates its style) @@ -2668,7 +2668,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate) createExtra(); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) QPointer<QStyle> origStyle = extra->style; #endif extra->style = newStyle; @@ -2689,7 +2689,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate) } } -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) if (!qt_styleSheet(newStyle)) { if (const QStyleSheetStyle* cssStyle = qt_styleSheet(origStyle)) { cssStyle->clearWidgetFont(q); @@ -2700,7 +2700,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate) QEvent e(QEvent::StyleChange); QCoreApplication::sendEvent(q, &e); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) // dereference the old stylesheet style if (QStyleSheetStyle *proxy = qt_styleSheet(origStyle)) proxy->deref(); @@ -2710,7 +2710,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate) // Inherits style from the current parent and propagates it as necessary void QWidgetPrivate::inheritStyle() { -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) Q_Q(QWidget); QStyle *extraStyle = extra ? (QStyle*)extra->style : nullptr; @@ -4688,7 +4688,7 @@ void QWidget::setFont(const QFont &font) { Q_D(QWidget); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) const QStyleSheetStyle* style; if (d->extra && (style = qt_styleSheet(d->extra->style))) style->saveWidgetFont(this, font); @@ -4797,7 +4797,7 @@ void QWidgetPrivate::resolveFont() void QWidgetPrivate::updateFont(const QFont &font) { Q_Q(QWidget); -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) const QStyleSheetStyle* cssStyle; cssStyle = extra ? qt_styleSheet(extra->style) : nullptr; const bool useStyleSheetPropagationInWidgetStyles = @@ -4827,7 +4827,7 @@ void QWidgetPrivate::updateFont(const QFont &font) QWidget *w = qobject_cast<QWidget*>(children.at(i)); if (w) { if (0) { -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) } else if (!useStyleSheetPropagationInWidgetStyles && w->testAttribute(Qt::WA_StyleSheet)) { // Style sheets follow a different font propagation scheme. if (cssStyle) @@ -4842,7 +4842,7 @@ void QWidgetPrivate::updateFont(const QFont &font) } } -#ifndef QT_NO_STYLE_STYLESHEET +#if QT_CONFIG(style_stylesheet) if (!useStyleSheetPropagationInWidgetStyles && cssStyle) { cssStyle->updateStyleSheetFont(q); } |
