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
56523377
Commit
56523377
authored
Jul 14, 2010
by
Thorbjørn Lindeijer
Browse files
Some adjustments signed/unsigned
parent
09c009c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphoverhandler.cpp
View file @
56523377
...
...
@@ -232,10 +232,10 @@ void CppHoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos)
}
bool
CppHoverHandler
::
matchDiagnosticMessage
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
line
)
unsigned
line
)
{
foreach
(
const
Document
::
DiagnosticMessage
&
m
,
document
->
diagnosticMessages
())
{
if
(
m
.
line
()
==
unsigned
(
line
)
)
{
if
(
m
.
line
()
==
line
)
{
m_toolTip
=
m
.
text
();
return
true
;
}
...
...
@@ -243,10 +243,10 @@ bool CppHoverHandler::matchDiagnosticMessage(const CPlusPlus::Document::Ptr &doc
return
false
;
}
bool
CppHoverHandler
::
matchIncludeFile
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
line
)
bool
CppHoverHandler
::
matchIncludeFile
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
unsigned
line
)
{
foreach
(
const
Document
::
Include
&
includeFile
,
document
->
includes
())
{
if
(
includeFile
.
line
()
==
unsigned
(
line
)
)
{
if
(
includeFile
.
line
()
==
line
)
{
m_toolTip
=
QDir
::
toNativeSeparators
(
includeFile
.
fileName
());
const
QString
&
fileName
=
QFileInfo
(
includeFile
.
fileName
()).
fileName
();
m_helpCandidates
.
append
(
HelpCandidate
(
fileName
,
fileName
,
HelpCandidate
::
Include
));
...
...
@@ -256,11 +256,11 @@ bool CppHoverHandler::matchIncludeFile(const CPlusPlus::Document::Ptr &document,
return
false
;
}
bool
CppHoverHandler
::
matchMacroInUse
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
pos
)
bool
CppHoverHandler
::
matchMacroInUse
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
unsigned
pos
)
{
foreach
(
const
Document
::
MacroUse
&
use
,
document
->
macroUses
())
{
if
(
use
.
contains
(
pos
))
{
const
int
begin
=
use
.
begin
();
const
unsigned
begin
=
use
.
begin
();
const
QString
&
name
=
use
.
macro
().
name
();
if
(
pos
<
begin
+
name
.
length
())
{
m_toolTip
=
use
.
macro
().
toString
();
...
...
src/plugins/cppeditor/cpphoverhandler.h
View file @
56523377
...
...
@@ -97,9 +97,9 @@ private:
void
resetMatchings
();
void
identifyMatch
(
TextEditor
::
ITextEditor
*
editor
,
int
pos
);
bool
matchDiagnosticMessage
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
line
);
bool
matchIncludeFile
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
line
);
bool
matchMacroInUse
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
const
int
pos
);
bool
matchDiagnosticMessage
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
unsigned
line
);
bool
matchIncludeFile
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
unsigned
line
);
bool
matchMacroInUse
(
const
CPlusPlus
::
Document
::
Ptr
&
document
,
unsigned
pos
);
void
handleLookupItemMatch
(
const
CPlusPlus
::
LookupItem
&
lookupItem
,
const
bool
assignTooltip
);
...
...
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