From a07acad516b5fa1ac503493b4ec28d595f6e1ea0 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 19 Aug 2011 10:24:09 +0200 Subject: [PATCH] QuickFixes: Always show all matching quick fixes. Change-Id: Ifc23d047b3b267ca1369ecb6f9f5de18887d3e92 Reviewed-on: http://codereview.qt.nokia.com/3250 Reviewed-by: Roberto Raggi --- .../texteditor/codeassist/quickfixassistprocessor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp b/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp index 83618d243a6..d829011932f 100644 --- a/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp +++ b/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp @@ -72,12 +72,19 @@ IAssistProposal *QuickFixAssistProcessor::perform(const IAssistInterface *interf } QList quickFixes; + // ### As the list of quick fixes grows, introduce some way of only showing relevant ones. + // The old priority-based way where the priority is the matching ast-node depth does not + // work well. + foreach (const QList &fixes, matchedOps) + quickFixes += fixes; +#if 0 QMapIterator > it(matchedOps); it.toBack(); if (it.hasPrevious()) { it.previous(); quickFixes = it.value(); } +#endif if (!quickFixes.isEmpty()) { QList items;