forked from qt-creator/qt-creator
Merge remote branch 'origin/2.0'
This commit is contained in:
@@ -130,6 +130,7 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
|
||||
// which we handle immediately:
|
||||
return index - 3;
|
||||
} else {
|
||||
#if 0 // see QTCREATORBUG-1501
|
||||
// See if we are handling an Objective-C messaging expression in the form of:
|
||||
// [receiver messageParam1:expression messageParam2
|
||||
// or:
|
||||
@@ -154,6 +155,7 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
|
||||
if (tk[j].is(T_IDENTIFIER) && tk[j + 1].is(T_IDENTIFIER))
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return index - 1;
|
||||
} else if (tk[index - 1].is(T_RPAREN)) {
|
||||
|
||||
@@ -87,7 +87,7 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &ty)
|
||||
bool previousNeedsParens = switchNeedsParens(false);
|
||||
acceptType(ty);
|
||||
switchNeedsParens(previousNeedsParens);
|
||||
return switchText(previousName).trimmed();
|
||||
return switchText(previousName);
|
||||
}
|
||||
|
||||
QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QString &name)
|
||||
@@ -317,8 +317,11 @@ void TypePrettyPrinter::visit(Function *type)
|
||||
}
|
||||
|
||||
if (_overview->showReturnTypes()) {
|
||||
_text.prepend(QLatin1Char(' '));
|
||||
_text.prepend(_overview->prettyType(type->returnType()));
|
||||
const QString returnType = _overview->prettyType(type->returnType());
|
||||
if (!returnType.isEmpty()) {
|
||||
_text.prepend(QLatin1Char(' '));
|
||||
_text.prepend(returnType);
|
||||
}
|
||||
}
|
||||
|
||||
if (_overview->showFunctionSignatures()) {
|
||||
|
||||
Reference in New Issue
Block a user