Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
774fa494
Commit
774fa494
authored
Apr 19, 2011
by
Friedemann Kleint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more krazy warnings.
parent
cca52b6d
Changes
66
Show whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
137 additions
and
136 deletions
+137
-136
share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp
...creator/qml/qmljsdebugger/editor/abstractliveedittool.cpp
+5
-5
share/qtcreator/qml/qmljsdebugger/editor/liveselectionindicator.cpp
...eator/qml/qmljsdebugger/editor/liveselectionindicator.cpp
+1
-1
share/qtcreator/qml/qmljsdebugger/editor/liveselectiontool.cpp
.../qtcreator/qml/qmljsdebugger/editor/liveselectiontool.cpp
+1
-1
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
.../qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
+4
-3
share/qtcreator/qml/qmlobserver/main.cpp
share/qtcreator/qml/qmlobserver/main.cpp
+2
-2
share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp
share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp
+3
-2
share/qtcreator/qml/qmlobserver/qmlruntime.cpp
share/qtcreator/qml/qmlobserver/qmlruntime.cpp
+4
-4
src/libs/cplusplus/Macro.cpp
src/libs/cplusplus/Macro.cpp
+1
-1
src/libs/cplusplus/pp-engine.cpp
src/libs/cplusplus/pp-engine.cpp
+1
-1
src/libs/qmleditorwidgets/colorbox.cpp
src/libs/qmleditorwidgets/colorbox.cpp
+4
-3
src/libs/qmleditorwidgets/colorbutton.cpp
src/libs/qmleditorwidgets/colorbutton.cpp
+4
-3
src/libs/qmljs/qmljscodeformatter.cpp
src/libs/qmljs/qmljscodeformatter.cpp
+1
-1
src/libs/qmljs/qmljslineinfo.cpp
src/libs/qmljs/qmljslineinfo.cpp
+1
-1
src/libs/qtcreatorcdbext/containers.cpp
src/libs/qtcreatorcdbext/containers.cpp
+3
-3
src/libs/qtcreatorcdbext/gdbmihelpers.cpp
src/libs/qtcreatorcdbext/gdbmihelpers.cpp
+8
-8
src/libs/qtcreatorcdbext/stringutils.cpp
src/libs/qtcreatorcdbext/stringutils.cpp
+5
-5
src/libs/qtcreatorcdbext/symbolgroup.cpp
src/libs/qtcreatorcdbext/symbolgroup.cpp
+3
-3
src/libs/qtcreatorcdbext/symbolgroupnode.cpp
src/libs/qtcreatorcdbext/symbolgroupnode.cpp
+6
-6
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
+1
-1
src/plugins/analyzerbase/analyzersettings.cpp
src/plugins/analyzerbase/analyzersettings.cpp
+3
-3
src/plugins/analyzerbase/ianalyzertool.h
src/plugins/analyzerbase/ianalyzertool.h
+1
-1
src/plugins/classview/classviewparser.cpp
src/plugins/classview/classviewparser.cpp
+1
-1
src/plugins/coreplugin/actionmanager/actionmanager.cpp
src/plugins/coreplugin/actionmanager/actionmanager.cpp
+3
-3
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/coreplugin/editormanager/editormanager.cpp
+6
-6
src/plugins/cppeditor/cppchecksymbols.cpp
src/plugins/cppeditor/cppchecksymbols.cpp
+1
-2
src/plugins/cpptools/cppcodeformatter.cpp
src/plugins/cpptools/cppcodeformatter.cpp
+1
-1
src/plugins/debugger/debuggerstreamops.cpp
src/plugins/debugger/debuggerstreamops.cpp
+3
-3
src/plugins/debugger/gdb/codagdbadapter.cpp
src/plugins/debugger/gdb/codagdbadapter.cpp
+1
-1
src/plugins/designer/codemodelhelpers.cpp
src/plugins/designer/codemodelhelpers.cpp
+1
-1
src/plugins/designer/formeditorw.cpp
src/plugins/designer/formeditorw.cpp
+2
-2
src/plugins/designer/qtcreatorintegration.cpp
src/plugins/designer/qtcreatorintegration.cpp
+2
-2
src/plugins/find/findplugin.cpp
src/plugins/find/findplugin.cpp
+1
-1
src/plugins/help/centralwidget.cpp
src/plugins/help/centralwidget.cpp
+1
-1
src/plugins/help/helpviewer_qwv.cpp
src/plugins/help/helpviewer_qwv.cpp
+1
-1
src/plugins/macros/macroevent.cpp
src/plugins/macros/macroevent.cpp
+1
-1
src/plugins/macros/macromanager.cpp
src/plugins/macros/macromanager.cpp
+1
-1
src/plugins/projectexplorer/baseprojectwizarddialog.cpp
src/plugins/projectexplorer/baseprojectwizarddialog.cpp
+1
-1
src/plugins/projectexplorer/buildstepspage.cpp
src/plugins/projectexplorer/buildstepspage.cpp
+1
-1
src/plugins/projectexplorer/gcctoolchain.cpp
src/plugins/projectexplorer/gcctoolchain.cpp
+1
-1
src/plugins/projectexplorer/gnumakeparser.cpp
src/plugins/projectexplorer/gnumakeparser.cpp
+1
-1
src/plugins/projectexplorer/gnumakeparser.h
src/plugins/projectexplorer/gnumakeparser.h
+1
-1
src/plugins/projectexplorer/msvctoolchain.cpp
src/plugins/projectexplorer/msvctoolchain.cpp
+2
-2
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+1
-1
src/plugins/qmldesigner/components/formeditor/anchorlinecontroller.cpp
...mldesigner/components/formeditor/anchorlinecontroller.cpp
+2
-2
src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp
...r/components/integration/designdocumentcontrollerview.cpp
+1
-1
src/plugins/qmldesigner/components/logger/logger.cpp
src/plugins/qmldesigner/components/logger/logger.cpp
+2
-2
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
...s/qmldesigner/components/navigator/navigatortreemodel.cpp
+2
-2
src/plugins/qmldesigner/designercore/instances/instancecontainer.cpp
.../qmldesigner/designercore/instances/instancecontainer.cpp
+1
-1
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
...lugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+1
-1
src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
...qmldesigner/designercore/metainfo/subcomponentmanager.cpp
+4
-4
src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
+2
-2
src/plugins/qmljseditor/qmljsfindreferences.cpp
src/plugins/qmljseditor/qmljsfindreferences.cpp
+2
-2
src/plugins/qmljsinspector/qmljsinspector.cpp
src/plugins/qmljsinspector/qmljsinspector.cpp
+2
-2
src/plugins/qmljsinspector/qmljslivetextpreview.cpp
src/plugins/qmljsinspector/qmljslivetextpreview.cpp
+2
-2
src/plugins/qmljsinspector/qmljspropertyinspector.cpp
src/plugins/qmljsinspector/qmljspropertyinspector.cpp
+1
-1
src/plugins/qmljstools/qmljsmodelmanager.cpp
src/plugins/qmljstools/qmljsmodelmanager.cpp
+2
-2
src/plugins/qt4projectmanager/qmakestep.cpp
src/plugins/qt4projectmanager/qmakestep.cpp
+1
-1
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
+1
-1
src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp
src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp
+4
-4
src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+1
-1
src/plugins/qt4projectmanager/qt4nodes.cpp
src/plugins/qt4projectmanager/qt4nodes.cpp
+1
-1
src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
+1
-1
src/plugins/qt4projectmanager/wizards/librarywizard.cpp
src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+1
-1
src/plugins/texteditor/generichighlighter/highlighter.cpp
src/plugins/texteditor/generichighlighter/highlighter.cpp
+3
-3
src/tools/gen-cpp-ast/generate-ast.cpp
src/tools/gen-cpp-ast/generate-ast.cpp
+3
-5
src/tools/qtcreatorwidgets/customwidgets.cpp
src/tools/qtcreatorwidgets/customwidgets.cpp
+1
-1
No files found.
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
());
...
...
src/plugins/analyzerbase/ianalyzertool.h
View file @
774fa494
...
...
@@ -75,7 +75,7 @@ public:
virtual
QString
displayName
()
const
=
0
;
/**
* The mode in which this tool should
be run
prefer
r
ably
* The mode in which this tool should preferably
be run
*
* memcheck, for example, requires debug symbols, hence DebugMode is preferred.
* otoh callgrind should look at optimized code, hence ReleaseMode.
...
...
src/plugins/classview/classviewparser.cpp
View file @
774fa494
...
...
@@ -436,7 +436,7 @@ ParserTreeItem::ConstPtr Parser::getParseDocumentTree(const CPlusPlus::Document:
ParserTreeItem
::
Ptr
itemPtr
(
new
ParserTreeItem
());
unsigned
total
=
doc
->
globalSymbolCount
();
for
(
unsigned
i
=
0
;
i
<
total
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
total
;
++
i
)
addSymbol
(
itemPtr
,
doc
->
globalSymbolAt
(
i
));
QWriteLocker
locker
(
&
d_ptr
->
docLocker
);
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
774fa494
...
...
@@ -484,9 +484,9 @@ ActionContainer *ActionManagerPrivate::actionContainer(int uid) const
return
it
.
value
();
}
static
const
char
*
settingsGroup
=
"KeyBindings"
;
static
const
char
*
idKey
=
"ID"
;
static
const
char
*
sequenceKey
=
"Keysequence"
;
static
const
char
settingsGroup
[]
=
"KeyBindings"
;
static
const
char
idKey
[]
=
"ID"
;
static
const
char
sequenceKey
[]
=
"Keysequence"
;
void
ActionManagerPrivate
::
initialize
()
{
...
...
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
774fa494
...
...
@@ -85,10 +85,10 @@
enum
{
debugEditorManager
=
0
};
static
const
char
*
const
kCurrentDocumentFilePath
=
"CurrentDocument:FilePath"
;
static
const
char
*
const
kCurrentDocumentPath
=
"CurrentDocument:Path"
;
static
const
char
*
const
kCurrentDocumentXPos
=
"CurrentDocument:XPos"
;
static
const
char
*
const
kCurrentDocumentYPos
=
"CurrentDocument:YPos"
;
static
const
char
kCurrentDocumentFilePath
[]
=
"CurrentDocument:FilePath"
;
static
const
char
kCurrentDocumentPath
[]
=
"CurrentDocument:Path"
;
static
const
char
kCurrentDocumentXPos
[]
=
"CurrentDocument:XPos"
;
static
const
char
kCurrentDocumentYPos
[]
=
"CurrentDocument:YPos"
;
static
inline
ExtensionSystem
::
PluginManager
*
pluginManager
()
{
...
...
@@ -1794,8 +1794,8 @@ bool EditorManager::restoreState(const QByteArray &state)
return
true
;
}
static
const
char
*
const
documentStatesKey
=
"EditorManager/DocumentStates"
;
static
const
char
*
const
reloadBehaviorKey
=
"EditorManager/ReloadBehavior"
;
static
const
char
documentStatesKey
[]
=
"EditorManager/DocumentStates"
;
static
const
char
reloadBehaviorKey
[]
=
"EditorManager/ReloadBehavior"
;
void
EditorManager
::
saveSettings
()
{
...
...
src/plugins/cppeditor/cppchecksymbols.cpp
View file @
774fa494
...
...
@@ -787,8 +787,7 @@ bool CheckSymbols::visit(FunctionDefinitionAST *ast)
accept
(
ast
->
function_body
);
const
LocalSymbols
locals
(
_doc
,
ast
);
QList
<
SemanticInfo
::
Use
>
uses
;
foreach
(
uses
,
locals
.
uses
)
{
foreach
(
const
QList
<
SemanticInfo
::
Use
>
&
uses
,
locals
.
uses
)
{
foreach
(
const
SemanticInfo
::
Use
&
u
,
uses
)
addUse
(
u
);
}
...
...
src/plugins/cpptools/cppcodeformatter.cpp
View file @
774fa494
...
...
@@ -937,7 +937,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
<<
s
.
savedPaddingDepth
;
}