D17599: Confirm closing muliple tabs.
Dominik Haumann
noreply at phabricator.kde.org
Sat Jan 12 19:08:15 GMT 2019
dhaumann added inline comments.
INLINE COMMENTS
> mwolff wrote in katemainwindow.cpp:1200
> introduce three more locals to make this line less long:
>
> const bool closedByUser = !qApp->isSavingSession();
> const bool numDocuments = KateApp::self()->documentManager()->documentList().count();
> const bool numWindows = KateApp::self()->mainWindowsCount();
> const bool askConfirmation = closedByUser && numDocuments > 1 && numWindows == 1;
>
> if (askConfirmation) {
> ...
>
> why is the number of windows affecting this btw? I mean when I close a window with multiple tabs, it should ask for confirmation, no? Why is this only asked when there is just one window?
>
> Note that closing a single window is different from quitting the application.
+1 for using local variables to make the code more readable.
REPOSITORY
R40 Kate
REVISION DETAIL
https://phabricator.kde.org/D17599
To: shubham, dhaumann, #kate, sars
Cc: emateli, mwolff, ngraham, pino, kwrite-devel, hase, michaelh, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190112/f899fa43/attachment.html>
More information about the KWrite-Devel
mailing list