From 7a7898e2c928f0b3c52a97deea9dbd65b11ad516 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 2 Oct 2018 10:04:36 +0200 Subject: [PATCH] Reduce priority of "Convert to Camel Case" refactoring Otherwise this is too annoying in case the function is called the way it should be. Fixes: QTCREATORBUG-8114 Change-Id: I51063a11e7979e24fc9020344aa5ff800b5064a9 Reviewed-by: Nikolai Kosjar --- src/plugins/cppeditor/cppquickfixes.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index c5004b80242..b0442e0a2a9 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -1682,9 +1682,8 @@ namespace { class ConvertToCamelCaseOp: public CppQuickFixOperation { public: - ConvertToCamelCaseOp(const CppQuickFixInterface &interface, int priority, - const QString &newName) - : CppQuickFixOperation(interface, priority) + ConvertToCamelCaseOp(const CppQuickFixInterface &interface, const QString &newName) + : CppQuickFixOperation(interface, -1) , m_name(newName) { setDescription(QApplication::translate("CppTools::QuickFix", "Convert to Camel Case")); @@ -1744,7 +1743,7 @@ void ConvertToCamelCase::match(const CppQuickFixInterface &interface, QuickFixOp return; for (int i = 1; i < newName.length() - 1; ++i) { if (ConvertToCamelCaseOp::isConvertibleUnderscore(newName, i)) { - result << new ConvertToCamelCaseOp(interface, path.size() - 1, newName); + result << new ConvertToCamelCaseOp(interface, newName); return; } }