Introduce InitialOption struct
addDockWidget() received a AddingOption enumerator. But that enum isn't enough, as we also want to be able to specify an initial QSize. So, instead of adding yet another parameter to addDockWidget(), we create a struct to old those "initial settings". Implies a minor source break, but trivial to fix in user code, just rename the enumerator. Honouring preferredSize will be a followup. Needed for issue #95
This commit is contained in:
@@ -97,7 +97,8 @@ void MainWindowBase::addDockWidgetAsTab(DockWidgetBase *widget)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowBase::addDockWidget(DockWidgetBase *dw, Location location, DockWidgetBase *relativeTo, AddingOption option)
|
||||
void MainWindowBase::addDockWidget(DockWidgetBase *dw, Location location,
|
||||
DockWidgetBase *relativeTo, InitialOption option)
|
||||
{
|
||||
if (dw->options() & DockWidgetBase::Option_NotDockable) {
|
||||
qWarning() << Q_FUNC_INFO << "Refusing to dock non-dockable widget" << dw;
|
||||
|
||||
Reference in New Issue
Block a user