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
Tobias Hunger
qt-creator
Commits
32d3db82
Commit
32d3db82
authored
Dec 07, 2009
by
hjk
Browse files
debugger: special handling for char*
parent
4794cbf0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/watchhandler.cpp
View file @
32d3db82
...
...
@@ -166,7 +166,8 @@ void WatchData::setValue(const QString &value0)
// "numchild" is sometimes lying
//MODEL_DEBUG("\n\n\nPOINTER: " << type << value);
if
(
isPointerType
(
type
))
setHasChildren
(
value
!=
"0x0"
&&
value
!=
"<null>"
);
setHasChildren
(
value
!=
"0x0"
&&
value
!=
"<null>"
&&
!
isCharPointerType
(
type
));
// pointer type information is available in the 'type'
// column. No need to duplicate it here.
...
...
src/plugins/debugger/watchutils.cpp
View file @
32d3db82
...
...
@@ -268,6 +268,13 @@ bool isPointerType(const QString &type)
return
type
.
endsWith
(
QLatin1Char
(
'*'
))
||
type
.
endsWith
(
QLatin1String
(
"* const"
));
}
bool
isCharPointerType
(
const
QString
&
type
)
{
return
type
==
QLatin1String
(
"char *"
)
||
type
==
QLatin1String
(
"const char *"
)
||
type
==
QLatin1String
(
"char const *"
);
}
bool
isAccessSpecifier
(
const
QString
&
str
)
{
static
const
QStringList
items
=
QStringList
()
...
...
@@ -569,6 +576,8 @@ GuessChildrenResult guessChildren(const QString &type)
{
if
(
isIntOrFloatType
(
type
))
return
HasNoChildren
;
if
(
isCharPointerType
(
type
))
return
HasNoChildren
;
if
(
isPointerType
(
type
))
return
HasChildren
;
if
(
type
.
endsWith
(
QLatin1String
(
"QString"
)))
...
...
src/plugins/debugger/watchutils.h
View file @
32d3db82
...
...
@@ -70,6 +70,7 @@ bool hasLetterOrNumber(const QString &exp);
bool
hasSideEffects
(
const
QString
&
exp
);
bool
isKeyWord
(
const
QString
&
exp
);
bool
isPointerType
(
const
QString
&
type
);
bool
isCharPointerType
(
const
QString
&
type
);
bool
isAccessSpecifier
(
const
QString
&
str
);
bool
startsWithDigit
(
const
QString
&
str
);
QString
stripPointerType
(
QString
type
);
...
...
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