┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/viewmodecontroller.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2012-09-29 19:47:00 +0200
committerFrank Reininghaus <[email protected]>2012-09-29 19:53:14 +0200
commit0e49df921450da38a94b4cf10837c67b8e968ae9 (patch)
treea1e58bbf8c7ef46321c52bd7f436c8ecff5de3bd /src/views/viewmodecontroller.cpp
parent65b7e3b785e4f368f1b8cb39df9344bfd6324b4b (diff)
Find out the main window by calling the parent widget's window() member
KFileItemModel calls the dir lister's setMainWindow() method to make sure that the dir lister caches authentication data. However, the method used to determine the main window (qApp->activeWindow()) is not guaranteed to yield the DolphinMainWindow or the KonqMainWindow. In particular, if "Split View" is enabled in Dolphin's settings dialog, the active window is the dialog, and when it is closed, any later access to the stored pointer leads to a crash. A better method is to verify that the model's parent is a QWidget and then use this widget's window(). I had to make a small modification in DolphinMainWindow to make sure that it also works correctly when the view is split (the new view container had been created with a 0 parent previously). I tested it in Dolphin and Konqueror and verified that the "main window" passed to the dir lister is really the application's main window. BUG: 306459 FIXED-IN: 4.9.3
Diffstat (limited to 'src/views/viewmodecontroller.cpp')
0 files changed, 0 insertions, 0 deletions