D16457: Avoid crash during session restore

Albert Astals Cid noreply at phabricator.kde.org
Thu Nov 1 22:21:05 GMT 2018


aacid added a comment.


  In D16457#352447 <https://phabricator.kde.org/D16457#352447>, @tobiasdeiminger wrote:
  
  > In D16457#350089 <https://phabricator.kde.org/D16457#350089>, @aacid wrote:
  >
  > > I.e. if desiredTab is 4 but openinng url 1 fails we need to use 3 as desiredTab and not 4.
  >
  >
  > @aacid With D16457 <https://phabricator.kde.org/D16457> applied, Okular already behaves as I would expect.
  >
  > For example, let's say we've got
  >
  >   ActiveTab=3
  >   Urls[$e]=file:$HOME/file1.pdf,file:$HOME/file2.pdf,$HOME/file3.pdf,$HOME/file4.pdf
  >
  >
  > where file1.pdf is non-readable and fails to open. ActiveTab=3 means "make the 4th tab active" (because 0-based). And what actually happens is, 4th tab becomes active. The 1st tab for file1.pdf is allocated too, but non-active and empty. Imo this behavior is good. Can you confirm this?
  >
  > Without D16457 <https://phabricator.kde.org/D16457> applied and running in my old non-segfault-reproducing-environment, Okular always makes the failed tab active. No matter what ActiveTab is set to. Maybe that's what you had observed?
  
  
  I didn't observe anything because i didn't try it and just read the code. If openUrl produces an empty tab I guess we're fine :)

REPOSITORY
  R223 Okular

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

To: tobiasdeiminger, aacid
Cc: aacid, okular-devel, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20181101/81c03ed7/attachment.html>


More information about the Okular-devel mailing list