summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-09-27 17:59:12 +0200
committerRobert Loehning <robert.loehning@nokia.com>2010-09-27 19:07:04 +0200
commit91208c827f1e796b54137c64bc4c32a9c9e161c2 (patch)
tree4af032ad8d5a74fb2b36338ed215d3336329083f /src/plugins/cppeditor
parent533685b127704a0730ca8d6894a2fda874bc9ccf (diff)
downloadqt-creator-91208c827f1e796b54137c64bc4c32a9c9e161c2.tar.gz
C++: Disabled CompleteSwitchCaseStatement: needs bugfixing.
(cherry picked from commit 3ff803d7e2543b64358755702d3c74318bc01736)
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index 9434dcf055..c2f648a6ce 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -1338,6 +1338,13 @@ protected:
const QList<LookupItem> results = typeOfExpression(statement->condition,
state.document(),
scope);
+
+ ///
+ /// \note FIXME: the lookup has at least two problems: the result.declaration()
+ /// will often be null, (i.e. when the condition is a function call)
+ /// and the lookups will not look through typedefs.
+ ///
+
foreach (LookupItem result, results) {
FullySpecifiedType fst = result.type();
if (! result.declaration())
@@ -1741,9 +1748,11 @@ void CppQuickFixCollector::registerQuickFixes(ExtensionSystem::IPlugin *plugIn)
plugIn->addAutoReleasedObject(new TranslateStringLiteral);
plugIn->addAutoReleasedObject(new CStringToNSString);
plugIn->addAutoReleasedObject(new ConvertNumericLiteral);
- plugIn->addAutoReleasedObject(new CompleteSwitchCaseStatement);
+// Disabled for now: see the CompleteSwitchCaseStatement class for the reason.
+// plugIn->addAutoReleasedObject(new CompleteSwitchCaseStatement);
plugIn->addAutoReleasedObject(new FixForwardDeclarationOp);
plugIn->addAutoReleasedObject(new AddLocalDeclarationOp);
plugIn->addAutoReleasedObject(new ToCamelCaseConverter);
plugIn->addAutoReleasedObject(new Internal::DeclFromDef);
+ plugIn->addAutoReleasedObject(new Internal::DefFromDecl);
}