Add assert that there's a stack view interface

Helps catch bugs in flutter frontend
This commit is contained in:
Sergio Martins
2022-08-03 10:03:39 +01:00
parent 69c2c0770f
commit c9c3fdc1a2

View File

@@ -233,7 +233,9 @@ int Stack::currentIndex() const
int Stack::numDockWidgets() const
{
return dynamic_cast<Views::StackViewInterface *>(view())->numDockWidgets();
auto svi = dynamic_cast<Views::StackViewInterface *>(view());
Q_ASSERT(svi);
return svi->numDockWidgets();
}
void Stack::changeTabIcon(int index, const QIcon &icon)