TextEditor: Use more direct access to quick fix factories

Change-Id: I65fc5c0ca6c7806e09b4bd626fd1679686df7d7f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2017-12-15 09:34:02 +01:00
parent e5009787a3
commit 4f3ac0382a
12 changed files with 32 additions and 38 deletions

View File

@@ -29,6 +29,8 @@
#include <cpptools/cpprefactoringchanges.h>
#include <utils/algorithm.h>
using namespace CppEditor;
using namespace CppEditor::Internal;
using namespace CppTools;
@@ -50,3 +52,10 @@ void CppQuickFixFactory::matchingOperations(const QuickFixInterface &interface,
return;
match(*cppInterface, result);
}
QList<QuickFixFactory *> CppQuickFixFactory::cppQuickFixFactories()
{
return Utils::filtered(QuickFixFactory::allQuickFixFactories(), [](QuickFixFactory *f) {
return qobject_cast<CppQuickFixFactory *>(f) != nullptr;
});
}