D17599: Confirm closing if multiple tabs are open.

Dominik Haumann noreply at phabricator.kde.org
Sat Dec 15 12:28:57 GMT 2018

dhaumann requested changes to this revision.
dhaumann added a comment.
This revision now requires changes to proceed.

  What happens, if you have multiple mainwindows? Do you get the message multiple times then? Please try with View > New Window.
  In addition, the message box should either be configurable, or support the "Do not ask again" checkbox (KMessaceBox supports this).


> katemainwindow.cpp:1204
> +
> +    KateTabBar *tab = new KateTabBar(window());
> +    if (tab->count() > 1 && closedByUser) {

This is wrong: we should not create new GUI widgets in a close event.

Simply ask the Document manager (KateDocManager?) how many documents are open. You can find plenty of uses of the document manager in the code.

  R40 Kate


To: shubham, dhaumann, #kate, cullmann
Cc: pino, kwrite-devel, hase, michaelh, ngraham, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181215/0fee2090/attachment.html>

More information about the KWrite-Devel mailing list