cleanup regarding DockWidget::show()
This commit is contained in:
@@ -387,7 +387,6 @@ QStringList DockWidget::affinities() const
|
||||
|
||||
void DockWidget::show()
|
||||
{
|
||||
// TODOm2: show wont be called. move to view instead.
|
||||
if (view()->isRootView() && (d->m_lastPosition->wasFloating() || !d->m_lastPosition->isValid())) {
|
||||
// Create the FloatingWindow already, instead of waiting for the show event.
|
||||
// This reduces flickering on some platforms
|
||||
@@ -665,7 +664,7 @@ void DockWidget::Private::toggle(bool enabled)
|
||||
} else {
|
||||
// The most common case. The dock widget is not in the sidebar. just close or open it.
|
||||
if (enabled) {
|
||||
show();
|
||||
q->show();
|
||||
} else {
|
||||
q->view()->close();
|
||||
}
|
||||
@@ -813,12 +812,6 @@ void DockWidget::Private::saveTabIndex()
|
||||
m_lastPosition->saveTabIndex(currentTabIndex(), q->isFloating());
|
||||
}
|
||||
|
||||
void DockWidget::Private::show()
|
||||
{
|
||||
// Only show for now
|
||||
q->show();
|
||||
}
|
||||
|
||||
void DockWidget::onParentChanged()
|
||||
{
|
||||
Q_EMIT parentViewChanged();
|
||||
|
||||
@@ -123,7 +123,6 @@ public:
|
||||
void updateFloatAction();
|
||||
void onDockWidgetShown();
|
||||
void onDockWidgetHidden();
|
||||
void show();
|
||||
void close();
|
||||
bool restoreToPreviousPosition();
|
||||
void maybeRestoreToPreviousPosition();
|
||||
|
||||
@@ -70,6 +70,8 @@ public:
|
||||
*/
|
||||
void setWidget(QWidget *widget);
|
||||
|
||||
// TODOm2: Add show to the views
|
||||
|
||||
protected:
|
||||
void init() override;
|
||||
bool event(QEvent *) override;
|
||||
|
||||
Reference in New Issue
Block a user