Skip to content
GitLab
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
28be7bc4
Commit
28be7bc4
authored
Jul 28, 2010
by
Leandro Melo
Browse files
C++ tooltip: Make sure to get the correct list of base classes.
parent
62e33d0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphoverhandler.cpp
View file @
28be7bc4
...
...
@@ -60,6 +60,8 @@
#include
<QtGui/QToolTip>
#include
<QtGui/QTextCursor>
#include
<algorithm>
using
namespace
CppEditor
::
Internal
;
using
namespace
CPlusPlus
;
using
namespace
Core
;
...
...
@@ -95,11 +97,14 @@ namespace {
const
QList
<
Symbol
*>
&
symbols
=
baseClass
->
symbols
();
foreach
(
Symbol
*
baseSymbol
,
symbols
)
{
if
(
baseSymbol
->
isClass
())
{
hierarchy
->
back
().
append
(
overview
.
prettyName
(
LookupContext
::
fullyQualifiedName
(
baseSymbol
)));
buildClassHierarchyHelper
(
baseSymbol
,
context
,
overview
,
hierarchy
);
hierarchy
->
append
(
hierarchy
->
back
());
hierarchy
->
back
().
removeLast
();
const
QString
&
qualifiedName
=
overview
.
prettyName
(
LookupContext
::
fullyQualifiedName
(
baseSymbol
));
if
(
!
qualifiedName
.
isEmpty
())
{
hierarchy
->
back
().
append
(
qualifiedName
);
buildClassHierarchyHelper
(
baseSymbol
,
context
,
overview
,
hierarchy
);
hierarchy
->
append
(
hierarchy
->
back
());
hierarchy
->
back
().
removeLast
();
}
}
}
}
...
...
@@ -476,6 +481,10 @@ void CppHoverHandler::generateDiagramTooltip(const bool extendTooltips)
qSort
(
m_classHierarchy
.
begin
(),
m_classHierarchy
.
end
(),
ClassHierarchyComp
());
// Remove duplicates (in case there are any).
m_classHierarchy
.
erase
(
std
::
unique
(
m_classHierarchy
.
begin
(),
m_classHierarchy
.
end
()),
m_classHierarchy
.
end
());
QStringList
directBaseClasses
;
foreach
(
const
QStringList
&
hierarchy
,
m_classHierarchy
)
{
if
(
hierarchy
.
size
()
>
1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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