Remove Q_ASSERT's from exceptionsafety_objects test
Report a fatal error in all builds, not just in debug builds. Change-Id: Iad990e2d3b29a55e995254d466e967a4a722bb23 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a212b402da4b4af9d453fa96dbfa2d32271e857d)
This commit is contained in:
parent
d9d1e72d76
commit
9329ee1c27
@ -371,7 +371,8 @@ struct WidgetCreator : public AbstractTester
|
||||
{
|
||||
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);
|
||||
}
|
||||
};
|
||||
@ -381,7 +382,8 @@ template <> struct WidgetCreator<QSizeGrip> : public AbstractTester
|
||||
{
|
||||
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)));
|
||||
}
|
||||
};
|
||||
@ -391,7 +393,8 @@ template <> struct WidgetCreator<QDesktopWidget> : public AbstractTester
|
||||
{
|
||||
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());
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user