D11382: Add an option to show tabs from last time when Dolphin starts

Nathaniel Graham noreply at phabricator.kde.org
Tue Oct 29 20:41:43 GMT 2019


ngraham added a comment.


  Okay, I've done some delving here and discovered the following:
  
  - Dolphin's existing session restoration code works fine when e.g. restarting the machine while Dolphin is open
  - Trying to hook into those mechanics when quitting and launching manually rather than formally restoring a session as in the above case does not work because of the following issues:
    - `KMainWindow::classNameOfToplevel` called in `main.cpp` doesn't return the class name of the main window because when it checks for an existing session config, it doesn't find it
    - `KMainWindow::restore()` called in `main.cpp` will not work for this use case because it explicitly checks for `qApp->isSessionRestored()`, which as far as I can tell will always be false here (maybe worth changing that in KXMLGUI?)
    - Calling `KMainWindow::restore()` manually with the session restoration bits commented out to bypass the above issues manages to run, but when it gets to `KMainWindow::show();`... nothing happens.
  
  I'll keep digging, but this stuff is pretty challenging for me so if anyone following along is familiar with how this stuff works, assistance would be greatly appreciated.

REPOSITORY
  R318 Dolphin

BRANCH
  arcpatch-D11382

REVISION DETAIL
  https://phabricator.kde.org/D11382

To: ngraham, #dolphin, #vdg, feverfew, meven, elvisangelaccio, ndavis
Cc: davidedmundson, ndavis, intika, feverfew, kfm-devel, ngraham, broulik, #dolphin, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191029/3f4fee05/attachment.htm>


More information about the kfm-devel mailing list