diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 143293b589..7b7600fdc3 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -10915,9 +10915,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) return; Q_D(QWidget); - Q_ASSERT_X(sizeof(d->high_attributes)*8 >= (Qt::WA_AttributeCount - sizeof(uint)*8), - "QWidget::setAttribute(WidgetAttribute, bool)", - "QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute"); + Q_STATIC_ASSERT_X(sizeof(d->high_attributes)*8 >= (Qt::WA_AttributeCount - sizeof(uint)*8), + "QWidget::setAttribute(WidgetAttribute, bool): " + "QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute"); #ifdef Q_OS_WIN // ### Don't use PaintOnScreen+paintEngine() to do native painting in some future release if (attribute == Qt::WA_PaintOnScreen && on && windowType() != Qt::Desktop && !inherits("QGLWidget")) {