tests: Remove a bunch of qobject_casts<FloatingWindow*>

By adding DockWidget::floatingWindow()
This commit is contained in:
Sergio Martins
2019-08-03 11:22:06 +01:00
parent ae7ea032d0
commit 369703a0bd
3 changed files with 49 additions and 34 deletions

View File

@@ -253,12 +253,22 @@ private:
/**
* @brief the Frame which contains this dock widgets.
*
* A frame wraps a docked DockWidget, giving it a TabWidget so it can accept other dock widgets.
* Frame is also the actual class that goes into a MultiSplitter.s
* @return the frame which contains this dock widgets, or nullptr if none (if this dockwidget is a window).
* Frame is also the actual class that goes into a MultiSplitter.
*
* It's nullptr immediately after creation.
*/
Frame *frame() const;
/**
* @brief returns the FloatingWindow this dock widget is in. If nullptr then it's in a MainWindow.
*
* Note: Being in a FloatingWindow doesn't necessarily mean @ref isFloating() returns true, as
* the dock widget might be in a floating window with other dock widgets side by side.
*/
FloatingWindow *floatingWindow() const;
///@brief adds the current layout item containing this dock widget
void addPlaceholderItem(Item*);