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
774fa494
Commit
774fa494
authored
Apr 19, 2011
by
Friedemann Kleint
Browse files
Fix more krazy warnings.
parent
cca52b6d
Changes
66
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp
View file @
774fa494
...
...
@@ -165,10 +165,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
if
(
gfxObject
)
{
className
=
gfxObject
->
metaObject
()
->
className
();
className
.
re
plac
e
(
QRegExp
(
"_QMLTYPE_
\\
d+"
)
,
""
);
className
.
re
plac
e
(
QRegExp
(
"_QML_
\\
d+"
)
,
""
);
className
.
re
mov
e
(
QRegExp
(
"_QMLTYPE_
\\
d+"
));
className
.
re
mov
e
(
QRegExp
(
"_QML_
\\
d+"
));
if
(
className
.
startsWith
(
QLatin1String
(
"QDeclarative"
)))
className
=
className
.
re
plac
e
(
QLatin1String
(
"QDeclarative"
)
,
""
);
className
=
className
.
re
mov
e
(
QLatin1String
(
"QDeclarative"
));
QDeclarativeItem
*
declarativeItem
=
qobject_cast
<
QDeclarativeItem
*>
(
gfxObject
);
if
(
declarativeItem
)
{
...
...
@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
}
if
(
!
objectStringId
.
isEmpty
())
{
constructedName
=
objectStringId
+
" ("
+
className
+
")"
;
constructedName
=
objectStringId
+
" ("
+
className
+
QLatin1Char
(
')'
)
;
}
else
{
if
(
!
gfxObject
->
objectName
().
isEmpty
())
{
constructedName
=
gfxObject
->
objectName
()
+
" ("
+
className
+
")"
;
constructedName
=
gfxObject
->
objectName
()
+
" ("
+
className
+
QLatin1Char
(
')'
)
;
}
else
{
constructedName
=
className
;
}
...
...
share/qtcreator/qml/qmljsdebugger/editor/liveselectionindicator.cpp
View file @
774fa494
...
...
@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
// set selections to also all children if they are not editor items
foreach
(
QWeakPointer
<
QGraphicsObject
>
object
,
itemList
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
object
,
itemList
)
{
if
(
object
.
isNull
())
continue
;
...
...
share/qtcreator/qml/qmljsdebugger/editor/liveselectiontool.cpp
View file @
774fa494
...
...
@@ -382,7 +382,7 @@ void LiveSelectionTool::clear()
void
LiveSelectionTool
::
selectedItemsChanged
(
const
QList
<
QGraphicsItem
*>
&
itemList
)
{
foreach
(
QWeakPointer
<
QGraphicsObject
>
obj
,
m_selectedItemList
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
obj
,
m_selectedItemList
)
{
if
(
!
obj
.
isNull
())
{
disconnect
(
obj
.
data
(),
SIGNAL
(
xChanged
()),
this
,
SLOT
(
repaintBoundingRects
()));
disconnect
(
obj
.
data
(),
SIGNAL
(
yChanged
()),
this
,
SLOT
(
repaintBoundingRects
()));
...
...
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
View file @
774fa494
...
...
@@ -407,7 +407,8 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb
QString
imports
;
foreach
(
const
QString
&
s
,
importList
)
{
imports
+=
s
+
"
\n
"
;
imports
+=
s
;
imports
+=
QLatin1Char
(
'\n'
);
}
QDeclarativeContext
*
parentContext
=
view
->
engine
()
->
contextForObject
(
parent
);
...
...
@@ -574,7 +575,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
void
QDeclarativeViewObserverPrivate
::
setSelectedItemsForTools
(
QList
<
QGraphicsItem
*>
items
)
{
foreach
(
QWeakPointer
<
QGraphicsObject
>
obj
,
currentSelection
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
obj
,
currentSelection
)
{
if
(
QGraphicsItem
*
item
=
obj
.
data
())
{
if
(
!
items
.
contains
(
item
))
{
QObject
::
disconnect
(
obj
.
data
(),
SIGNAL
(
destroyed
(
QObject
*
)),
...
...
@@ -603,7 +604,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(QList<QGraphicsItem *> it
setSelectedItemsForTools
(
items
);
if
(
oldList
!=
currentSelection
)
{
QList
<
QObject
*>
objectList
;
foreach
(
QWeakPointer
<
QGraphicsObject
>
graphicsObject
,
currentSelection
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
graphicsObject
,
currentSelection
)
{
if
(
graphicsObject
)
objectList
<<
graphicsObject
.
data
();
}
...
...
share/qtcreator/qml/qmlobserver/main.cpp
View file @
774fa494
...
...
@@ -477,10 +477,10 @@ static QDeclarativeViewer *createViewer()
if
(
opts
.
experimentalGestures
)
viewer
->
enableExperimentalGestures
();
foreach
(
QString
lib
,
opts
.
imports
)
foreach
(
const
QString
&
lib
,
opts
.
imports
)
viewer
->
addLibraryPath
(
lib
);
foreach
(
QString
plugin
,
opts
.
plugins
)
foreach
(
const
QString
&
plugin
,
opts
.
plugins
)
viewer
->
addPluginPath
(
plugin
);
viewer
->
setNetworkCacheSize
(
opts
.
cache
);
...
...
share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp
View file @
774fa494
...
...
@@ -217,8 +217,9 @@ void QDeclarativeTester::save()
if
(
!
fe
.
hash
.
isEmpty
())
{
ts
<<
" hash:
\"
"
<<
fe
.
hash
.
toHex
()
<<
"
\"\n
"
;
}
else
if
(
!
fe
.
image
.
isNull
())
{
QString
filename
=
filenameInfo
.
baseName
()
+
"."
+
QString
::
number
(
imgCount
)
+
".png"
;
fe
.
image
.
save
(
m_script
+
"."
+
QString
::
number
(
imgCount
)
+
".png"
);
QString
filename
=
filenameInfo
.
baseName
()
+
QLatin1Char
(
'.'
)
+
QString
::
number
(
imgCount
)
+
".png"
;
fe
.
image
.
save
(
m_script
+
QLatin1Char
(
'.'
)
+
QString
::
number
(
imgCount
)
+
".png"
);
imgCount
++
;
ts
<<
" image:
\"
"
<<
filename
<<
"
\"\n
"
;
}
...
...
share/qtcreator/qml/qmlobserver/qmlruntime.cpp
View file @
774fa494
...
...
@@ -459,10 +459,10 @@ private:
QMutexLocker
lock
(
&
mutex
);
QList
<
QNetworkCookie
>
list
=
allCookies
();
QByteArray
data
;
foreach
(
QNetworkCookie
cookie
,
list
)
{
foreach
(
const
QNetworkCookie
&
cookie
,
list
)
{
if
(
!
cookie
.
isSessionCookie
())
{
data
.
append
(
cookie
.
toRawForm
());
data
.
append
(
"
\n
"
);
data
.
append
(
'
\n
'
);
}
}
QSettings
settings
;
...
...
@@ -1036,7 +1036,7 @@ void QDeclarativeViewer::chooseRecordingOptions()
// Rate
record_rate
=
recdlg
->
videoRate
();
// Profile
record_args
=
recdlg
->
arguments
().
split
(
" "
,
QString
::
SkipEmptyParts
);
record_args
=
recdlg
->
arguments
().
split
(
QLatin1Char
(
' '
)
,
QString
::
SkipEmptyParts
);
}
}
...
...
@@ -1458,7 +1458,7 @@ void QDeclarativeViewer::setRecording(bool on)
}
progress
.
setValue
(
progress
.
maximum
()
-
1
);
foreach
(
QString
name
,
inputs
)
foreach
(
const
QString
&
name
,
inputs
)
QFile
::
remove
(
name
);
frames
.
clear
();
...
...
src/libs/cplusplus/Macro.cpp
View file @
774fa494
...
...
@@ -73,7 +73,7 @@ QString Macro::toString() const
if
(
f
.
_functionLike
)
{
text
+=
QLatin1Char
(
'('
);
bool
first
=
true
;
foreach
(
const
QByteArray
formal
,
_formals
)
{
foreach
(
const
QByteArray
&
formal
,
_formals
)
{
if
(
!
first
)
text
+=
QLatin1String
(
", "
);
else
...
...
src/libs/cplusplus/pp-engine.cpp
View file @
774fa494
...
...
@@ -1168,7 +1168,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok
if
(
macro
.
isFunctionLike
())
{
macroId
+=
'('
;
bool
fst
=
true
;
foreach
(
const
QByteArray
formal
,
macro
.
formals
())
{
foreach
(
const
QByteArray
&
formal
,
macro
.
formals
())
{
if
(
!
fst
)
macroId
+=
", "
;
fst
=
false
;
...
...
src/libs/qmleditorwidgets/colorbox.cpp
View file @
774fa494
...
...
@@ -50,11 +50,12 @@ static inline QColor properColor(const QString &str)
return
QColor
();
int
lalpha
=
255
;
QString
lcolorStr
=
str
;
if
(
lcolorStr
.
at
(
0
)
==
'#'
&&
lcolorStr
.
length
()
==
9
)
{
const
QChar
hash
=
QLatin1Char
(
'#'
);
if
(
lcolorStr
.
at
(
0
)
==
hash
&&
lcolorStr
.
length
()
==
9
)
{
QString
alphaStr
=
lcolorStr
;
alphaStr
.
truncate
(
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
=
"#"
+
lcolorStr
;
lcolorStr
=
hash
+
lcolorStr
;
alphaStr
.
remove
(
0
,
1
);
bool
v
;
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
...
...
@@ -62,7 +63,7 @@ static inline QColor properColor(const QString &str)
lalpha
=
255
;
}
QColor
lcolor
(
lcolorStr
);
if
(
lcolorStr
.
contains
(
'#'
))
if
(
lcolorStr
.
contains
(
hash
))
lcolor
.
setAlpha
(
lalpha
);
return
lcolor
;
}
...
...
src/libs/qmleditorwidgets/colorbutton.cpp
View file @
774fa494
...
...
@@ -72,11 +72,12 @@ static inline QColor properColor(const QString &str)
return
QColor
();
int
lalpha
=
255
;
QString
lcolorStr
=
str
;
if
(
lcolorStr
.
at
(
0
)
==
'#'
&&
lcolorStr
.
length
()
==
9
)
{
const
QChar
hash
=
QLatin1Char
(
'#'
);
if
(
lcolorStr
.
at
(
0
)
==
hash
&&
lcolorStr
.
length
()
==
9
)
{
QString
alphaStr
=
lcolorStr
;
alphaStr
.
truncate
(
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
=
"#"
+
lcolorStr
;
lcolorStr
=
hash
+
lcolorStr
;
alphaStr
.
remove
(
0
,
1
);
bool
v
;
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
...
...
@@ -84,7 +85,7 @@ static inline QColor properColor(const QString &str)
lalpha
=
255
;
}
QColor
lcolor
(
lcolorStr
);
if
(
lcolorStr
.
contains
(
'#'
))
if
(
lcolorStr
.
contains
(
hash
))
lcolor
.
setAlpha
(
lalpha
);
return
lcolor
;
}
...
...
src/libs/qmljs/qmljscodeformatter.cpp
View file @
774fa494
...
...
@@ -940,7 +940,7 @@ void CodeFormatter::dump() const
qDebug
()
<<
"Current token index"
<<
m_tokenIndex
;
qDebug
()
<<
"Current state:"
;
foreach
(
State
s
,
m_currentState
)
{
foreach
(
const
State
&
s
,
m_currentState
)
{
qDebug
()
<<
metaEnum
.
valueToKey
(
s
.
type
)
<<
s
.
savedIndentDepth
;
}
qDebug
()
<<
"Current indent depth:"
<<
m_indentDepth
;
...
...
src/libs/qmljs/qmljslineinfo.cpp
View file @
774fa494
...
...
@@ -204,7 +204,7 @@ QString LineInfo::trimmedCodeLine(const QString &t)
if
(
yyLinizerState
.
leftBraceFollows
&&
!
text
.
isEmpty
()
&&
text
.
at
(
0
).
isUpper
())
{
int
i
=
index
;
// skip any prece
e
ding 'identifier.'; these could appear in both cases
// skip any preceding 'identifier.'; these could appear in both cases
while
(
i
>=
2
)
{
const
Token
&
prev
=
yyLinizerState
.
tokens
.
at
(
i
-
1
);
const
Token
&
prevPrev
=
yyLinizerState
.
tokens
.
at
(
i
-
2
);
...
...
src/libs/qtcreatorcdbext/containers.cpp
View file @
774fa494
...
...
@@ -534,7 +534,7 @@ StdMapNode *StdMapNode::buildMap(const SymbolGroupValue &n)
static
inline
void
indentStream
(
std
::
ostream
&
os
,
unsigned
indent
)
{
for
(
unsigned
i
=
0
;
i
<
indent
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
indent
;
++
i
)
os
<<
' '
;
}
...
...
@@ -923,7 +923,7 @@ static inline SymbolGroupValueVector qMapNodes(const SymbolGroupValue &v, Vector
SymbolGroupValueVector
rc
;
rc
.
reserve
(
count
);
SymbolGroupValue
n
=
e
[
"forward"
][
unsigned
(
0
)];
for
(
VectorIndexType
i
=
0
;
i
<
count
&&
n
&&
n
.
pointerValue
()
!=
ePtr
;
i
++
)
{
for
(
VectorIndexType
i
=
0
;
i
<
count
&&
n
&&
n
.
pointerValue
()
!=
ePtr
;
++
i
)
{
rc
.
push_back
(
n
);
n
=
n
[
"forward"
][
unsigned
(
0
)];
}
...
...
@@ -986,7 +986,7 @@ static inline AbstractSymbolGroupNodePtrVector
rc
.
reserve
(
count
);
std
::
string
errorMessage
;
SymbolGroup
*
sg
=
v
.
node
()
->
symbolGroup
();
for
(
VectorIndexType
i
=
0
;
i
<
count
;
i
++
)
{
for
(
VectorIndexType
i
=
0
;
i
<
count
;
++
i
)
{
const
ULONG64
nodePtr
=
childNodes
.
at
(
i
).
pointerValue
();
if
(
!
nodePtr
)
return
AbstractSymbolGroupNodePtrVector
();
...
...
src/libs/qtcreatorcdbext/gdbmihelpers.cpp
View file @
774fa494
...
...
@@ -215,7 +215,7 @@ bool threadList(CIDebugSystemObjects *debugSystemObjects,
}
// Create entries
static
WCHAR
name
[
256
];
for
(
ULONG
i
=
0
;
i
<
threadCount
;
i
++
)
{
for
(
ULONG
i
=
0
;
i
<
threadCount
;
++
i
)
{
const
ULONG
id
=
ids
[
i
];
Thread
thread
(
id
,
systemIds
[
i
]);
// Thread name
...
...
@@ -296,7 +296,7 @@ Modules getModules(CIDebugSymbols *syms, std::string *errorMessage)
return
Modules
();
}
for
(
ULONG
m
=
0
;
m
<
count
;
m
++
)
{
for
(
ULONG
m
=
0
;
m
<
count
;
++
m
)
{
Module
module
;
module
.
base
=
parameters
[
m
].
Base
;
module
.
size
=
parameters
[
m
].
Size
;
...
...
@@ -321,7 +321,7 @@ std::string gdbmiModules(CIDebugSymbols *syms, bool humanReadable, std::string *
std
::
ostringstream
str
;
str
<<
'['
<<
std
::
hex
<<
std
::
showbase
;
const
Modules
::
size_type
size
=
modules
.
size
();
for
(
Modules
::
size_type
m
=
0
;
m
<
size
;
m
++
)
{
for
(
Modules
::
size_type
m
=
0
;
m
<
size
;
++
m
)
{
const
Module
&
module
=
modules
.
at
(
m
);
if
(
m
)
str
<<
','
;
...
...
@@ -465,7 +465,7 @@ Registers getRegisters(CIDebugRegisters *regs,
// Standard registers
DEBUG_REGISTER_DESCRIPTION
description
;
DEBUG_VALUE
value
;
for
(
ULONG
r
=
0
;
r
<
registerCount
;
r
++
)
{
for
(
ULONG
r
=
0
;
r
<
registerCount
;
++
r
)
{
hr
=
regs
->
GetDescriptionWide
(
r
,
buf
,
bufSize
,
NULL
,
&
description
);
if
(
FAILED
(
hr
))
{
*
errorMessage
=
msgDebugEngineComFailed
(
"GetDescription"
,
hr
);
...
...
@@ -488,7 +488,7 @@ Registers getRegisters(CIDebugRegisters *regs,
}
// Pseudo
for
(
ULONG
r
=
0
;
r
<
pseudoRegisterCount
;
r
++
)
{
for
(
ULONG
r
=
0
;
r
<
pseudoRegisterCount
;
++
r
)
{
ULONG
type
;
hr
=
regs
->
GetPseudoDescriptionWide
(
r
,
buf
,
bufSize
,
NULL
,
NULL
,
&
type
);
if
(
FAILED
(
hr
))
...
...
@@ -526,7 +526,7 @@ std::string gdbmiRegisters(CIDebugRegisters *regs,
if
(
humanReadable
)
str
<<
'\n'
;
const
Registers
::
size_type
size
=
registers
.
size
();
for
(
Registers
::
size_type
r
=
0
;
r
<
size
;
r
++
)
{
for
(
Registers
::
size_type
r
=
0
;
r
<
size
;
++
r
)
{
const
Register
&
reg
=
registers
.
at
(
r
);
if
(
r
)
str
<<
','
;
...
...
@@ -589,7 +589,7 @@ static StackFrames getStackTrace(CIDebugControl *debugControl,
*
errorMessage
=
msgDebugEngineComFailed
(
"GetStackTrace"
,
hr
);
}
StackFrames
rc
(
frameCount
,
StackFrame
());
for
(
ULONG
f
=
0
;
f
<
frameCount
;
f
++
)
for
(
ULONG
f
=
0
;
f
<
frameCount
;
++
f
)
getFrame
(
debugSymbols
,
frames
[
f
],
&
(
rc
[
f
]));
delete
[]
frames
;
return
rc
;
...
...
@@ -608,7 +608,7 @@ std::string gdbmiStack(CIDebugControl *debugControl,
std
::
ostringstream
str
;
str
<<
'['
;
const
StackFrames
::
size_type
size
=
frames
.
size
();
for
(
StackFrames
::
size_type
i
=
0
;
i
<
size
;
i
++
)
{
for
(
StackFrames
::
size_type
i
=
0
;
i
<
size
;
++
i
)
{
if
(
i
)
str
<<
','
;
frames
.
at
(
i
).
formatGDBMI
(
str
,
(
int
)
i
);
...
...
src/libs/qtcreatorcdbext/stringutils.cpp
View file @
774fa494
...
...
@@ -95,7 +95,7 @@ void simplify(std::string &s)
void
replace
(
std
::
wstring
&
s
,
wchar_t
before
,
wchar_t
after
)
{
const
std
::
wstring
::
size_type
size
=
s
.
size
();
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
i
++
)
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
++
i
)
if
(
s
.
at
(
i
)
==
before
)
s
[
i
]
=
after
;
}
...
...
@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c)
void
gdbmiStringFormat
::
format
(
std
::
ostream
&
str
)
const
{
const
std
::
string
::
size_type
size
=
m_s
.
size
();
for
(
std
::
string
::
size_type
i
=
0
;
i
<
size
;
i
++
)
for
(
std
::
string
::
size_type
i
=
0
;
i
<
size
;
++
i
)
formatGdbmiChar
(
str
,
wchar_t
(
m_s
.
at
(
i
)));
}
void
gdbmiWStringFormat
::
format
(
std
::
ostream
&
str
)
const
{
const
std
::
wstring
::
size_type
size
=
m_w
.
size
();
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
i
++
)
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
++
i
)
formatGdbmiChar
(
str
,
m_w
.
at
(
i
));
}
...
...
@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w)
const
std
::
string
::
size_type
size
=
w
.
size
();
std
::
string
rc
;
rc
.
reserve
(
size
);
for
(
std
::
string
::
size_type
i
=
0
;
i
<
size
;
i
++
)
for
(
std
::
string
::
size_type
i
=
0
;
i
<
size
;
++
i
)
rc
.
push_back
(
char
(
w
.
at
(
i
)));
return
rc
;
}
...
...
@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w)
const
std
::
wstring
::
size_type
size
=
w
.
size
();
std
::
wstring
rc
;
rc
.
reserve
(
size
);
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
i
++
)
for
(
std
::
wstring
::
size_type
i
=
0
;
i
<
size
;
++
i
)
rc
.
push_back
(
w
.
at
(
i
));
return
rc
;
}
...
...
src/libs/qtcreatorcdbext/symbolgroup.cpp
View file @
774fa494
...
...
@@ -278,12 +278,12 @@ static inline InamePathEntrySet expandEntrySet(const std::vector<std::string> &n
InamePathEntrySet
pathEntries
;
const
std
::
string
::
size_type
rootSize
=
root
.
size
();
const
VectorIndexType
nodeCount
=
nodes
.
size
();
for
(
VectorIndexType
i
=
0
;
i
<
nodeCount
;
i
++
)
{
for
(
VectorIndexType
i
=
0
;
i
<
nodeCount
;
++
i
)
{
const
std
::
string
&
iname
=
nodes
.
at
(
i
);
// Silently skip items of another group
if
(
iname
.
size
()
>=
rootSize
&&
iname
.
compare
(
0
,
rootSize
,
root
)
==
0
)
{
std
::
string
::
size_type
pos
=
0
;
// Split a path 'local.foo' and insert (0,'local'), (1,'local.foo') (see above)
for
(
unsigned
level
=
0
;
pos
<
iname
.
size
();
level
++
)
{
for
(
unsigned
level
=
0
;
pos
<
iname
.
size
();
++
level
)
{
std
::
string
::
size_type
dotPos
=
iname
.
find
(
SymbolGroupNodeVisitor
::
iNamePathSeparator
,
pos
);
if
(
dotPos
==
std
::
string
::
npos
)
dotPos
=
iname
.
size
();
...
...
@@ -797,7 +797,7 @@ WatchesSymbolGroup::InameExpressionMap
// Skip additional, expanded nodes
InameExpressionMap
rc
;
if
(
unsigned
size
=
unsigned
(
root
()
->
children
().
size
()))
{
for
(
unsigned
i
=
0
;
i
<
size
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
size
;
++
i
)
{
const
AbstractSymbolGroupNode
*
n
=
root
()
->
childAt
(
i
);
if
(
n
->
testFlags
(
SymbolGroupNode
::
WatchNode
))
rc
.
insert
(
InameExpressionMap
::
value_type
(
n
->
iName
(),
n
->
name
()));
...
...
src/libs/qtcreatorcdbext/symbolgroupnode.cpp
View file @
774fa494
...
...
@@ -47,7 +47,7 @@ enum { BufSize = 2048 };
static
inline
void
indentStream
(
std
::
ostream
&
str
,
unsigned
depth
)
{
for
(
unsigned
d
=
0
;
d
<
depth
;
d
++
)
for
(
unsigned
d
=
0
;
d
<
depth
;
++
d
)
str
<<
" "
;
}
...
...
@@ -126,7 +126,7 @@ unsigned AbstractSymbolGroupNode::indexByIName(const char *n) const
{
const
AbstractSymbolGroupNodePtrVector
&
c
=
children
();
const
VectorIndexType
size
=
c
.
size
();
for
(
VectorIndexType
i
=
0
;
i
<
size
;
i
++
)
for
(
VectorIndexType
i
=
0
;
i
<
size
;
++
i
)
if
(
c
.
at
(
i
)
->
iName
()
==
n
)
return
unsigned
(
i
);
return
unsigned
(
-
1
);
...
...
@@ -170,7 +170,7 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor,
case
SymbolGroupNodeVisitor
::
VisitContinue
:
{
const
AbstractSymbolGroupNodePtrVector
&
c
=
children
();
const
unsigned
childCount
=
unsigned
(
c
.
size
());
for
(
unsigned
i
=
0
;
i
<
childCount
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
childCount
;
++
i
)
if
(
c
.
at
(
i
)
->
accept
(
visitor
,
fullIname
,
i
,
childDepth
))
return
true
;
if
(
!
invisibleRoot
)
...
...
@@ -698,7 +698,7 @@ void SymbolGroupNode::parseParameters(VectorIndexType index,
names
.
reserve
(
size
);
// Pass 1) Determine names. We need the complete set first in order to do some corrections.
const
VectorIndexType
startIndex
=
isTopLevel
?
0
:
index
+
1
;
for
(
VectorIndexType
pos
=
startIndex
-
parameterOffset
;
pos
<
size
;
pos
++
)
{
for
(
VectorIndexType
pos
=
startIndex
-
parameterOffset
;
pos
<
size
;
++
pos
)
{
if
(
vec
.
at
(
pos
).
ParentSymbol
==
index
)
{
const
VectorIndexType
symbolGroupIndex
=
pos
+
parameterOffset
;
if
(
FAILED
(
m_symbolGroup
->
debugSymbolGroup
()
->
GetSymbolName
(
ULONG
(
symbolGroupIndex
),
buf
,
BufSize
,
&
obtainedSize
)))
...
...
@@ -711,7 +711,7 @@ void SymbolGroupNode::parseParameters(VectorIndexType index,
fixNames
(
isTopLevel
,
&
names
,
&
inames
);
// Pass 3): Add nodes with fixed names
StringVector
::
size_type
nameIndex
=
0
;
for
(
VectorIndexType
pos
=
startIndex
-
parameterOffset
;
pos
<
size
;
pos
++
)
{
for
(
VectorIndexType
pos
=
startIndex
-
parameterOffset
;
pos
<
size
;
++
pos
)
{
if
(
vec
.
at
(
pos
).
ParentSymbol
==
index
)
{
const
VectorIndexType
symbolGroupIndex
=
pos
+
parameterOffset
;
SymbolGroupNode
*
child
=
new
SymbolGroupNode
(
m_symbolGroup
,
...
...
@@ -1173,7 +1173,7 @@ ULONG SymbolGroupNode::nextSymbolIndex() const
const
AbstractSymbolGroupNodePtrVector
&
siblings
=
sParent
->
children
();
// Find any 'real' SymbolGroupNode to our right.
const
unsigned
size
=
unsigned
(
siblings
.
size
());
for
(
unsigned
i
=
myIndex
+
1
;
i
<
size
;
i
++
)
for
(
unsigned
i
=
myIndex
+
1
;
i
<
size
;
++
i
)
if
(
const
SymbolGroupNode
*
s
=
siblings
.
at
(
i
)
->
asSymbolGroupNode
())
return
s
->
index
();
return
sParent
->
nextSymbolIndex
();
...
...
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
View file @
774fa494
...
...
@@ -99,7 +99,7 @@ static void formatNodeError(const AbstractSymbolGroupNode *n, std::ostream &os)
}
if
(
size
)
{
os
<<
"children ("
<<
size
<<
"): ["
;
for
(
VectorIndexType
i
=
0
;
i
<
size
;
i
++
)
for
(
VectorIndexType
i
=
0
;
i
<
size
;
++
i
)
os
<<
' '
<<
children
.
at
(
i
)
->
name
();
os
<<
']'
;
}
else
{
...
...
src/plugins/analyzerbase/analyzersettings.cpp
View file @
774fa494
...
...
@@ -48,7 +48,7 @@
using
namespace
Analyzer
;
using
namespace
Analyzer
::
Internal
;
static
const
QLatin1String
groupC
(
"Analyzer"
)
;
static
const
char
groupC
[]
=
"Analyzer"
;
AnalyzerGlobalSettings
*
AnalyzerGlobalSettings
::
m_instance
=
0
;
...
...
@@ -125,7 +125,7 @@ void AnalyzerGlobalSettings::readSettings()
QVariantMap
map
;
settings
->
beginGroup
(
groupC
);
settings
->
beginGroup
(
QLatin1String
(
groupC
)
)
;
// read the values from config, using the keys from the defaults value map
const
QVariantMap
def
=
defaults
();
for
(
QVariantMap
::
ConstIterator
it
=
def
.
constBegin
();
it
!=
def
.
constEnd
();
++
it
)
...
...
@@ -139,7 +139,7 @@ void AnalyzerGlobalSettings::readSettings()
void
AnalyzerGlobalSettings
::
writeSettings
()
const
{
QSettings
*
settings
=
Core
::
ICore
::
instance
()
->
settings
();
settings
->
beginGroup
(
groupC
);
settings
->
beginGroup
(
QLatin1String
(
groupC
)
)
;
const
QVariantMap
map
=
toMap
();
for
(
QVariantMap
::
ConstIterator
it
=
map
.
begin
();
it
!=
map
.
end
();
++
it
)
settings
->
setValue
(
it
.
key
(),
it
.
value
());
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
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