Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
88f33326
Commit
88f33326
authored
Feb 25, 2011
by
Friedemann Kleint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Krazy code scanning tool warnings (QString, loops, spelling).
parent
49311aa3
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
119 additions
and
110 deletions
+119
-110
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
+2
-2
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
+1
-1
src/libs/utils/abstractprocess_win.cpp
src/libs/utils/abstractprocess_win.cpp
+1
-1
src/libs/utils/environmentmodel.cpp
src/libs/utils/environmentmodel.cpp
+1
-1
src/plugins/coreplugin/externaltool.cpp
src/plugins/coreplugin/externaltool.cpp
+5
-5
src/plugins/coreplugin/externaltool.h
src/plugins/coreplugin/externaltool.h
+2
-2
src/plugins/coreplugin/filemanager.cpp
src/plugins/coreplugin/filemanager.cpp
+1
-1
src/plugins/coreplugin/filemanager.h
src/plugins/coreplugin/filemanager.h
+2
-2
src/plugins/debugger/breakwindow.cpp
src/plugins/debugger/breakwindow.cpp
+1
-1
src/plugins/debugger/cdb/cdbengine.cpp
src/plugins/debugger/cdb/cdbengine.cpp
+1
-1
src/plugins/debugger/consolewindow.cpp
src/plugins/debugger/consolewindow.cpp
+1
-1
src/plugins/debugger/disassembleragent.cpp
src/plugins/debugger/disassembleragent.cpp
+3
-3
src/plugins/debugger/gdb/classicgdbengine.cpp
src/plugins/debugger/gdb/classicgdbengine.cpp
+1
-1
src/plugins/debugger/gdb/codagdbadapter.cpp
src/plugins/debugger/gdb/codagdbadapter.cpp
+1
-1
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+1
-1
src/plugins/debugger/gdb/trkgdbadapter.cpp
src/plugins/debugger/gdb/trkgdbadapter.cpp
+1
-1
src/plugins/debugger/lldb/guest/lldbengineguest.cpp
src/plugins/debugger/lldb/guest/lldbengineguest.cpp
+2
-2
src/plugins/debugger/qml/qmlcppengine.cpp
src/plugins/debugger/qml/qmlcppengine.cpp
+1
-1
src/plugins/debugger/qml/qmlengine.cpp
src/plugins/debugger/qml/qmlengine.cpp
+2
-2
src/plugins/debugger/shared/backtrace.cpp
src/plugins/debugger/shared/backtrace.cpp
+1
-1
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/fakevim/fakevimhandler.cpp
+1
-1
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforceplugin.cpp
+1
-1
src/plugins/projectexplorer/abi.cpp
src/plugins/projectexplorer/abi.cpp
+1
-1
src/plugins/projectexplorer/outputparser_test.cpp
src/plugins/projectexplorer/outputparser_test.cpp
+3
-3
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+4
-3
src/plugins/projectexplorer/targetselector.h
src/plugins/projectexplorer/targetselector.h
+1
-1
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
...s/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
+3
-2
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
...s/qmldesigner/components/navigator/navigatortreemodel.cpp
+1
-1
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
.../qmldesigner/components/propertyeditor/propertyeditor.cpp
+1
-1
src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.cpp
...ner/components/stateseditor/stateseditorimageprovider.cpp
+1
-1
src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
...gins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
+1
-1
src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
...ugins/qmldesigner/designercore/include/nodeinstanceview.h
+1
-1
src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp
...qmldesigner/designercore/instances/nodeinstanceserver.cpp
+2
-2
src/plugins/qmldesigner/designercore/instances/nodeinstancesignalspy.cpp
...designer/designercore/instances/nodeinstancesignalspy.cpp
+3
-3
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
...lugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+23
-18
src/plugins/qmldesigner/designercore/model/paster.cpp
src/plugins/qmldesigner/designercore/model/paster.cpp
+1
-1
src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
...ugins/qmldesigner/designercore/model/qmltextgenerator.cpp
+2
-2
src/plugins/qmldesigner/designercore/model/viewlogger.cpp
src/plugins/qmldesigner/designercore/model/viewlogger.cpp
+4
-3
src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
+2
-2
src/plugins/qmljseditor/qmljscomponentnamedialog.cpp
src/plugins/qmljseditor/qmljscomponentnamedialog.cpp
+1
-1
src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
+1
-1
src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
.../qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
+4
-4
src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp
src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp
+2
-2
src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
...plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
+3
-3
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
...gins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
+1
-1
src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp
...lugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp
+1
-1
src/plugins/qt4projectmanager/qt4nodes.cpp
src/plugins/qt4projectmanager/qt4nodes.cpp
+7
-7
src/plugins/qt4projectmanager/qt4project.cpp
src/plugins/qt4projectmanager/qt4project.cpp
+3
-2
src/plugins/qt4projectmanager/qt4target.cpp
src/plugins/qt4projectmanager/qt4target.cpp
+1
-1
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+1
-1
src/plugins/qtestlib/qtestlibplugin.cpp
src/plugins/qtestlib/qtestlibplugin.cpp
+1
-1
src/plugins/texteditor/basetextdocumentlayout.h
src/plugins/texteditor/basetextdocumentlayout.h
+2
-2
src/plugins/texteditor/icompletioncollector.cpp
src/plugins/texteditor/icompletioncollector.cpp
+1
-1
src/plugins/texteditor/snippets/snippet.h
src/plugins/texteditor/snippets/snippet.h
+1
-1
src/shared/qtlockedfile/qtlockedfile_win.cpp
src/shared/qtlockedfile/qtlockedfile_win.cpp
+1
-1
src/tools/qtpromaker/main.cpp
src/tools/qtpromaker/main.cpp
+1
-1
No files found.
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
);
...
...
src/plugins/fakevim/fakevimhandler.cpp
View file @
88f33326
...
...
@@ -1963,7 +1963,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
m_movetype
=
MoveExclusive
;
m_subsubmode
=
SearchSubSubMode
;
m_commandPrefix
=
QLatin1Char
(
m_lastSearchForward
?
'/'
:
'?'
);
m_commandBuffer
=
QString
();
m_commandBuffer
.
clear
();
updateMiniBuffer
();
}
}
else
if
(
input
.
is
(
'`'
))
{
...
...
src/plugins/perforce/perforceplugin.cpp
View file @
88f33326
...
...
@@ -1432,7 +1432,7 @@ QString PerforcePlugin::fileNameFromPerforceName(const QString& perforceName,
const
PerforceResponse
response
=
runP4Cmd
(
m_settings
.
topLevelSymLinkTarget
(),
args
,
flags
);
if
(
response
.
error
)
{
*
errorMessage
=
msgWhereFailed
(
perforceName
,
response
.
message
);
return
QString
::
null
;
return
QString
()
;
}
QString
output
=
response
.
stdOut
;
...
...
src/plugins/projectexplorer/abi.cpp
View file @
88f33326
...
...
@@ -270,7 +270,7 @@ QString Abi::toString(const OSFlavor &of)
return
QLatin1String
(
"msys"
);
case
ProjectExplorer
::
Abi
::
WindowsCEFlavor
:
return
QLatin1String
(
"ce"
);
case
ProjectExplorer
::
Abi
::
UnknownFlavor
:
// fall through
t
!
case
ProjectExplorer
::
Abi
::
UnknownFlavor
:
// fall through!
default:
return
QLatin1String
(
"unknown"
);
}
...
...
src/plugins/projectexplorer/outputparser_test.cpp
View file @
88f33326
...
...
@@ -171,10 +171,10 @@ void OutputParserTester::taskAdded(const ProjectExplorer::Task &task)
void
OutputParserTester
::
reset
()
{
m_receivedStdErrChildLine
=
QString
();
m_receivedStdOutChildLine
=
QString
();
m_receivedStdErrChildLine
.
clear
();
m_receivedStdOutChildLine
.
clear
();
m_receivedTasks
.
clear
();
m_receivedOutput
=
QString
();
m_receivedOutput
.
clear
();
}
#endif
src/plugins/projectexplorer/projectexplorer.cpp
View file @
88f33326
...
...
@@ -1353,7 +1353,8 @@ void ProjectExplorerPlugin::restoreSession()
// Converts "filename" "+45" or "filename" ":23"
// into "filename+45" and "filename:23"
foreach
(
const
QString
&
str
,
arguments
)
{
if
(
!
combinedList
.
isEmpty
()
&&
(
str
.
startsWith
(
"+"
)
||
str
.
startsWith
(
":"
)))
{
if
(
!
combinedList
.
isEmpty
()
&&
(
str
.
startsWith
(
QLatin1Char
(
'+'
))
||
str
.
startsWith
(
QLatin1Char
(
':'
))))
{
combinedList
.
last
().
append
(
str
);
}
else
{
combinedList
<<
str
;
...
...
@@ -2209,7 +2210,7 @@ QString ProjectExplorerPlugin::directoryFor(Node *node)
// We figure out a commonPath from the subfolders
QStringList
list
;
foreach
(
FolderNode
*
f
,
folder
->
subFolderNodes
())
list
<<
f
->
path
()
+
"/"
;
list
<<
f
->
path
()
+
QLatin1Char
(
'/'
)
;
if
(
list
.
isEmpty
())
location
=
path
.
left
(
path
.
indexOf
(
'#'
));
else
...
...
@@ -2432,7 +2433,7 @@ void ProjectExplorerPlugin::renameFile(Node *node, const QString &to)
return
;
QString
orgFilePath
=
QFileInfo
(
node
->
path
()).
absoluteFilePath
();
QString
dir
=
QFileInfo
(
orgFilePath
).
absolutePath
();
QString
newFilePath
=
dir
+
"/"
+
to
;
QString
newFilePath
=
dir
+
QLatin1Char
(
'/'
)
+
to
;
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
IVersionControl
*
vc
=
core
->
vcsManager
()
->
findVersionControlForDirectory
(
dir
);
bool
result
=
false
;
...
...
src/plugins/projectexplorer/targetselector.h
View file @
88f33326
...
...
@@ -81,7 +81,7 @@ public slots:
signals:
void
removeButtonClicked
();
// This signal is emited whenever the target pointed to by the indices
// This signal is emit
t
ed whenever the target pointed to by the indices
// has changed.
void
currentChanged
(
int
targetIndex
,
int
subIndex
);
...
...
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
View file @
88f33326
...
...
@@ -386,7 +386,8 @@ bool ItemLibraryModel::isItemVisible(int itemLibId)
QString
entryToImport
(
const
ItemLibraryEntry
&
entry
)
{
return
entry
.
requiredImport
()
+
" "
+
QString
::
number
(
entry
.
majorVersion
())
+
"."
+
QString
::
number
(
entry
.
minorVersion
());
return
entry
.
requiredImport
()
+
QLatin1Char
(
' '
)
+
QString
::
number
(
entry
.
majorVersion
())
+
QLatin1Char
(
'.'
)
+
QString
::
number
(
entry
.
minorVersion
());
}
void
ItemLibraryModel
::
update
(
ItemLibraryInfo
*
itemLibraryInfo
,
Model
*
model
)
...
...
@@ -401,7 +402,7 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
QStringList
imports
;
foreach
(
const
Import
&
import
,
model
->
imports
())
if
(
import
.
isLibraryImport
())
imports
<<
import
.
url
()
+
" "
+
import
.
version
();
imports
<<
import
.
url
()
+
QLatin1Char
(
' '
)
+
import
.
version
();
foreach
(
ItemLibraryEntry
entry
,
itemLibraryInfo
->
entries
())
{
...
...
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
View file @
88f33326
...
...
@@ -573,7 +573,7 @@ QString NavigatorTreeModel::qmlTypeInQtContainer(const QString &qtContainerType)
{
QString
typeName
(
qtContainerType
);
if
(
typeName
.
startsWith
(
"QDeclarativeListProperty<"
)
&&
typeName
.
endsWith
(
">"
))
{
typeName
.
endsWith
(
'>'
))
{
typeName
.
remove
(
0
,
25
);
typeName
.
chop
(
1
);
}
...
...
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
View file @
88f33326
...
...
@@ -581,7 +581,7 @@ QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType, const QmlO
foreach
(
const
QString
&
name
,
orderedList
)
{
QString
properName
=
name
;
properName
.
replace
(
"."
,
"_"
);
properName
.
replace
(
'.'
,
'_'
);
QString
typeName
=
type
.
propertyTypeName
(
name
);
//alias resolution only possible with instance
...
...
src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.cpp
View file @
88f33326
...
...
@@ -55,7 +55,7 @@ QImage StatesEditorImageProvider::requestImage(const QString &id, QSize *size, c
if
(
newSize
.
isEmpty
())
newSize
=
QSize
(
100
,
100
);
QString
imageId
=
id
.
split
(
"-"
).
first
();
QString
imageId
=
id
.
split
(
QLatin1Char
(
'-'
)
).
first
();
QImage
image
;
if
(
imageId
==
"baseState"
)
{
...
...
src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.cpp
View file @
88f33326
...
...
@@ -283,7 +283,7 @@ void QMLRewriter::includeLeadingEmptyLine(int &start) const
// FIXME: duplicate code in the QmlJS::Rewriter class, remove this
UiObjectMemberList
*
QMLRewriter
::
searchMemberToInsertAfter
(
UiObjectMemberList
*
members
,
const
QStringList
&
propertyOrder
)
{
const
int
objectDefinitionInsertionPoint
=
propertyOrder
.
indexOf
(
QString
::
null
);
const
int
objectDefinitionInsertionPoint
=
propertyOrder
.
indexOf
(
QString
()
);
UiObjectMemberList
*
lastObjectDef
=
0
;
UiObjectMemberList
*
lastNonObjectDef
=
0
;
...
...
src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
View file @
88f33326
...
...
@@ -81,7 +81,7 @@ class CORESHARED_EXPORT NodeInstanceView : public AbstractView, public NodeInsta
public:
typedef
QWeakPointer
<
NodeInstanceView
>
Pointer
;
NodeInstanceView
(
QObject
*
parent
=
0
,
NodeInstanceServerInterface
::
RunModus
runModus
=
NodeInstanceServerInterface
::
NormalModus
);
explicit
NodeInstanceView
(
QObject
*
parent
=
0
,
NodeInstanceServerInterface
::
RunModus
runModus
=
NodeInstanceServerInterface
::
NormalModus
);
~
NodeInstanceView
();
void
modelAttached
(
Model
*
model
);
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp
View file @
88f33326
...
...
@@ -353,12 +353,12 @@ void NodeInstanceServer::addImports(const QVector<AddImportContainer> &container
importStatement
+=
container
.
url
().
toString
();
if
(
!
container
.
version
().
isEmpty
())
importStatement
+=
" "
+
container
.
version
();
importStatement
+=
' '
+
container
.
version
();
if
(
!
container
.
alias
().
isEmpty
())
importStatement
+=
" as "
+
container
.
alias
();
importStatement
.
append
(
"
\n
"
);
importStatement
.
append
(
'\n'
);
if
(
!
m_importList
.
contains
(
importStatement
))
m_importList
.
append
(
importStatement
);
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstancesignalspy.cpp
View file @
88f33326
...
...
@@ -74,7 +74,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
&&
QDeclarativeMetaType
::
isQObject
(
metaProperty
.
userType
()))
{
QObject
*
propertyObject
=
QDeclarativeMetaType
::
toQObject
(
metaProperty
.
read
(
spiedObject
));
if
(
propertyObject
)
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
"."
);
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
QLatin1Char
(
'.'
)
);
}
else
if
(
metaProperty
.
hasNotifySignal
())
{
QMetaMethod
metaMethod
=
metaProperty
.
notifySignal
();
bool
isConnecting
=
QMetaObject
::
connect
(
spiedObject
,
metaMethod
.
methodIndex
(),
this
,
methodeOffset
,
Qt
::
DirectConnection
);
...
...
@@ -90,7 +90,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
&&
QDeclarativeMetaType
::
isQObject
(
metaProperty
.
userType
()))
{
QObject
*
propertyObject
=
QDeclarativeMetaType
::
toQObject
(
metaProperty
.
read
(
spiedObject
));
if
(
propertyObject
)
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
"/"
);
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
QLatin1Char
(
'/'
)
);
}
// search recursive in objects list
...
...
@@ -101,7 +101,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
for
(
int
i
=
0
;
i
<
list
.
count
();
i
++
)
{
QObject
*
propertyObject
=
list
.
at
(
i
);
if
(
propertyObject
)
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
"/"
);
registerObject
(
propertyObject
,
prefix
+
metaProperty
.
name
()
+
QLatin1Char
(
'/'
)
);
}
}
}
...
...
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
View file @
88f33326
...
...
@@ -99,13 +99,13 @@ public:
{
const
Interpreter
::
ASTPropertyReference
*
ref
=
dynamic_cast
<
const
Interpreter
::
ASTPropertyReference
*>
(
value
);
if
(
ref
)
{
QString
type
=
"unkown"
;
QString
type
=
"unk
n
own"
;
if
(
ref
->
ast
()
->
memberType
)
type
=
ref
->
ast
()
->
memberType
->
asString
();
m_properties
.
append
(
qMakePair
(
name
,
type
));
}
else
{
if
(
const
Interpreter
::
QmlObjectValue
*
ov
=
dynamic_cast
<
const
Interpreter
::
QmlObjectValue
*>
(
value
))
{
QString
qualifiedTypeName
=
ov
->
packageName
().
isEmpty
()
?
ov
->
className
()
:
ov
->
packageName
()
+
"/"
+
ov
->
className
();
QString
qualifiedTypeName
=
ov
->
packageName
().
isEmpty
()
?
ov
->
className
()
:
ov
->
packageName
()
+
'/'
+
ov
->
className
();
m_properties
.
append
(
qMakePair
(
name
,
qualifiedTypeName
));
}
else
{
Interpreter
::
TypeId
typeId
;
...
...
@@ -158,11 +158,11 @@ QStringList prototypes(const Interpreter::ObjectValue *ov, LookupContext::Ptr co
const
Interpreter
::
QmlObjectValue
*
qmlValue
=
dynamic_cast
<
const
Interpreter
::
QmlObjectValue
*>
(
ov
);
if
(
qmlValue
)
{
if
(
versions
)
{
list
<<
qmlValue
->
packageName
()
+
"/"
+
qmlValue
->
className
()
+
" "
+
QString
::
number
(
qmlValue
->
version
().
majorVersion
())
+
"."
+
QString
::
number
(
qmlValue
->
version
().
minorVersion
());
list
<<
qmlValue
->
packageName
()
+
'/'
+
qmlValue
->
className
()
+
' '
+
QString
::
number
(
qmlValue
->
version
().
majorVersion
())
+
'.'
+
QString
::
number
(
qmlValue
->
version
().
minorVersion
());
}
else
{
list
<<
qmlValue
->
packageName
()
+
"/"
+
qmlValue
->
className
();
list
<<
qmlValue
->
packageName
()
+
'/'
+
qmlValue
->
className
();
}
}
else
{
if
(
versions
)
{
...
...
@@ -385,7 +385,7 @@ QHash<QString, NodeMetaInfoPrivate::Pointer> NodeMetaInfoPrivate::m_nodeMetaInfo
static
inline
QString
stringIdentifier
(
const
QString
&
type
,
int
maj
,
int
min
)
{
return
type
+
QString
::
number
(
maj
)
+
"_"
+
QString
::
number
(
min
);
return
type
+
QString
::
number
(
maj
)
+
'_'
+
QString
::
number
(
min
);
}
NodeMetaInfoPrivate
::
Pointer
NodeMetaInfoPrivate
::
create
(
Model
*
model
,
const
QString
&
type
,
int
maj
,
int
min
)
...
...
@@ -492,8 +492,9 @@ bool NodeMetaInfoPrivate::isPropertyWritable(const QString &propertyName) const
return
false
;
if
(
propertyName
.
contains
(
'.'
))
{
const
QString
objectName
=
propertyName
.
split
(
"."
).
first
();
const
QString
rawPropertyName
=
propertyName
.
split
(
"."
).
last
();
const
QStringList
parts
=
propertyName
.
split
(
'.'
);
const
QString
objectName
=
parts
.
first
();
const
QString
rawPropertyName
=
parts
.
last
();
const
QString
objectType
=
propertyType
(
objectName
);
if
(
isValueType
(
objectType
))
{
...
...
@@ -523,8 +524,9 @@ bool NodeMetaInfoPrivate::isPropertyList(const QString &propertyName) const
return
false
;
if
(
propertyName
.
contains
(
'.'
))
{
const
QString
objectName
=
propertyName
.
split
(
"."
).
first
();
const
QString
rawPropertyName
=
propertyName
.
split
(
"."
).
last
();
const
QStringList
parts
=
propertyName
.
split
(
'.'
);
const
QString
objectName
=
parts
.
first
();
const
QString
rawPropertyName
=
parts
.
last
();
const
QString
objectType
=
propertyType
(
objectName
);
if
(
isValueType
(
objectType
))
{
...
...
@@ -550,8 +552,9 @@ bool NodeMetaInfoPrivate::isPropertyPointer(const QString &propertyName) const
return
false
;
if
(
propertyName
.
contains
(
'.'
))
{
const
QString
objectName
=
propertyName
.
split
(
"."
).
first
();
const
QString
rawPropertyName
=
propertyName
.
split
(
"."
).
last
();
const
QStringList
parts
=
propertyName
.
split
(
'.'
);
const
QString
objectName
=
parts
.
first
();
const
QString
rawPropertyName
=
parts
.
last
();
const
QString
objectType
=
propertyType
(
objectName
);
if
(
isValueType
(
objectType
))
{
...
...
@@ -577,8 +580,9 @@ bool NodeMetaInfoPrivate::isPropertyEnum(const QString &propertyName) const
return
false
;
if
(
propertyName
.
contains
(
'.'
))
{
const
QString
objectName
=
propertyName
.
split
(
"."
).
first
();
const
QString
rawPropertyName
=
propertyName
.
split
(
"."
).
last
();
const
QStringList
parts
=
propertyName
.
split
(
'.'
);
const
QString
objectName
=
parts
.
first
();
const
QString
rawPropertyName
=
parts
.
last
();
const
QString
objectType
=
propertyType
(
objectName
);
if
(
isValueType
(
objectType
))
{
...
...
@@ -612,8 +616,9 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const QString &propertyName) cons
return
QString
();
if
(
propertyName
.
contains
(
'.'
))
{
const
QString
objectName
=
propertyName
.
split
(
"."
).
first
();
const
QString
rawPropertyName
=
propertyName
.
split
(
"."
).
last
();
const
QStringList
parts
=
propertyName
.
split
(
'.'
);
const
QString
objectName
=
parts
.
first
();
const
QString
rawPropertyName
=
parts
.
last
();
const
QString
objectType
=
propertyType
(
objectName
);
if
(
isValueType
(
objectType
))
{
...
...
@@ -797,7 +802,7 @@ void NodeMetaInfoPrivate::setupPrototypes()
description
.
minorVersion
=
qmlValue
->
version
().
minorVersion
();
description
.
majorVersion
=
qmlValue
->
version
().
majorVersion
();
if
(
!
qmlValue
->
packageName
().
isEmpty
())
description
.
className
=
qmlValue
->
packageName
()
+
"/"
+
description
.
className
;
description
.
className
=
qmlValue
->
packageName
()
+
'/'
+
description
.
className
;
m_prototypes
.
append
(
description
);
}
else
{
if
(
lookupContext
()
->
context
()
->
lookupType
(
document
(),
QStringList
()
<<
ov
->
className
()))
...
...
src/plugins/qmldesigner/designercore/model/paster.cpp
View file @
88f33326
...
...
@@ -69,7 +69,7 @@ public:
bool
operator
()(
QmlJS
::
AST
::
UiProgram
*
sourceAST
)
{
m_inStates
=
false
;
m_stateName
=
QString
();
m_stateName
.
clear
();
Node
::
accept
(
sourceAST
->
imports
,
this
);
...
...
src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
View file @
88f33326
...
...
@@ -138,7 +138,7 @@ QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
QString
type
=
node
.
type
();
QString
url
;
if
(
type
.
contains
(
'/'
))
{
QStringList
nameComponents
=
type
.
split
(
"/"
);
const
QStringList
nameComponents
=
type
.
split
(
'/'
);
url
=
nameComponents
.
first
();
type
=
nameComponents
.
last
();
}
...
...
@@ -158,7 +158,7 @@ QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
QString
result
;
if
(
!
alias
.
isEmpty
())
result
=
alias
+
"."
;
result
=
alias
+
'.'
;
result
+=
type
;
result
+=
QLatin1String
(
" {
\n
"
);
...
...
src/plugins/qmldesigner/designercore/model/viewlogger.cpp
View file @
88f33326
...
...
@@ -73,9 +73,10 @@ ViewLogger::ViewLogger(QObject *parent)
#else
const
QString
tempPath
=
QDir
::
tempPath
();
#endif