]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Merge branch '4.9'
[dolphin.git] / src / dolphinmainwindow.cpp
index 3bf3b3f558c72ce4965505c31e5e0457017c9c36..b4a25a7cf4e6538dbc8ac902904ef0c2d1a97e6f 100644 (file)
@@ -2061,7 +2061,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<int>() << newWidth << newWidth);