https://bugs.kde.org/show_bug.cgi?id=403800

            Bug ID: 403800
           Summary: KoPart::deleteOpenPane() should not delete
                    d->startupWidget(?)
           Product: calligracommon
           Version: unspecified
          Platform: Compiled Sources
                OS: All
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: calligra-bugs-n...@kde.org
          Reporter: rjvber...@gmail.com
  Target Milestone: ---

QMainWindow::setCentralWidget() takes ownership of the widget, so
KoPart::deleteOpenPane() should probably not attempt to delete it itself.
Rather, I think that KoPart should keep track of which mainwindow has the
startupWidget as a central widget and then do (in KoPart::deleteOpenPane()):

mainWindow->setCentralWidget(nullptr);

Also, I think that for safety this function should also null d->startupWidget
afterwards, to avoid a potential race condition in KoPart::showStartUpWidget().

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to