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
Marco Bubke
flatpak-qt-creator
Commits
5aaa595e
Commit
5aaa595e
authored
May 17, 2011
by
hjk
Browse files
debugger: allow hex etc formatting for anything that looks like an integer
parent
fb7f576e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/watchhandler.cpp
View file @
5aaa595e
...
...
@@ -369,6 +369,10 @@ static inline QString formattedValue(const WatchData &data, int format)
return
reformatInteger
(
data
.
value
.
toULongLong
(),
format
);
return
reformatInteger
(
data
.
value
.
toLongLong
(),
format
);
}
if
(
data
.
value
.
toULongLong
(
0
,
0
))
return
reformatInteger
(
data
.
value
.
toLongLong
(),
format
);
QString
result
=
data
.
value
;
result
.
replace
(
QLatin1Char
(
'\n'
),
QLatin1String
(
"
\\
n"
));
if
(
result
.
startsWith
(
QLatin1Char
(
'<'
)))
{
...
...
@@ -395,6 +399,7 @@ static inline QString formattedValue(const WatchData &data, int format)
WatchHandler
::
tr
(
"<%n items>"
,
0
,
size
);
}
}
return
result
;
}
...
...
@@ -716,12 +721,13 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
return
QStringList
()
<<
tr
(
"Latin1 string"
)
<<
tr
(
"UTF8 string"
);
if
(
isIntType
(
data
.
type
)
&&
data
.
type
!=
"bool"
)
if
((
isIntType
(
data
.
type
)
&&
data
.
type
!=
"bool"
)
||
data
.
value
.
toULongLong
(
0
,
0
))
return
QStringList
()
<<
tr
(
"
d
ecimal"
)
<<
tr
(
"
h
exadecimal"
)
<<
tr
(
"
b
inary"
)
<<
tr
(
"
o
ctal"
);
<<
tr
(
"
D
ecimal"
)
<<
tr
(
"
H
exadecimal"
)
<<
tr
(
"
B
inary"
)
<<
tr
(
"
O
ctal"
);
// Hack: Compensate for namespaces.
QString
type
=
stripTemplate
(
data
.
type
);
int
pos
=
type
.
indexOf
(
"::Q"
);
...
...
@@ -938,13 +944,6 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
void
WatchModel
::
insertData
(
const
WatchData
&
data
)
{
//qDebug() << "WMI:" << data.toString();
//static int bulk = 0;
//qDebug() << "SINGLE: " << ++bulk << data.toString();
if
(
data
.
iname
.
isEmpty
())
{
int
x
;
x
=
1
;
}
QTC_ASSERT
(
!
data
.
iname
.
isEmpty
(),
qDebug
()
<<
data
.
toString
();
return
);
WatchItem
*
parent
=
findItem
(
parentName
(
data
.
iname
),
m_root
);
if
(
!
parent
)
{
...
...
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