summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/CppRewriter.h
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-07-28 21:17:28 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-08 14:47:49 +0200
commita4e85dda533c69625982287a0ad1d55bf74d5f26 (patch)
treecbf5269aba0d0659d4966cc75096c82934fa0d68 /src/libs/cplusplus/CppRewriter.h
parent0e54183d4d31dc34fc742503c6e0956dd1737133 (diff)
downloadqt-creator-a4e85dda533c69625982287a0ad1d55bf74d5f26.tar.gz
C++ insert definition: Use minimally qualified names.
Change-Id: I633dbc77557fc2b6563888103350612a262536ee Reviewed-on: http://codereview.qt.nokia.com/2731 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/libs/cplusplus/CppRewriter.h')
-rw-r--r--src/libs/cplusplus/CppRewriter.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libs/cplusplus/CppRewriter.h b/src/libs/cplusplus/CppRewriter.h
index ca67b4b0b0..0d6dc65fdc 100644
--- a/src/libs/cplusplus/CppRewriter.h
+++ b/src/libs/cplusplus/CppRewriter.h
@@ -88,15 +88,24 @@ private:
QList<QPair<const Name *, FullySpecifiedType> > _map;
};
-class CPLUSPLUS_EXPORT UseQualifiedNames: public Substitution
+class CPLUSPLUS_EXPORT UseMinimalNames: public Substitution
{
public:
- UseQualifiedNames();
- virtual ~UseQualifiedNames();
+ UseMinimalNames(ClassOrNamespace *target);
+ virtual ~UseMinimalNames();
virtual FullySpecifiedType apply(const Name *name, Rewrite *rewrite) const;
+
+private:
+ ClassOrNamespace *_target;
};
+class CPLUSPLUS_EXPORT UseQualifiedNames: public UseMinimalNames
+{
+public:
+ UseQualifiedNames();
+ virtual ~UseQualifiedNames();
+};
CPLUSPLUS_EXPORT FullySpecifiedType rewriteType(const FullySpecifiedType &type,