Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
988cc958
Commit
988cc958
authored
Aug 26, 2010
by
Roberto Raggi
Browse files
Renamed Symbol::identity() to Symbol::unqualifiedName().
parent
e3551684
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/CppDocument.cpp
View file @
988cc958
...
...
@@ -766,7 +766,7 @@ Symbol *Snapshot::findMatchingDefinition(Symbol *declaration) const
Function
*
best
=
0
;
foreach
(
Function
*
fun
,
viableFunctions
)
{
if
(
fun
->
identity
()
->
isEqualTo
(
declaration
->
identity
()))
if
(
fun
->
unqualifiedName
()
->
isEqualTo
(
declaration
->
unqualifiedName
()))
continue
;
else
if
(
fun
->
argumentCount
()
==
declarationTy
->
argumentCount
())
{
...
...
src/plugins/cppeditor/cppdeclfromdef.cpp
View file @
988cc958
...
...
@@ -178,7 +178,7 @@ QString DeclFromDef::generateDeclaration(const CppQuickFixState &,
oo
.
setShowArgumentNames
(
true
);
QString
decl
;
decl
+=
oo
(
method
->
type
(),
method
->
identity
());
decl
+=
oo
(
method
->
type
(),
method
->
unqualifiedName
());
decl
+=
QLatin1String
(
";
\n
"
);
return
decl
;
...
...
src/plugins/cpptools/cppcodecompletion.cpp
View file @
988cc958
...
...
@@ -151,7 +151,7 @@ public:
TextEditor
::
CompletionItem
previousItem
=
switchCompletionItem
(
0
);
Symbol
*
previousSymbol
=
switchSymbol
(
symbol
);
accept
(
symbol
->
identity
());
accept
(
symbol
->
unqualifiedName
());
if
(
_item
.
isValid
())
_item
.
data
=
QVariant
::
fromValue
(
symbol
);
(
void
)
switchSymbol
(
previousSymbol
);
...
...
@@ -1849,7 +1849,7 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item, QChar t
if
(
Function
*
function
=
symbol
->
type
()
->
asFunctionType
())
{
// If the member is a function, automatically place the opening parenthesis,
// except when it might take template parameters.
if
(
!
function
->
hasReturnType
()
&&
(
function
->
identity
()
&&
!
function
->
identity
()
->
isDestructorNameId
()))
{
if
(
!
function
->
hasReturnType
()
&&
(
function
->
unqualifiedName
()
&&
!
function
->
unqualifiedName
()
->
isDestructorNameId
()))
{
// Don't insert any magic, since the user might have just wanted to select the class
/// ### port me
...
...
src/plugins/cpptools/searchsymbols.cpp
View file @
988cc958
...
...
@@ -114,7 +114,7 @@ bool SearchSymbols::visit(Function *symbol)
QString
name
=
symbolName
(
symbol
);
QString
scopedName
=
scopedSymbolName
(
name
);
QString
type
=
overview
.
prettyType
(
symbol
->
type
(),
separateScope
?
symbol
->
identity
()
:
0
);
separateScope
?
symbol
->
unqualifiedName
()
:
0
);
appendItem
(
separateScope
?
type
:
scopedName
,
separateScope
?
fullScope
:
type
,
ModelItemInfo
::
Method
,
symbol
);
...
...
@@ -140,7 +140,7 @@ bool SearchSymbols::visit(Declaration *symbol)
QString
name
=
symbolName
(
symbol
);
QString
scopedName
=
scopedSymbolName
(
name
);
QString
type
=
overview
.
prettyType
(
symbol
->
type
(),
separateScope
?
symbol
->
identity
()
:
0
);
separateScope
?
symbol
->
unqualifiedName
()
:
0
);
appendItem
(
separateScope
?
type
:
scopedName
,
separateScope
?
_scope
:
type
,
ModelItemInfo
::
Declaration
,
symbol
);
...
...
src/shared/cplusplus/Scope.cpp
View file @
988cc958
...
...
@@ -180,7 +180,7 @@ Symbol *SymbolTable::lookat(const Identifier *id) const
const
unsigned
h
=
id
->
hashCode
()
%
_hashSize
;
Symbol
*
symbol
=
_hash
[
h
];
for
(;
symbol
;
symbol
=
symbol
->
_next
)
{
const
Name
*
identity
=
symbol
->
identity
();
const
Name
*
identity
=
symbol
->
unqualifiedName
();
if
(
!
identity
)
{
continue
;
}
else
if
(
const
NameId
*
nameId
=
identity
->
asNameId
())
{
...
...
@@ -210,7 +210,7 @@ Symbol *SymbolTable::lookat(int operatorId) const
const
unsigned
h
=
operatorId
%
_hashSize
;
Symbol
*
symbol
=
_hash
[
h
];
for
(;
symbol
;
symbol
=
symbol
->
_next
)
{
const
Name
*
identity
=
symbol
->
identity
();
const
Name
*
identity
=
symbol
->
unqualifiedName
();
if
(
const
OperatorNameId
*
op
=
identity
->
asOperatorNameId
())
{
if
(
op
->
kind
()
==
operatorId
)
break
;
...
...
src/shared/cplusplus/Symbol.cpp
View file @
988cc958
...
...
@@ -199,7 +199,7 @@ const char *Symbol::fileName() const
unsigned
Symbol
::
fileNameLength
()
const
{
return
fileId
()
->
size
();
}
const
Name
*
Symbol
::
identity
()
const
const
Name
*
Symbol
::
unqualifiedName
()
const
{
if
(
!
_name
)
return
0
;
...
...
@@ -221,7 +221,7 @@ void Symbol::setName(const Name *name)
_hashCode
=
0
;
else
{
HashCode
hh
;
_hashCode
=
hh
(
identity
());
_hashCode
=
hh
(
unqualifiedName
());
}
}
...
...
src/shared/cplusplus/Symbol.h
View file @
988cc958
...
...
@@ -276,7 +276,7 @@ public:
/// Returns this Symbol's index.
unsigned
index
()
const
;
const
Name
*
identity
()
const
;
const
Name
*
unqualifiedName
()
const
;
bool
isGenerated
()
const
;
...
...
src/shared/cplusplus/Symbols.cpp
View file @
988cc958
...
...
@@ -204,8 +204,8 @@ bool Function::isEqualTo(const Type *other) const
return
false
;
#endif
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
{
if
(
argumentCount
()
!=
o
->
argumentCount
())
return
false
;
...
...
@@ -394,8 +394,8 @@ bool Enum::isEqualTo(const Type *other) const
const
Enum
*
o
=
other
->
asEnumType
();
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
)
return
true
;
else
if
(
!
l
)
...
...
@@ -492,8 +492,8 @@ bool Namespace::isEqualTo(const Type *other) const
const
Namespace
*
o
=
other
->
asNamespaceType
();
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
return
true
;
return
false
;
...
...
@@ -634,8 +634,8 @@ bool Class::isEqualTo(const Type *other) const
const
Class
*
o
=
other
->
asClassType
();
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
return
true
;
else
...
...
@@ -730,8 +730,8 @@ bool ObjCClass::isEqualTo(const Type *other) const
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
return
true
;
else
...
...
@@ -789,8 +789,8 @@ bool ObjCProtocol::isEqualTo(const Type *other) const
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
return
true
;
else
...
...
@@ -910,8 +910,8 @@ bool ObjCMethod::isEqualTo(const Type *other) const
if
(
!
o
)
return
false
;
const
Name
*
l
=
identity
();
const
Name
*
r
=
o
->
identity
();
const
Name
*
l
=
unqualifiedName
();
const
Name
*
r
=
o
->
unqualifiedName
();
if
(
l
==
r
||
(
l
&&
l
->
isEqualTo
(
r
)))
{
if
(
argumentCount
()
!=
o
->
argumentCount
())
return
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment