Remove Q_ASSERT from QMetaObject autotest.
Issue a helpful warning rather than ignoring the error in release mode builds. Change-Id: Iea7bf4d63f8227abaf7dcf1700c5fef62763afad Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 6f082a3fdd368cd7a969b7f324354583d081da82)bb10
parent
e415182a14
commit
4bf7ac3968
|
|
@ -244,7 +244,12 @@ public:
|
|||
QObject *child;
|
||||
|
||||
public slots:
|
||||
void on_child1_destroyed(QObject *obj = 0) { ++invokeCount1; Q_ASSERT(obj && obj == child); }
|
||||
void on_child1_destroyed(QObject *obj = 0)
|
||||
{
|
||||
++invokeCount1;
|
||||
if (!obj || obj != child)
|
||||
qWarning() << "on_child1_destroyed invoked with wrong child object";
|
||||
}
|
||||
void on_child2_destroyed() { ++invokeCount2; }
|
||||
};
|
||||
|
||||
|
|
@ -268,7 +273,12 @@ public:
|
|||
}
|
||||
|
||||
private slots:
|
||||
void on_child1_destroyed(QObject *obj) { ++invokeCount1; Q_ASSERT(obj && obj == child); }
|
||||
void on_child1_destroyed(QObject *obj)
|
||||
{
|
||||
++invokeCount1;
|
||||
if (!obj || obj != child)
|
||||
qWarning() << "on_child1_destroyed invoked with wrong child object";
|
||||
}
|
||||
void on_child1_destroyed() { ++invokeCount2; }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue