Cpp: No need for accessors for simple structs

Change-Id: Ie09c1fc59dd54d2302a78cfc9769d5cda6012be7
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-10-10 22:09:44 +02:00
parent 52e381b8e8
commit 6dfe3207d2
7 changed files with 57 additions and 166 deletions

View File

@@ -401,14 +401,14 @@ private:
QString CppFunctionHintModel::text(int index) const
{
Overview overview;
overview.setShowReturnTypes(true);
overview.setShowArgumentNames(true);
overview.setMarkedArgument(m_currentArg + 1);
overview.showReturnTypes = true;
overview.showArgumentNames = true;
overview.markedArgument = m_currentArg + 1;
Function *f = m_functionSymbols.at(index);
const QString prettyMethod = overview(f->type(), f->name());
const int begin = overview.markedArgumentBegin();
const int end = overview.markedArgumentEnd();
const QString prettyMethod = overview.prettyType(f->type(), f->name());
const int begin = overview.markedArgumentBegin;
const int end = overview.markedArgumentEnd;
QString hintText;
hintText += Qt::escape(prettyMethod.left(begin));
@@ -536,8 +536,8 @@ public:
: _item(0)
, _symbol(0)
{
overview.setShowReturnTypes(true);
overview.setShowArgumentNames(true);
overview.showReturnTypes = true;
overview.showArgumentNames = true;
}
BasicProposalItem *operator()(Symbol *symbol)
@@ -1574,9 +1574,9 @@ bool CppCompletionAssistProcessor::completeQtMethod(const QList<CPlusPlus::Looku
ConvertToCompletionItem toCompletionItem;
Overview o;
o.setShowReturnTypes(false);
o.setShowArgumentNames(false);
o.setShowFunctionSignatures(true);
o.showReturnTypes = false;
o.showArgumentNames = false;
o.showFunctionSignatures = true;
QSet<QString> signatures;
foreach (const LookupItem &p, results) {
@@ -1882,8 +1882,8 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl
// set up signature autocompletion
foreach (Function *f, functions) {
Overview overview;
overview.setShowArgumentNames(true);
overview.setShowDefaultArguments(false);
overview.showArgumentNames = true;
overview.showDefaultArguments = false;
const FullySpecifiedType localTy = rewriteType(f->type(), &env, control);