Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
28be7bc4
Commit
28be7bc4
authored
14 years ago
by
Leandro Melo
Browse files
Options
Downloads
Patches
Plain Diff
C++ tooltip: Make sure to get the correct list of base classes.
parent
62e33d0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/cppeditor/cpphoverhandler.cpp
+14
-5
14 additions, 5 deletions
src/plugins/cppeditor/cpphoverhandler.cpp
with
14 additions
and
5 deletions
src/plugins/cppeditor/cpphoverhandler.cpp
+
14
−
5
View file @
28be7bc4
...
@@ -60,6 +60,8 @@
...
@@ -60,6 +60,8 @@
#include
<QtGui/QToolTip>
#include
<QtGui/QToolTip>
#include
<QtGui/QTextCursor>
#include
<QtGui/QTextCursor>
#include
<algorithm>
using
namespace
CppEditor
::
Internal
;
using
namespace
CppEditor
::
Internal
;
using
namespace
CPlusPlus
;
using
namespace
CPlusPlus
;
using
namespace
Core
;
using
namespace
Core
;
...
@@ -95,11 +97,14 @@ namespace {
...
@@ -95,11 +97,14 @@ namespace {
const
QList
<
Symbol
*>
&
symbols
=
baseClass
->
symbols
();
const
QList
<
Symbol
*>
&
symbols
=
baseClass
->
symbols
();
foreach
(
Symbol
*
baseSymbol
,
symbols
)
{
foreach
(
Symbol
*
baseSymbol
,
symbols
)
{
if
(
baseSymbol
->
isClass
())
{
if
(
baseSymbol
->
isClass
())
{
hierarchy
->
back
().
append
(
overview
.
prettyName
(
const
QString
&
qualifiedName
=
overview
.
prettyName
(
LookupContext
::
fullyQualifiedName
(
baseSymbol
)));
LookupContext
::
fullyQualifiedName
(
baseSymbol
));
buildClassHierarchyHelper
(
baseSymbol
,
context
,
overview
,
hierarchy
);
if
(
!
qualifiedName
.
isEmpty
())
{
hierarchy
->
append
(
hierarchy
->
back
());
hierarchy
->
back
().
append
(
qualifiedName
);
hierarchy
->
back
().
removeLast
();
buildClassHierarchyHelper
(
baseSymbol
,
context
,
overview
,
hierarchy
);
hierarchy
->
append
(
hierarchy
->
back
());
hierarchy
->
back
().
removeLast
();
}
}
}
}
}
}
}
...
@@ -476,6 +481,10 @@ void CppHoverHandler::generateDiagramTooltip(const bool extendTooltips)
...
@@ -476,6 +481,10 @@ void CppHoverHandler::generateDiagramTooltip(const bool extendTooltips)
qSort
(
m_classHierarchy
.
begin
(),
m_classHierarchy
.
end
(),
ClassHierarchyComp
());
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
;
QStringList
directBaseClasses
;
foreach
(
const
QStringList
&
hierarchy
,
m_classHierarchy
)
{
foreach
(
const
QStringList
&
hierarchy
,
m_classHierarchy
)
{
if
(
hierarchy
.
size
()
>
1
)
if
(
hierarchy
.
size
()
>
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment