X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4a0454ff88a0900706826e7ed61aef405c73ba90..04dabe84b22aa9db501c2d88b4e6ffa0749598ce:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 17268297c..babaf1486 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -2057,7 +2057,13 @@ void DolphinMainWindow::createSecondaryView(int tabIndex) const int newWidth = (viewTab.primaryView->width() - splitter->handleWidth()) / 2; const DolphinView* view = viewTab.primaryView->view(); - viewTab.secondaryView = createViewContainer(view->url(), 0); + // The final parent of the new view container will be set by adding it + // to the splitter. However, we must make sure that the DolphinMainWindow + // is a parent of the view container already when it is constructed + // because this enables the container's KFileItemModel to assign its + // dir lister to the right main window. The dir lister can then cache + // authentication data. + viewTab.secondaryView = createViewContainer(view->url(), this); splitter->addWidget(viewTab.secondaryView); splitter->setSizes(QList() << newWidth << newWidth);