Unfold an assert into a qWarning+assert
Just to print some debug data
This commit is contained in:
@@ -279,7 +279,12 @@ QObject *Item::host() const
|
||||
|
||||
void Item::restore(Widget *guest)
|
||||
{
|
||||
Q_ASSERT(!isVisible() && !guestAsQObject());
|
||||
if (isVisible() || guestAsQObject()) {
|
||||
qWarning() << Q_FUNC_INFO << "Hitting assert. visible="
|
||||
<< isVisible() << "; guest=" << guestAsQObject();
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
if (isContainer()) {
|
||||
qWarning() << Q_FUNC_INFO << "Containers can't be restored";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user