{
void operator()(QObject *parent)
{
- Q_ASSERT(!parent || parent->isWidgetType());
+ if (parent && !parent->isWidgetType())
+ qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO);
QScopedPointer<T> ptr(parent ? new T(static_cast<QWidget *>(parent)) : new T);
}
};
{
void operator()(QObject *parent)
{
- Q_ASSERT(!parent || parent->isWidgetType());
+ if (parent && !parent->isWidgetType())
+ qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO);
QScopedPointer<QSizeGrip> ptr(new QSizeGrip(static_cast<QWidget *>(parent)));
}
};
{
void operator()(QObject *parent)
{
- Q_ASSERT(!parent || parent->isWidgetType());
+ if (parent && !parent->isWidgetType())
+ qFatal("%s: parent must be either null or a widget type", Q_FUNC_INFO);
QScopedPointer<QDesktopWidget> ptr(new QDesktopWidget());
}
};