Merge remote-tracking branch 'origin/2.8' into HEAD

This commit is contained in:
Eike Ziller
2013-07-18 11:54:02 +02:00
54 changed files with 8051 additions and 2843 deletions

View File

@@ -38,6 +38,49 @@
using namespace CPlusPlus;
/*!
\class Overview
\brief The Overview class converts a FullySpecifiedType and/or any qualified
name to its string representation.
The public data members (except the ones starting with \e marked)
determine what exactly and how to print.
You can get the start and end position of a function argument
in the resulting string. Set \c markedArgument to the desired
argument. After processing, \c markedArgumentBegin and
\c markedArgumentEnd will contain the positions.
*/
/*!
\enum Overview::StarBindFlag
The StarBindFlag enum describes how the '*' and '&' in pointers/references
should be bound in the string representation.
This also applies to rvalue references ('&&'), but not to pointers to
functions or arrays, because it seems to be quite uncommon to use spaces in
them. For example:
\code
void (*p)()
void (*p)[]
\endcode
See the examples below. These assume that exactly one
flag is set. That is, it may look different with
flag combinations.
\value BindToIdentifier
e.g. "char *foo", but not "char * foo"
\value BindToTypeName
e.g. "char*", but not "char *"
\value BindToLeftSpecifier
e.g. "char * const* const", but not "char * const * const"
\value BindToRightSpecifier
e.g. "char *const", but not "char * const"
*/
Overview::Overview()
: starBindFlags(BindToIdentifier), // default to "Qt Style"
showArgumentNames(false),

View File

@@ -37,16 +37,6 @@
namespace CPlusPlus {
/*!
\class Overview
\brief Converts a FullySpecifiedType and/or any qualified name,
to its string representation.
The public data members (except the ones starting with "marked")
determine what exactly and how to print.
*/
class CPLUSPLUS_EXPORT Overview
{
public:
@@ -67,33 +57,7 @@ public:
QString prettyType(const FullySpecifiedType &type, const QString &name) const;
public:
/*!
\enum Overview::StarBindFlag
The StarBindFlags describe how the '*' and '&' in pointers/references
should be bound in the string representation.
This also applies to rvalue references ('&&'), but not to
pointers to functions or arrays like in
void (*p)()
void (*p)[]
since it seems to be quite uncommon to use spaces there.
See the examples below. These assume that exactly one
flag is set. That is, it may look different with
flag combinations.
\value BindToIdentifier
e.g. "char *foo", but not "char * foo"
\value BindToTypeName
e.g. "char*", but not "char *"
\value BindToLeftSpecifier
e.g. "char * const* const", but not "char * const * const"
\value BindToRightSpecifier
e.g. "char *const", but not "char * const"
*/
enum StarBindFlag {
BindToIdentifier = 0x1,
BindToTypeName = 0x2,
@@ -110,12 +74,6 @@ public:
bool showTemplateParameters: 1;
bool includeWhiteSpaceInOperatorName: 1; /// "operator =()" vs "operator=()"
/*!
You can get the start and end position of a function argument
in the resulting string. Set "markedArgument" to the desired
argument. After processing, "markedArgumentBegin" and
"markedArgumentEnd" will contain the positions.
*/
unsigned markedArgument;
int markedArgumentBegin;
int markedArgumentEnd;

View File

@@ -42,6 +42,14 @@
using namespace CPlusPlus;
/*!
\class TypePrettyPrinter
\brief The TypePrettyPrinter class is a helper class for the Overview class.
This class does the main type conversion work.
Do not use this class directly, use Overview instead.
*/
TypePrettyPrinter::TypePrettyPrinter(const Overview *overview)
: _overview(overview)

View File

@@ -40,14 +40,6 @@ namespace CPlusPlus {
class Overview;
class FullySpecifiedType;
/*!
\class TypePrettyPrinter
\brief Helper class for Overview. Does the main type conversation work.
Don't use this class directly, use Overview instead.
*/
class CPLUSPLUS_EXPORT TypePrettyPrinter: protected TypeVisitor
{
public: