Fix crash when KTextEdit::Factory is not found
Review Request #100949 - Created March 26, 2011 and submitted
|Robert Mathias Marmorstein|
This patch fixes a crash which occurs when closing kdevelop or quanta after the "KTextEditor::Factory not found" error box is displayed. The problem is a simple logic error caused by the fact that QApplicationCore::exit() does not immediately abort an application. Instead, it causes event processing to cease, which indirectly terminates the application AFTER the function has returned to the main event loop.
Recompiled, ran quanta and kdevelop. Error message dialog still comes up (as it should), but the program closes without crashing now.
can you give me a backtrace of the crash that happened before? I'd rather have an explicit exit(1) or similar at the place where we check for the text part and show the error box instead of catching this error here.