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
88f33326
Commit
88f33326
authored
Feb 25, 2011
by
Friedemann Kleint
Browse files
Fix Krazy code scanning tool warnings (QString, loops, spelling).
parent
49311aa3
Changes
56
Hide whitespace changes
Inline
Side-by-side
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
View file @
88f33326
...
...
@@ -127,7 +127,7 @@ static const CommandDescription commandDescriptions[] = {
"Prints local variables of symbol group in GDBMI or debug format"
,
"[-t token] [-v] [T formats] [-I formats] [-f debugfilter] [-c] [-h] [-d]
\n
[-e expand-list] [-u uninitialized-list]
\n
"
"[-W] [-w watch-iname watch-expression] <frame-number> [iname]
\n
"
"-h human-readable ouput
\n
"
"-h human-readable ou
t
put
\n
"
"-v increase verboseness of dumping
\n
"
"-d debug output
\n
"
"-f debug_filter
\n
"
...
...
@@ -142,7 +142,7 @@ static const CommandDescription commandDescriptions[] = {
{
"watches"
,
"Prints watches variables of symbol group in GDBMI or debug format"
,
"[-t token] [-v] [T formats] [-I formats] [-f debugfilter] [-c] [-h] [-d] <iname>
\n
"
"-h human-readable ouput
\n
"
"-h human-readable ou
t
put
\n
"
"-v increase verboseness of dumping
\n
"
"-d debug output
\n
"
"-f debug_filter
\n
"
...
...
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
View file @
88f33326
...
...
@@ -610,7 +610,7 @@ std::string SymbolGroupValue::resolveType(const std::string &typeIn,
// Use the module of the current symbol group for templates.
// This is because resolving some template types (std::list<> has been
// observed to result in 'QtGui4d!std::list', which subseqently fails.
// observed to result in 'QtGui4d!std::list', which subseq
u
ently fails.
if
(
!
currentModule
.
empty
()
&&
stripped
.
find
(
'<'
)
!=
std
::
string
::
npos
)
{
std
::
string
trc
=
currentModule
;
trc
.
push_back
(
'!'
);
...
...
src/libs/utils/abstractprocess_win.cpp
View file @
88f33326
...
...
@@ -59,7 +59,7 @@ static QString quoteWinCommand(const QString &program)
{
const
QChar
doubleQuote
=
QLatin1Char
(
'"'
);
// add the program
m
as the first arg ... it works better
// add the program as the first arg ... it works better
QString
programName
=
program
;
programName
.
replace
(
QLatin1Char
(
'/'
),
QLatin1Char
(
'\\'
));
if
(
!
programName
.
startsWith
(
doubleQuote
)
&&
!
programName
.
endsWith
(
doubleQuote
)
...
...
src/libs/utils/environmentmodel.cpp
View file @
88f33326
...
...
@@ -325,7 +325,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
int
pos
=
m_d
->
findInChanges
(
name
);
if
(
pos
!=
-
1
)
{
m_d
->
m_items
[
pos
].
unset
=
true
;
m_d
->
m_items
[
pos
].
value
=
QString
();
m_d
->
m_items
[
pos
].
value
.
clear
();
m_d
->
updateResultEnvironment
();
emit
dataChanged
(
index
(
row
,
0
,
QModelIndex
()),
index
(
row
,
1
,
QModelIndex
()));
emit
userChangesChanged
();
...
...
src/plugins/coreplugin/externaltool.cpp
View file @
88f33326
...
...
@@ -500,7 +500,7 @@ bool ExternalTool::save(QString *errorMessage) const
return
true
;
}
bool
ExternalTool
::
operator
==
(
const
ExternalTool
&
other
)
bool
ExternalTool
::
operator
==
(
const
ExternalTool
&
other
)
const
{
return
m_id
==
other
.
m_id
&&
m_description
==
other
.
m_description
...
...
@@ -537,9 +537,9 @@ bool ExternalToolRunner::resolve()
{
if
(
!
m_tool
)
return
false
;
m_resolvedExecutable
=
QString
::
null
;
m_resolvedArguments
=
QString
::
null
;
m_resolvedWorkingDirectory
=
QString
::
null
;
m_resolvedExecutable
.
clear
()
;
m_resolvedArguments
.
clear
()
;
m_resolvedWorkingDirectory
.
clear
()
;
{
// executable
foreach
(
const
QString
&
executable
,
m_tool
->
executables
())
{
QString
resolved
=
Utils
::
expandMacros
(
executable
,
...
...
@@ -813,7 +813,7 @@ void ExternalToolManager::setToolsByCategory(const QMap<QString, QList<Internal:
it
.
next
();
ActionContainer
*
container
=
0
;
const
QString
&
containerName
=
it
.
key
();
if
(
containerName
==
QString
())
{
// no displayCategory, so put into external tools menu directly
if
(
containerName
.
isEmpty
())
{
// no displayCategory, so put into external tools menu directly
container
=
mexternaltools
;
}
else
{
if
(
m_containers
.
contains
(
containerName
))
{
...
...
src/plugins/coreplugin/externaltool.h
View file @
88f33326
...
...
@@ -93,8 +93,8 @@ public:
bool
save
(
QString
*
errorMessage
=
0
)
const
;
bool
operator
==
(
const
ExternalTool
&
other
);
bool
operator
!=
(
const
ExternalTool
&
other
)
{
return
!
((
*
this
)
==
other
);
}
bool
operator
==
(
const
ExternalTool
&
other
)
const
;
bool
operator
!=
(
const
ExternalTool
&
other
)
const
{
return
!
((
*
this
)
==
other
);
}
ExternalTool
&
operator
=
(
const
ExternalTool
&
other
);
void
setId
(
const
QString
&
id
);
...
...
src/plugins/coreplugin/filemanager.cpp
View file @
88f33326
...
...
@@ -339,7 +339,7 @@ void FileManager::renamedFile(const QString &from, const QString &to)
}
}
/* Removes all occurr
a
nces of the IFile from m_filesWithWatch and m_states.
/* Removes all occurr
e
nces of the IFile from m_filesWithWatch and m_states.
If that results in a file no longer being referenced by any IFile, this
also removes the file watcher.
*/
...
...
src/plugins/coreplugin/filemanager.h
View file @
88f33326
...
...
@@ -112,7 +112,7 @@ public:
QList
<
IFile
*>
saveModifiedFiles
(
const
QList
<
IFile
*>
&
files
,
bool
*
cancelled
=
0
,
const
QString
&
message
=
QString
(),
const
QString
&
alwaysSaveMessage
=
QString
::
null
,
const
QString
&
alwaysSaveMessage
=
QString
()
,
bool
*
alwaysSave
=
0
);
...
...
@@ -167,7 +167,7 @@ private:
QList
<
IFile
*>
saveModifiedFiles
(
const
QList
<
IFile
*>
&
files
,
bool
*
cancelled
,
bool
silently
,
const
QString
&
message
,
const
QString
&
alwaysSaveMessage
=
QString
::
null
,
const
QString
&
alwaysSaveMessage
=
QString
()
,
bool
*
alwaysSave
=
0
);
Internal
::
FileManagerPrivate
*
d
;
...
...
src/plugins/debugger/breakwindow.cpp
View file @
88f33326
...
...
@@ -61,7 +61,7 @@ namespace Internal {
// breakpoint type. The controls not applicable to the current type
// (say function name for file-and-line) are disabled and cleared out.
// However,the values are saved and restored once the respective mode
// is again cho
o
sen, which is done using m_savedParameters and
// is again chosen, which is done using m_savedParameters and
// setters/getters taking the parts mask enumeration parameter.
//
///////////////////////////////////////////////////////////////////////
...
...
src/plugins/debugger/cdb/cdbengine.cpp
View file @
88f33326
...
...
@@ -2472,7 +2472,7 @@ static inline void formatCdbBreakPointResponse(BreakpointId id, const Breakpoint
void
CdbEngine
::
handleBreakPoints
(
const
CdbExtensionCommandPtr
&
reply
)
{
if
(
debugBreakpoints
)
qDebug
(
"CdbEngine::handleBreakPoints: sucess=%d: %s"
,
reply
->
success
,
reply
->
reply
.
constData
());
qDebug
(
"CdbEngine::handleBreakPoints: suc
c
ess=%d: %s"
,
reply
->
success
,
reply
->
reply
.
constData
());
if
(
!
reply
->
success
)
{
showMessage
(
QString
::
fromAscii
(
reply
->
errorMessage
),
LogError
);
return
;
...
...
src/plugins/debugger/consolewindow.cpp
View file @
88f33326
...
...
@@ -310,7 +310,7 @@ void ConsoleWindow::showOutput(int channel, const QString &output)
line
.
truncate
(
n
);
line
+=
QLatin1String
(
" [...] <cut off>"
);
}
m_console
->
appendPlainText
(
charForChannel
(
channel
)
+
line
+
"
\n
"
);
m_console
->
appendPlainText
(
charForChannel
(
channel
)
+
line
+
'
\n
'
);
}
QTextCursor
cursor
=
m_console
->
textCursor
();
cursor
.
movePosition
(
QTextCursor
::
End
);
...
...
src/plugins/debugger/disassembleragent.cpp
View file @
88f33326
...
...
@@ -271,12 +271,12 @@ void DisassemblerAgent::setContents(const DisassemblerLines &contents)
for
(
int
i
=
0
,
n
=
contents
.
size
();
i
!=
n
;
++
i
)
{
const
DisassemblerLine
&
dl
=
contents
.
at
(
i
);
if
(
dl
.
address
)
{
str
+=
QString
(
"0x"
);
str
+=
Q
Latin1
String
(
"0x"
);
str
+=
QString
::
number
(
dl
.
address
,
16
);
str
+=
" "
;
str
+=
QLatin1String
(
" "
)
;
}
str
+=
dl
.
data
;
str
+=
"
\n
"
;
str
+=
QLatin1Char
(
'\n'
)
;
}
plainTextEdit
->
setPlainText
(
str
);
plainTextEdit
->
setReadOnly
(
true
);
...
...
src/plugins/debugger/gdb/classicgdbengine.cpp
View file @
88f33326
...
...
@@ -280,7 +280,7 @@ void GdbEngine::updateSubItemClassic(const WatchData &data0)
if
(
debuggerCore
()
->
boolSetting
(
AutoDerefPointers
))
{
// Try automatic dereferentiation
data
.
exp
=
"(*("
+
data
.
exp
+
"))"
;
data
.
type
=
data
.
type
+
"."
;
// FIXME: fragile HACK to avoid recursion
data
.
type
=
data
.
type
+
'.'
;
// FIXME: fragile HACK to avoid recursion
insertData
(
data
);
}
else
{
data
.
setChildrenUnneeded
();
...
...
src/plugins/debugger/gdb/codagdbadapter.cpp
View file @
88f33326
...
...
@@ -597,7 +597,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
sendGdbServerAck
();
logMessage
(
_
(
"Not implemented 'Continue with signal' %1: "
).
arg
(
signalNumber
),
LogWarning
);
sendGdbServerMessage
(
"O"
+
QByteArray
(
"Console output"
).
toHex
());
sendGdbServerMessage
(
'O'
+
QByteArray
(
"Console output"
).
toHex
());
sendGdbServerMessage
(
"W81"
);
// "Process exited with result 1
sendTrkContinue
();
}
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
88f33326
...
...
@@ -2782,7 +2782,7 @@ void GdbEngine::requestModuleSymbols(const QString &moduleName)
QString
fileName
=
tf
.
fileName
();
tf
.
close
();
postCommand
(
"maint print msymbols "
+
fileName
.
toLocal8Bit
()
+
" "
+
moduleName
.
toLocal8Bit
(),
+
' '
+
moduleName
.
toLocal8Bit
(),
NeedsStop
,
CB
(
handleShowModuleSymbols
),
QVariant
(
moduleName
+
QLatin1Char
(
'@'
)
+
fileName
));
}
...
...
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
88f33326
...
...
@@ -837,7 +837,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
}
}
// qPart/qXfer
else
if
(
cmd
.
startsWith
(
"X"
))
{
else
if
(
cmd
.
startsWith
(
'X'
))
{
logMessage
(
msgGdbPacket
(
QLatin1String
(
"Write memory"
)));
// X addr,length
sendGdbServerAck
();
...
...
src/plugins/debugger/lldb/guest/lldbengineguest.cpp
View file @
88f33326
...
...
@@ -350,7 +350,7 @@ void LldbEngineGuest::requestUpdateWatchData(const Internal::WatchData &data,
void
LldbEngineGuest
::
getWatchDataR
(
lldb
::
SBValue
v
,
int
level
,
const
QByteArray
&
p_iname
,
QList
<
WatchData
>
&
wd
)
{
QByteArray
iname
=
p_iname
+
"."
+
QByteArray
(
v
.
GetName
());
QByteArray
iname
=
p_iname
+
'.'
+
QByteArray
(
v
.
GetName
());
m_localesCache
.
insert
(
QString
::
fromLocal8Bit
(
iname
),
v
);
#if defined(HAVE_LLDB_PRIVATE)
...
...
@@ -584,7 +584,7 @@ void LldbEngineGuest::updateThreads()
ThreadData
thread
;
thread
.
id
=
t
.
GetThreadID
();
thread
.
targetId
=
QString
::
number
(
t
.
GetThreadID
());
thread
.
core
=
QString
();
thread
.
core
.
clear
();
thread
.
state
=
QString
::
number
(
t
.
GetStopReason
());
switch
(
t
.
GetStopReason
())
{
...
...
src/plugins/debugger/qml/qmlcppengine.cpp
View file @
88f33326
...
...
@@ -368,7 +368,7 @@ void QmlCppEngine::interruptInferior()
void
QmlCppEngine
::
requestInterruptInferior
()
{
EDEBUG
(
"
\n
MASTER REQUEST INTERUPT INFERIOR"
);
EDEBUG
(
"
\n
MASTER REQUEST INTER
R
UPT INFERIOR"
);
DebuggerEngine
::
requestInterruptInferior
();
d
->
m_cppEngine
->
requestInterruptInferior
();
}
...
...
src/plugins/debugger/qml/qmlengine.cpp
View file @
88f33326
...
...
@@ -826,9 +826,9 @@ void QmlEngine::messageReceived(const QByteArray &message)
logMessage
(
LogReceive
,
logString
);
QString
msg
=
stackFrames
.
isEmpty
()
?
tr
(
"<p>An Uncaught Exception occured:</p><p>%2</p>"
)
?
tr
(
"<p>An Uncaught Exception occur
r
ed:</p><p>%2</p>"
)
.
arg
(
Qt
::
escape
(
error
))
:
tr
(
"<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>"
)
:
tr
(
"<p>An Uncaught Exception occur
r
ed in <i>%1</i>:</p><p>%2</p>"
)
.
arg
(
stackFrames
.
value
(
0
).
file
,
Qt
::
escape
(
error
));
showMessageBox
(
QMessageBox
::
Information
,
tr
(
"Uncaught Exception"
),
msg
);
}
else
{
...
...
src/plugins/debugger/shared/backtrace.cpp
View file @
88f33326
...
...
@@ -61,7 +61,7 @@ void dumpBacktrace(int maxdepth)
proc
.
start
(
"addr2line"
,
args
);
proc
.
waitForStarted
();
for
(
int
i
=
0
;
i
<
qMin
(
size
,
maxdepth
);
i
++
)
proc
.
write
(
"0x"
+
QByteArray
::
number
(
quintptr
(
bt
[
i
]),
16
)
+
"
\n
"
);
proc
.
write
(
"0x"
+
QByteArray
::
number
(
quintptr
(
bt
[
i
]),
16
)
+
'
\n
'
);
proc
.
closeWriteChannel
();
QByteArray
out
=
proc
.
readAllStandardOutput
();
qDebug
()
<<
QCoreApplication
::
arguments
().
at
(
0
);
...
...
Prev
1
2
3
Next
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