Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 4.10.0-beta1, Qt Creator 4.10.0-beta2
-
None
Description
I've run into 2 issues with the clang refactoring plugin in the latest 4.9.82 version that still builds against Qt 5.9 and clang 6 . I don't see any modifications in the current source but since I cannot verify I will file this as a "suggestion" issue.
- The clang reformatting plugin doesn't catch any exceptions from the SQlite C++ wrapper you use. On my Mac it gets one because of a missing table, in `ClangRefactoringPlugin::initialize()`, which aborts the IDE after I activate the plugin. A simple try/catch around the entire function payload and that returns false from the catch fixes that.
- Activating the same plugin on my Linux system causes a crash on exit because of a hoverhandler race condition in the texteditor plugin. Somehow loading the plugin modifies the order in which instances are deleted on exit. The result is that there is one `BaseHoverHandler` instance that gets deleted before the corresponding `TextEditorWidgetPrivate` instance is deleted, which in turns leads to `BaseHoverHandler::abort()` being called on a stale instance. The workaround I found for that is to catch `QCoreApplication::aboutToQuit` in the `TextEditorWidgetPrivate` ctor, triggering a lambda that calls `m_hoverHandlerRunner.abortHandlers()` proactively and then clears the `m_hoverHandlers` list. I think this should be fine, whatever those handlers do shouldn't be useful anymore when the app is exitting.
I have patches but IIRC you cannot use them if I upload them here, and I don't want to go through gerrit with modifications to code I cannot test myself.