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
a4cd9388
Commit
a4cd9388
authored
Jul 13, 2010
by
Leandro Melo
Browse files
C++ tooltip: Display macro tooltip only if hover is actually over the macro name.
parent
72bb7c5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphoverhandler.cpp
View file @
a4cd9388
...
...
@@ -256,12 +256,13 @@ bool CppHoverHandler::matchMacroInUse(const CPlusPlus::Document::Ptr &document,
{
foreach
(
const
Document
::
MacroUse
&
use
,
document
->
macroUses
())
{
if
(
use
.
contains
(
pos
))
{
const
Macro
&
macro
=
use
.
macro
();
m_toolTip
=
macro
.
toString
();
m_helpCandidates
.
append
(
HelpCandidate
(
macro
.
name
(),
macro
.
name
(),
HelpCandidate
::
Macro
));
return
true
;
const
int
begin
=
use
.
begin
();
const
QString
&
name
=
use
.
macro
().
name
();
if
(
pos
<
begin
+
name
.
length
())
{
m_toolTip
=
use
.
macro
().
toString
();
m_helpCandidates
.
append
(
HelpCandidate
(
name
,
name
,
HelpCandidate
::
Macro
));
return
true
;
}
}
}
return
false
;
...
...
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