QmlJSEditorPlugin: Refactor

This follows the recently introduced pattern for plugin setup
- Pimpl QmlJSEditorPlugin
- remove unneeded uses of global object pool
- apply "static pattern"
- simplify some constructors of data members in some cases
- use in-class initialization in some case

Change-Id: I95b42d0885f4a8d6c9bfe1e4c004d3ace0a3eba5
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2018-02-15 09:50:02 +01:00
parent 4786c5928a
commit 3da9c89981
11 changed files with 120 additions and 163 deletions

View File

@@ -829,7 +829,7 @@ void QmlJSEditorWidget::contextMenuEvent(QContextMenuEvent *e)
AssistInterface *interface = createAssistInterface(QuickFix, ExplicitlyInvoked);
if (interface) {
QScopedPointer<IAssistProcessor> processor(
QmlJSEditorPlugin::instance()->quickFixAssistProvider()->createProcessor());
QmlJSEditorPlugin::quickFixAssistProvider()->createProcessor());
QScopedPointer<IAssistProposal> proposal(processor->perform(interface));
if (!proposal.isNull()) {
GenericProposalModel *model = static_cast<GenericProposalModel *>(proposal->model());