D21409: KWrite: Implement sceleton KTextEditor::Application
noreply at phabricator.kde.org
Sun May 26 09:44:42 BST 2019
michalhumpula updated this revision to Diff 58675.
michalhumpula added a comment.
Uh, this is getting more complicated then I though it would be.
So, if I call `QApplication::quit()` from the `KWrite::quit` the ktexteditor doesn't even get a chance to notify user about unsaved changes. For the specific vi-mode usecase I think calling close on active window is perfectly ok.
But... since the KTextEditor::Application object is registered multiple times when KWrite object is created , then this patch creates a mayhem when multiple windows are open. So the only way out I can see is to create the regular KWrite Application as in kate. And that is this update
- there are no static properties in KWrite anymore.
- ktexteditor vi-mode close command is unable to handle dummy main window correctly and causes segfault
- in order to implement KTextEditor::Application properly the kwrite would have to track which KWrite is active and all the other stuff.
So apparently this went quickly over my paygrade. No idea where to go from here.
CHANGES SINCE LAST UPDATE
To: michalhumpula, cullmann
Cc: loh.tar, dhaumann, kwrite-devel, domson, michaelh, ngraham, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel