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
Hide 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)
...
@@ -165,10 +165,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
if
(
gfxObject
)
{
if
(
gfxObject
)
{
className
=
gfxObject
->
metaObject
()
->
className
();
className
=
gfxObject
->
metaObject
()
->
className
();
className
.
re
plac
e
(
QRegExp
(
"_QMLTYPE_
\\
d+"
)
,
""
);
className
.
re
mov
e
(
QRegExp
(
"_QMLTYPE_
\\
d+"
));
className
.
re
plac
e
(
QRegExp
(
"_QML_
\\
d+"
)
,
""
);
className
.
re
mov
e
(
QRegExp
(
"_QML_
\\
d+"
));
if
(
className
.
startsWith
(
QLatin1String
(
"QDeclarative"
)))
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
);
QDeclarativeItem
*
declarativeItem
=
qobject_cast
<
QDeclarativeItem
*>
(
gfxObject
);
if
(
declarativeItem
)
{
if
(
declarativeItem
)
{
...
@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
...
@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
}
}
if
(
!
objectStringId
.
isEmpty
())
{
if
(
!
objectStringId
.
isEmpty
())
{
constructedName
=
objectStringId
+
" ("
+
className
+
")"
;
constructedName
=
objectStringId
+
" ("
+
className
+
QLatin1Char
(
')'
)
;
}
else
{
}
else
{
if
(
!
gfxObject
->
objectName
().
isEmpty
())
{
if
(
!
gfxObject
->
objectName
().
isEmpty
())
{
constructedName
=
gfxObject
->
objectName
()
+
" ("
+
className
+
")"
;
constructedName
=
gfxObject
->
objectName
()
+
" ("
+
className
+
QLatin1Char
(
')'
)
;
}
else
{
}
else
{
constructedName
=
className
;
constructedName
=
className
;
}
}
...
...
share/qtcreator/qml/qmljsdebugger/editor/liveselectionindicator.cpp
View file @
774fa494
...
@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
...
@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
// set selections to also all children if they are not editor items
// 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
())
if
(
object
.
isNull
())
continue
;
continue
;
...
...
share/qtcreator/qml/qmljsdebugger/editor/liveselectiontool.cpp
View file @
774fa494
...
@@ -382,7 +382,7 @@ void LiveSelectionTool::clear()
...
@@ -382,7 +382,7 @@ void LiveSelectionTool::clear()
void
LiveSelectionTool
::
selectedItemsChanged
(
const
QList
<
QGraphicsItem
*>
&
itemList
)
void
LiveSelectionTool
::
selectedItemsChanged
(
const
QList
<
QGraphicsItem
*>
&
itemList
)
{
{
foreach
(
QWeakPointer
<
QGraphicsObject
>
obj
,
m_selectedItemList
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
obj
,
m_selectedItemList
)
{
if
(
!
obj
.
isNull
())
{
if
(
!
obj
.
isNull
())
{
disconnect
(
obj
.
data
(),
SIGNAL
(
xChanged
()),
this
,
SLOT
(
repaintBoundingRects
()));
disconnect
(
obj
.
data
(),
SIGNAL
(
xChanged
()),
this
,
SLOT
(
repaintBoundingRects
()));
disconnect
(
obj
.
data
(),
SIGNAL
(
yChanged
()),
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
...
@@ -407,7 +407,8 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb
QString
imports
;
QString
imports
;
foreach
(
const
QString
&
s
,
importList
)
{
foreach
(
const
QString
&
s
,
importList
)
{
imports
+=
s
+
"
\n
"
;
imports
+=
s
;
imports
+=
QLatin1Char
(
'\n'
);
}
}
QDeclarativeContext
*
parentContext
=
view
->
engine
()
->
contextForObject
(
parent
);
QDeclarativeContext
*
parentContext
=
view
->
engine
()
->
contextForObject
(
parent
);
...
@@ -574,7 +575,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
...
@@ -574,7 +575,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
void
QDeclarativeViewObserverPrivate
::
setSelectedItemsForTools
(
QList
<
QGraphicsItem
*>
items
)
void
QDeclarativeViewObserverPrivate
::
setSelectedItemsForTools
(
QList
<
QGraphicsItem
*>
items
)
{
{
foreach
(
QWeakPointer
<
QGraphicsObject
>
obj
,
currentSelection
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
obj
,
currentSelection
)
{
if
(
QGraphicsItem
*
item
=
obj
.
data
())
{
if
(
QGraphicsItem
*
item
=
obj
.
data
())
{
if
(
!
items
.
contains
(
item
))
{
if
(
!
items
.
contains
(
item
))
{
QObject
::
disconnect
(
obj
.
data
(),
SIGNAL
(
destroyed
(
QObject
*
)),
QObject
::
disconnect
(
obj
.
data
(),
SIGNAL
(
destroyed
(
QObject
*
)),
...
@@ -603,7 +604,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(QList<QGraphicsItem *> it
...
@@ -603,7 +604,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(QList<QGraphicsItem *> it
setSelectedItemsForTools
(
items
);
setSelectedItemsForTools
(
items
);
if
(
oldList
!=
currentSelection
)
{
if
(
oldList
!=
currentSelection
)
{
QList
<
QObject
*>
objectList
;
QList
<
QObject
*>
objectList
;
foreach
(
QWeakPointer
<
QGraphicsObject
>
graphicsObject
,
currentSelection
)
{
foreach
(
const
QWeakPointer
<
QGraphicsObject
>
&
graphicsObject
,
currentSelection
)
{
if
(
graphicsObject
)
if
(
graphicsObject
)
objectList
<<
graphicsObject
.
data
();
objectList
<<
graphicsObject
.
data
();
}
}
...
...
share/qtcreator/qml/qmlobserver/main.cpp
View file @
774fa494
...
@@ -477,10 +477,10 @@ static QDeclarativeViewer *createViewer()
...
@@ -477,10 +477,10 @@ static QDeclarativeViewer *createViewer()
if
(
opts
.
experimentalGestures
)
if
(
opts
.
experimentalGestures
)
viewer
->
enableExperimentalGestures
();
viewer
->
enableExperimentalGestures
();
foreach
(
QString
lib
,
opts
.
imports
)
foreach
(
const
QString
&
lib
,
opts
.
imports
)
viewer
->
addLibraryPath
(
lib
);
viewer
->
addLibraryPath
(
lib
);
foreach
(
QString
plugin
,
opts
.
plugins
)
foreach
(
const
QString
&
plugin
,
opts
.
plugins
)
viewer
->
addPluginPath
(
plugin
);
viewer
->
addPluginPath
(
plugin
);
viewer
->
setNetworkCacheSize
(
opts
.
cache
);
viewer
->
setNetworkCacheSize
(
opts
.
cache
);
...
...
share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp
View file @
774fa494
...
@@ -217,8 +217,9 @@ void QDeclarativeTester::save()
...
@@ -217,8 +217,9 @@ void QDeclarativeTester::save()
if
(
!
fe
.
hash
.
isEmpty
())
{
if
(
!
fe
.
hash
.
isEmpty
())
{
ts
<<
" hash:
\"
"
<<
fe
.
hash
.
toHex
()
<<
"
\"\n
"
;
ts
<<
" hash:
\"
"
<<
fe
.
hash
.
toHex
()
<<
"
\"\n
"
;
}
else
if
(
!
fe
.
image
.
isNull
())
{
}
else
if
(
!
fe
.
image
.
isNull
())
{
QString
filename
=
filenameInfo
.
baseName
()
+
"."
+
QString
::
number
(
imgCount
)
+
".png"
;
QString
filename
=
filenameInfo
.
baseName
()
+
QLatin1Char
(
'.'
)
fe
.
image
.
save
(
m_script
+
"."
+
QString
::
number
(
imgCount
)
+
".png"
);
+
QString
::
number
(
imgCount
)
+
".png"
;
fe
.
image
.
save
(
m_script
+
QLatin1Char
(
'.'
)
+
QString
::
number
(
imgCount
)
+
".png"
);
imgCount
++
;
imgCount
++
;
ts
<<
" image:
\"
"
<<
filename
<<
"
\"\n
"
;
ts
<<
" image:
\"
"
<<
filename
<<
"
\"\n
"
;
}
}
...
...
share/qtcreator/qml/qmlobserver/qmlruntime.cpp
View file @
774fa494
...
@@ -459,10 +459,10 @@ private:
...
@@ -459,10 +459,10 @@ private:
QMutexLocker
lock
(
&
mutex
);
QMutexLocker
lock
(
&
mutex
);
QList
<
QNetworkCookie
>
list
=
allCookies
();
QList
<
QNetworkCookie
>
list
=
allCookies
();
QByteArray
data
;
QByteArray
data
;
foreach
(
QNetworkCookie
cookie
,
list
)
{
foreach
(
const
QNetworkCookie
&
cookie
,
list
)
{
if
(
!
cookie
.
isSessionCookie
())
{
if
(
!
cookie
.
isSessionCookie
())
{
data
.
append
(
cookie
.
toRawForm
());
data
.
append
(
cookie
.
toRawForm
());
data
.
append
(
"
\n
"
);
data
.
append
(
'
\n
'
);
}
}
}
}
QSettings
settings
;
QSettings
settings
;
...
@@ -1036,7 +1036,7 @@ void QDeclarativeViewer::chooseRecordingOptions()
...
@@ -1036,7 +1036,7 @@ void QDeclarativeViewer::chooseRecordingOptions()
// Rate
// Rate
record_rate
=
recdlg
->
videoRate
();
record_rate
=
recdlg
->
videoRate
();
// Profile
// 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)
...
@@ -1458,7 +1458,7 @@ void QDeclarativeViewer::setRecording(bool on)
}
}
progress
.
setValue
(
progress
.
maximum
()
-
1
);
progress
.
setValue
(
progress
.
maximum
()
-
1
);
foreach
(
QString
name
,
inputs
)
foreach
(
const
QString
&
name
,
inputs
)
QFile
::
remove
(
name
);
QFile
::
remove
(
name
);
frames
.
clear
();
frames
.
clear
();
...
...
src/libs/cplusplus/Macro.cpp
View file @
774fa494
...
@@ -73,7 +73,7 @@ QString Macro::toString() const
...
@@ -73,7 +73,7 @@ QString Macro::toString() const
if
(
f
.
_functionLike
)
{
if
(
f
.
_functionLike
)
{
text
+=
QLatin1Char
(
'('
);
text
+=
QLatin1Char
(
'('
);
bool
first
=
true
;
bool
first
=
true
;
foreach
(
const
QByteArray
formal
,
_formals
)
{
foreach
(
const
QByteArray
&
formal
,
_formals
)
{
if
(
!
first
)
if
(
!
first
)
text
+=
QLatin1String
(
", "
);
text
+=
QLatin1String
(
", "
);
else
else
...
...
src/libs/cplusplus/pp-engine.cpp
View file @
774fa494
...
@@ -1168,7 +1168,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok
...
@@ -1168,7 +1168,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok
if
(
macro
.
isFunctionLike
())
{
if
(
macro
.
isFunctionLike
())
{
macroId
+=
'('
;
macroId
+=
'('
;
bool
fst
=
true
;
bool
fst
=
true
;
foreach
(
const
QByteArray
formal
,
macro
.
formals
())
{
foreach
(
const
QByteArray
&
formal
,
macro
.
formals
())
{
if
(
!
fst
)
if
(
!
fst
)
macroId
+=
", "
;
macroId
+=
", "
;
fst
=
false
;
fst
=
false
;
...
...
src/libs/qmleditorwidgets/colorbox.cpp
View file @
774fa494
...
@@ -50,11 +50,12 @@ static inline QColor properColor(const QString &str)
...
@@ -50,11 +50,12 @@ static inline QColor properColor(const QString &str)
return
QColor
();
return
QColor
();
int
lalpha
=
255
;
int
lalpha
=
255
;
QString
lcolorStr
=
str
;
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
;
QString
alphaStr
=
lcolorStr
;
alphaStr
.
truncate
(
3
);
alphaStr
.
truncate
(
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
=
"#"
+
lcolorStr
;
lcolorStr
=
hash
+
lcolorStr
;
alphaStr
.
remove
(
0
,
1
);
alphaStr
.
remove
(
0
,
1
);
bool
v
;
bool
v
;
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
...
@@ -62,7 +63,7 @@ static inline QColor properColor(const QString &str)
...
@@ -62,7 +63,7 @@ static inline QColor properColor(const QString &str)
lalpha
=
255
;
lalpha
=
255
;
}
}
QColor
lcolor
(
lcolorStr
);
QColor
lcolor
(
lcolorStr
);
if
(
lcolorStr
.
contains
(
'#'
))
if
(
lcolorStr
.
contains
(
hash
))
lcolor
.
setAlpha
(
lalpha
);
lcolor
.
setAlpha
(
lalpha
);
return
lcolor
;
return
lcolor
;
}
}
...
...
src/libs/qmleditorwidgets/colorbutton.cpp
View file @
774fa494
...
@@ -72,11 +72,12 @@ static inline QColor properColor(const QString &str)
...
@@ -72,11 +72,12 @@ static inline QColor properColor(const QString &str)
return
QColor
();
return
QColor
();
int
lalpha
=
255
;
int
lalpha
=
255
;
QString
lcolorStr
=
str
;
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
;
QString
alphaStr
=
lcolorStr
;
alphaStr
.
truncate
(
3
);
alphaStr
.
truncate
(
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
.
remove
(
0
,
3
);
lcolorStr
=
"#"
+
lcolorStr
;
lcolorStr
=
hash
+
lcolorStr
;
alphaStr
.
remove
(
0
,
1
);
alphaStr
.
remove
(
0
,
1
);
bool
v
;
bool
v
;
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
lalpha
=
alphaStr
.
toInt
(
&
v
,
16
);
...
@@ -84,7 +85,7 @@ static inline QColor properColor(const QString &str)
...
@@ -84,7 +85,7 @@ static inline QColor properColor(const QString &str)
lalpha
=
255
;
lalpha
=
255
;
}
}
QColor
lcolor
(
lcolorStr
);
QColor
lcolor
(
lcolorStr
);
if
(
lcolorStr
.
contains
(
'#'
))
if
(
lcolorStr
.
contains
(
hash
))
lcolor
.
setAlpha
(
lalpha
);
lcolor
.
setAlpha
(
lalpha
);
return
lcolor
;
return
lcolor
;
}
}
...
...
src/libs/qmljs/qmljscodeformatter.cpp
View file @
774fa494
...
@@ -940,7 +940,7 @@ void CodeFormatter::dump() const
...
@@ -940,7 +940,7 @@ void CodeFormatter::dump() const
qDebug
()
<<
"Current token index"
<<
m_tokenIndex
;
qDebug
()
<<
"Current token index"
<<
m_tokenIndex
;
qDebug
()
<<
"Current state:"
;
qDebug
()
<<
"Current state:"
;
foreach
(
State
s
,
m_currentState
)
{
foreach
(
const
State
&
s
,
m_currentState
)
{
qDebug
()
<<
metaEnum
.
valueToKey
(
s
.
type
)
<<
s
.
savedIndentDepth
;
qDebug
()
<<
metaEnum
.
valueToKey
(
s
.
type
)
<<
s
.
savedIndentDepth
;
}
}
qDebug
()
<<
"Current indent depth:"
<<
m_indentDepth
;
qDebug
()
<<
"Current indent depth:"
<<
m_indentDepth
;
...
...
src/libs/qmljs/qmljslineinfo.cpp
View file @
774fa494
...
@@ -204,7 +204,7 @@ QString LineInfo::trimmedCodeLine(const QString &t)
...
@@ -204,7 +204,7 @@ QString LineInfo::trimmedCodeLine(const QString &t)
if
(
yyLinizerState
.
leftBraceFollows
&&
!
text
.
isEmpty
()
&&
text
.
at
(
0
).
isUpper
())
{
if
(
yyLinizerState
.
leftBraceFollows
&&
!
text
.
isEmpty
()
&&
text
.
at
(
0
).
isUpper
())
{
int
i
=
index
;
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
)
{
while
(
i
>=
2
)
{
const
Token
&
prev
=
yyLinizerState
.
tokens
.
at
(
i
-
1
);
const
Token
&
prev
=
yyLinizerState
.
tokens
.
at
(
i
-
1
);
const
Token
&
prevPrev
=
yyLinizerState
.
tokens
.
at
(
i
-
2
);
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)
...
@@ -534,7 +534,7 @@ StdMapNode *StdMapNode::buildMap(const SymbolGroupValue &n)
static
inline
void
indentStream
(
std
::
ostream
&
os
,
unsigned
indent
)
static
inline
void
indentStream
(
std
::
ostream
&
os
,
unsigned
indent
)
{
{
for
(
unsigned
i
=
0
;
i
<
indent
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
indent
;
++
i
)
os
<<
' '
;
os
<<
' '
;
}
}
...
@@ -923,7 +923,7 @@ static inline SymbolGroupValueVector qMapNodes(const SymbolGroupValue &v, Vector
...
@@ -923,7 +923,7 @@ static inline SymbolGroupValueVector qMapNodes(const SymbolGroupValue &v, Vector
SymbolGroupValueVector
rc
;
SymbolGroupValueVector
rc
;
rc
.
reserve
(
count
);
rc
.
reserve
(
count
);
SymbolGroupValue
n
=
e
[
"forward"
][
unsigned
(
0
)];
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
);
rc
.
push_back
(
n
);
n
=
n
[
"forward"
][
unsigned
(
0
)];
n
=
n
[
"forward"
][
unsigned
(
0
)];
}
}
...
@@ -986,7 +986,7 @@ static inline AbstractSymbolGroupNodePtrVector
...
@@ -986,7 +986,7 @@ static inline AbstractSymbolGroupNodePtrVector
rc
.
reserve
(
count
);
rc
.
reserve
(
count
);
std
::
string
errorMessage
;
std
::
string
errorMessage
;
SymbolGroup
*
sg
=
v
.
node
()
->
symbolGroup
();
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
();
const
ULONG64
nodePtr
=
childNodes
.
at
(
i
).
pointerValue
();
if
(
!
nodePtr
)
if
(
!
nodePtr
)
return
AbstractSymbolGroupNodePtrVector
();
return
AbstractSymbolGroupNodePtrVector
();
...
...
src/libs/qtcreatorcdbext/gdbmihelpers.cpp
View file @
774fa494
...
@@ -215,7 +215,7 @@ bool threadList(CIDebugSystemObjects *debugSystemObjects,
...
@@ -215,7 +215,7 @@ bool threadList(CIDebugSystemObjects *debugSystemObjects,
}
}
// Create entries
// Create entries
static
WCHAR
name
[
256
];
static
WCHAR
name
[
256
];
for
(
ULONG
i
=
0
;
i
<
threadCount
;
i
++
)
{
for
(
ULONG
i
=
0
;
i
<
threadCount
;
++
i
)
{
const
ULONG
id
=
ids
[
i
];
const
ULONG
id
=
ids
[
i
];
Thread
thread
(
id
,
systemIds
[
i
]);
Thread
thread
(
id
,
systemIds
[
i
]);
// Thread name
// Thread name
...
@@ -296,7 +296,7 @@ Modules getModules(CIDebugSymbols *syms, std::string *errorMessage)
...
@@ -296,7 +296,7 @@ Modules getModules(CIDebugSymbols *syms, std::string *errorMessage)
return
Modules
();
return
Modules
();
}
}
for
(
ULONG
m
=
0
;
m
<
count
;
m
++
)
{
for
(
ULONG
m
=
0
;
m
<
count
;
++
m
)
{
Module
module
;
Module
module
;
module
.
base
=
parameters
[
m
].
Base
;
module
.
base
=
parameters
[
m
].
Base
;
module
.
size
=
parameters
[
m
].
Size
;
module
.
size
=
parameters
[
m
].
Size
;
...
@@ -321,7 +321,7 @@ std::string gdbmiModules(CIDebugSymbols *syms, bool humanReadable, std::string *
...
@@ -321,7 +321,7 @@ std::string gdbmiModules(CIDebugSymbols *syms, bool humanReadable, std::string *
std
::
ostringstream
str
;
std
::
ostringstream
str
;
str
<<
'['
<<
std
::
hex
<<
std
::
showbase
;
str
<<
'['
<<
std
::
hex
<<
std
::
showbase
;
const
Modules
::
size_type
size
=
modules
.
size
();
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
);
const
Module
&
module
=
modules
.
at
(
m
);
if
(
m
)
if
(
m
)
str
<<
','
;
str
<<
','
;
...
@@ -465,7 +465,7 @@ Registers getRegisters(CIDebugRegisters *regs,
...
@@ -465,7 +465,7 @@ Registers getRegisters(CIDebugRegisters *regs,
// Standard registers
// Standard registers
DEBUG_REGISTER_DESCRIPTION
description
;
DEBUG_REGISTER_DESCRIPTION
description
;
DEBUG_VALUE
value
;
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
);
hr
=
regs
->
GetDescriptionWide
(
r
,
buf
,
bufSize
,
NULL
,
&
description
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
*
errorMessage
=
msgDebugEngineComFailed
(
"GetDescription"
,
hr
);
*
errorMessage
=
msgDebugEngineComFailed
(
"GetDescription"
,
hr
);
...
@@ -488,7 +488,7 @@ Registers getRegisters(CIDebugRegisters *regs,
...
@@ -488,7 +488,7 @@ Registers getRegisters(CIDebugRegisters *regs,
}
}
// Pseudo
// Pseudo
for
(
ULONG
r
=
0
;
r
<
pseudoRegisterCount
;
r
++
)
{
for
(
ULONG
r
=
0
;
r
<
pseudoRegisterCount
;
++
r
)
{
ULONG
type
;
ULONG
type
;
hr
=
regs
->
GetPseudoDescriptionWide
(
r
,
buf
,
bufSize
,
NULL
,
NULL
,
&
type
);
hr
=
regs
->
GetPseudoDescriptionWide
(
r
,
buf
,
bufSize
,
NULL
,
NULL
,
&
type
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -526,7 +526,7 @@ std::string gdbmiRegisters(CIDebugRegisters *regs,
...
@@ -526,7 +526,7 @@ std::string gdbmiRegisters(CIDebugRegisters *regs,
if
(
humanReadable
)
if
(
humanReadable
)
str
<<
'\n'
;
str
<<
'\n'
;
const
Registers
::
size_type
size
=
registers
.
size
();
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
);
const
Register
&
reg
=
registers
.
at
(
r
);
if
(
r
)
if
(
r
)
str
<<
','
;
str
<<
','
;
...
@@ -589,7 +589,7 @@ static StackFrames getStackTrace(CIDebugControl *debugControl,
...
@@ -589,7 +589,7 @@ static StackFrames getStackTrace(CIDebugControl *debugControl,
*
errorMessage
=
msgDebugEngineComFailed
(
"GetStackTrace"
,
hr
);
*
errorMessage
=
msgDebugEngineComFailed
(
"GetStackTrace"
,
hr
);
}
}
StackFrames
rc
(
frameCount
,
StackFrame
());
StackFrames
rc
(
frameCount
,
StackFrame
());
for
(
ULONG
f
=
0
;
f
<
frameCount
;
f
++
)
for
(
ULONG
f
=
0
;
f
<
frameCount
;
++
f
)
getFrame
(
debugSymbols
,
frames
[
f
],
&
(
rc
[
f
]));
getFrame
(
debugSymbols
,
frames
[
f
],
&
(
rc
[
f
]));
delete
[]
frames
;
delete
[]
frames
;
return
rc
;
return
rc
;
...
@@ -608,7 +608,7 @@ std::string gdbmiStack(CIDebugControl *debugControl,
...
@@ -608,7 +608,7 @@ std::string gdbmiStack(CIDebugControl *debugControl,
std
::
ostringstream
str
;
std
::
ostringstream
str
;
str
<<
'['
;
str
<<
'['
;
const
StackFrames
::
size_type
size
=
frames
.
size
();
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
)
if
(
i
)
str
<<
','
;
str
<<
','
;
frames
.
at
(
i
).
formatGDBMI
(
str
,
(
int
)
i
);
frames
.
at
(
i
).
formatGDBMI
(
str
,
(
int
)
i
);
...
...
src/libs/qtcreatorcdbext/stringutils.cpp
View file @
774fa494
...
@@ -95,7 +95,7 @@ void simplify(std::string &s)
...
@@ -95,7 +95,7 @@ void simplify(std::string &s)
void
replace
(
std
::
wstring
&
s
,
wchar_t
before
,
wchar_t
after
)
void
replace
(
std
::
wstring
&
s
,
wchar_t
before
,
wchar_t
after
)
{
{
const
std
::
wstring
::
size_type
size
=
s
.
size
();
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
)
if
(
s
.
at
(
i
)
==
before
)
s
[
i
]
=
after
;
s
[
i
]
=
after
;
}
}
...
@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c)
...
@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c)
void
gdbmiStringFormat
::
format
(
std
::
ostream
&
str
)
const
void
gdbmiStringFormat
::
format
(
std
::
ostream
&
str
)
const
{
{
const
std
::
string
::
size_type
size
=
m_s
.
size
();
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
)));
formatGdbmiChar
(
str
,
wchar_t
(
m_s
.
at
(
i
)));
}
}
void
gdbmiWStringFormat
::
format
(
std
::
ostream
&
str
)
const
void
gdbmiWStringFormat
::
format
(
std
::
ostream
&
str
)
const
{
{
const
std
::
wstring
::
size_type
size
=
m_w
.
size
();
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
));
formatGdbmiChar
(
str
,
m_w
.
at
(
i
));
}
}
...
@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w)
...
@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w)
const
std
::
string
::
size_type
size
=
w
.
size
();
const
std
::
string
::
size_type
size
=
w
.
size
();
std
::
string
rc
;
std
::
string
rc
;
rc
.
reserve
(
size
);
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
)));
rc
.
push_back
(
char
(
w
.
at
(
i
)));
return
rc
;
return
rc
;
}
}
...
@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w)
...
@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w)
const
std
::
wstring
::
size_type
size
=
w
.
size
();
const
std
::
wstring
::
size_type
size
=
w
.
size
();
std
::
wstring
rc
;
std
::
wstring
rc
;
rc
.
reserve
(
size
);
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
));
rc
.
push_back
(
w
.
at
(
i
));
return
rc
;
return
rc
;
}
}
...
...
src/libs/qtcreatorcdbext/symbolgroup.cpp
View file @
774fa494
...
@@ -278,12 +278,12 @@ static inline InamePathEntrySet expandEntrySet(const std::vector<std::string> &n
...
@@ -278,12 +278,12 @@ static inline InamePathEntrySet expandEntrySet(const std::vector<std::string> &n
InamePathEntrySet
pathEntries
;
InamePathEntrySet
pathEntries
;
const
std
::
string
::
size_type
rootSize
=
root
.
size
();
const
std
::
string
::
size_type
rootSize
=
root
.
size
();
const
VectorIndexType
nodeCount
=
nodes
.
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