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
55edbe1c
Commit
55edbe1c
authored
Jun 11, 2010
by
Bill King
Browse files
Fix parameters hidden by local variables.
parent
9a075e2c
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/plugins/bineditor/bineditor.cpp
View file @
55edbe1c
...
...
@@ -500,10 +500,10 @@ int BinEditor::posAt(const QPoint &pos) const
if
(
x
>
16
*
m_columnWidth
+
m_charWidth
/
2
)
{
x
-=
16
*
m_columnWidth
+
m_charWidth
;
for
(
column
=
0
;
column
<
15
;
++
column
)
{
int
p
os
=
(
topLine
+
line
)
*
16
+
column
;
if
(
p
os
<
0
||
p
os
>=
m_size
)
int
dataP
os
=
(
topLine
+
line
)
*
16
+
column
;
if
(
dataP
os
<
0
||
dataP
os
>=
m_size
)
break
;
QChar
qc
(
QLatin1Char
(
dataAt
(
p
os
)));
QChar
qc
(
QLatin1Char
(
dataAt
(
dataP
os
)));
if
(
!
qc
.
isPrint
())
qc
=
0xB7
;
x
-=
fontMetrics
().
width
(
qc
);
...
...
src/plugins/debugger/debuggerdialogs.cpp
View file @
55edbe1c
...
...
@@ -109,8 +109,8 @@ QString ProcessListFilterModel::processIdAt(const QModelIndex &index) const
{
if
(
index
.
isValid
())
{
const
QModelIndex
index0
=
mapToSource
(
index
);
QModelIndex
i
ndex
=
index0
.
sibling
(
index0
.
row
(),
0
);
if
(
const
QStandardItem
*
item
=
m_model
->
itemFromIndex
(
i
ndex
))
QModelIndex
siblingI
ndex
=
index0
.
sibling
(
index0
.
row
(),
0
);
if
(
const
QStandardItem
*
item
=
m_model
->
itemFromIndex
(
siblingI
ndex
))
return
item
->
text
();
}
return
QString
();
...
...
src/plugins/git/gitclient.cpp
View file @
55edbe1c
...
...
@@ -1785,8 +1785,8 @@ void GitClient::setSettings(const GitSettings &s)
{
if
(
s
!=
m_settings
)
{
m_settings
=
s
;
if
(
QSettings
*
s
=
m_core
->
settings
())
m_settings
.
toSettings
(
s
);
if
(
QSettings
*
coreSetting
s
=
m_core
->
settings
())
m_settings
.
toSettings
(
coreSetting
s
);
m_binaryPath
=
m_settings
.
gitBinaryPath
();
m_cachedGitVersion
=
0u
;
m_hasCachedGitVersion
=
false
;
...
...
src/plugins/locator/filesystemfilter.cpp
View file @
55edbe1c
...
...
@@ -76,17 +76,17 @@ QList<FilterEntry> FileSystemFilter::matchesFor(const QString &entry)
QDir
::
Name
|
QDir
::
IgnoreCase
|
QDir
::
LocaleAware
);
foreach
(
const
QString
&
dir
,
dirs
)
{
if
(
dir
!=
QLatin1String
(
"."
)
&&
(
name
.
isEmpty
()
||
dir
.
startsWith
(
name
,
Qt
::
CaseInsensitive
)))
{
FilterEntry
e
ntry
(
this
,
dir
,
dirInfo
.
filePath
(
dir
));
e
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
e
ntry
);
FilterEntry
filterE
ntry
(
this
,
dir
,
dirInfo
.
filePath
(
dir
));
filterE
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
filterE
ntry
);
}
}
foreach
(
const
QString
&
file
,
files
)
{
if
(
name
.
isEmpty
()
||
file
.
startsWith
(
name
,
Qt
::
CaseInsensitive
))
{
const
QString
fullPath
=
dirInfo
.
filePath
(
file
);
FilterEntry
e
ntry
(
this
,
file
,
fullPath
);
e
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
e
ntry
);
FilterEntry
filterE
ntry
(
this
,
file
,
fullPath
);
filterE
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
filterE
ntry
);
}
}
return
value
;
...
...
src/plugins/locator/locatorfiltersfilter.cpp
View file @
55edbe1c
...
...
@@ -69,12 +69,12 @@ QList<FilterEntry> LocatorFiltersFilter::matchesFor(const QString &entry)
if
(
entry
.
isEmpty
())
{
foreach
(
ILocatorFilter
*
filter
,
m_plugin
->
filters
())
{
if
(
!
filter
->
shortcutString
().
isEmpty
()
&&
!
filter
->
isHidden
())
{
FilterEntry
e
ntry
(
this
,
FilterEntry
filterE
ntry
(
this
,
filter
->
shortcutString
(),
QVariant
::
fromValue
(
filter
),
m_icon
);
e
ntry
.
extraInfo
=
filter
->
displayName
();
entries
.
append
(
e
ntry
);
filterE
ntry
.
extraInfo
=
filter
->
displayName
();
entries
.
append
(
filterE
ntry
);
}
}
}
...
...
src/plugins/locator/opendocumentsfilter.cpp
View file @
55edbe1c
...
...
@@ -59,19 +59,19 @@ QList<FilterEntry> OpenDocumentsFilter::matchesFor(const QString &entry)
const
QRegExp
regexp
(
pattern
,
Qt
::
CaseInsensitive
,
QRegExp
::
Wildcard
);
if
(
!
regexp
.
isValid
())
return
value
;
foreach
(
const
OpenEditorsModel
::
Entry
&
entry
,
m_editors
)
{
QString
fileName
=
entry
.
fileName
();
QString
displayName
=
entry
.
displayName
();
foreach
(
const
OpenEditorsModel
::
Entry
&
e
ditorE
ntry
,
m_editors
)
{
QString
fileName
=
e
ditorE
ntry
.
fileName
();
QString
displayName
=
e
ditorE
ntry
.
displayName
();
if
(
regexp
.
exactMatch
(
displayName
))
{
if
(
fileName
.
isEmpty
())
{
if
(
entry
.
editor
)
value
.
append
(
FilterEntry
(
this
,
displayName
,
qVariantFromValue
(
entry
.
editor
)));
if
(
e
ditorE
ntry
.
editor
)
value
.
append
(
FilterEntry
(
this
,
displayName
,
qVariantFromValue
(
e
ditorE
ntry
.
editor
)));
}
else
{
QFileInfo
fi
(
fileName
);
FilterEntry
e
ntry
(
this
,
fi
.
fileName
(),
fileName
);
e
ntry
.
extraInfo
=
QDir
::
toNativeSeparators
(
fi
.
path
());
e
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
e
ntry
);
FilterEntry
fiE
ntry
(
this
,
fi
.
fileName
(),
fileName
);
fiE
ntry
.
extraInfo
=
QDir
::
toNativeSeparators
(
fi
.
path
());
fiE
ntry
.
resolveFileIcon
=
true
;
value
.
append
(
fiE
ntry
);
}
}
}
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
55edbe1c
...
...
@@ -1624,8 +1624,8 @@ void ProjectExplorerPlugin::runProjectContextMenu()
bool
ProjectExplorerPlugin
::
hasBuildSettings
(
Project
*
pro
)
{
const
QList
<
Project
*>
&
projects
=
d
->
m_session
->
projectOrder
(
pro
);
foreach
(
Project
*
pro
,
projects
)
if
(
pro
->
activeTarget
()
->
activeBuildConfiguration
())
foreach
(
Project
*
pro
ject
,
projects
)
if
(
pro
ject
->
activeTarget
()
->
activeBuildConfiguration
())
return
true
;
return
false
;
}
...
...
@@ -1646,9 +1646,9 @@ void ProjectExplorerPlugin::runProjectImpl(Project *pro, QString mode)
const
QList
<
Project
*>
&
projects
=
d
->
m_session
->
projectOrder
(
pro
);
QList
<
BuildConfiguration
*>
configurations
;
foreach
(
Project
*
pro
,
projects
)
if
(
pro
->
activeTarget
()
->
activeBuildConfiguration
())
configurations
<<
pro
->
activeTarget
()
->
activeBuildConfiguration
();
foreach
(
Project
*
pro
ject
,
projects
)
if
(
pro
ject
->
activeTarget
()
->
activeBuildConfiguration
())
configurations
<<
pro
ject
->
activeTarget
()
->
activeBuildConfiguration
();
d
->
m_buildManager
->
buildProjects
(
configurations
);
updateRunActions
();
...
...
src/plugins/projectexplorer/projectfilewizardextension.cpp
View file @
55edbe1c
...
...
@@ -328,10 +328,10 @@ bool ProjectFileWizardExtension::processProject(const QList<Core::GeneratedFile>
typeFileMap
.
insert
(
typeForFileName
(
mdb
,
path
),
path
);
}
foreach
(
FileType
type
,
typeFileMap
.
uniqueKeys
())
{
const
QStringList
f
iles
=
typeFileMap
.
values
(
type
);
if
(
!
project
->
addFiles
(
type
,
f
iles
))
{
const
QStringList
typeF
iles
=
typeFileMap
.
values
(
type
);
if
(
!
project
->
addFiles
(
type
,
typeF
iles
))
{
*
errorMessage
=
tr
(
"Failed to add one or more files to project
\n
'%1' (%2)."
).
arg
(
project
->
path
(),
f
iles
.
join
(
QString
(
QLatin1Char
(
','
))));
arg
(
project
->
path
(),
typeF
iles
.
join
(
QString
(
QLatin1Char
(
','
))));
return
false
;
}
}
...
...
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
View file @
55edbe1c
...
...
@@ -421,8 +421,8 @@ void NavigatorTreeModel::removeSubTree(const ModelNode &node)
rowList
=
itemRow
.
idItem
->
parent
()
->
takeRow
(
itemRow
.
idItem
->
row
());
}
foreach
(
const
ModelNode
&
n
ode
,
modelNodeChildren
(
node
))
{
removeSubTree
(
n
ode
);
foreach
(
const
ModelNode
&
childN
ode
,
modelNodeChildren
(
node
))
{
removeSubTree
(
childN
ode
);
}
qDeleteAll
(
rowList
);
...
...
src/plugins/texteditor/basefilefind.cpp
View file @
55edbe1c
...
...
@@ -327,7 +327,7 @@ QStringList BaseFileFind::replaceAll(const QString &text,
it
.
next
();
const
QString
fileName
=
it
.
key
();
const
QList
<
Find
::
SearchResultItem
>
i
tems
=
it
.
value
();
const
QList
<
Find
::
SearchResultItem
>
changeI
tems
=
it
.
value
();
const
QList
<
Core
::
IEditor
*>
editors
=
editorManager
->
editorsForFileName
(
fileName
);
TextEditor
::
BaseTextEditor
*
textEditor
=
0
;
...
...
@@ -340,7 +340,7 @@ QStringList BaseFileFind::replaceAll(const QString &text,
if
(
textEditor
!=
0
)
{
QTextCursor
tc
=
textEditor
->
textCursor
();
tc
.
beginEditBlock
();
applyChanges
(
textEditor
->
document
(),
text
,
i
tems
);
applyChanges
(
textEditor
->
document
(),
text
,
changeI
tems
);
tc
.
endEditBlock
();
}
else
{
QFile
file
(
fileName
);
...
...
@@ -354,7 +354,7 @@ QStringList BaseFileFind::replaceAll(const QString &text,
QTextDocument
doc
;
doc
.
setPlainText
(
plainText
);
applyChanges
(
&
doc
,
text
,
i
tems
);
applyChanges
(
&
doc
,
text
,
changeI
tems
);
QFile
newFile
(
fileName
);
if
(
newFile
.
open
(
QFile
::
WriteOnly
))
{
...
...
src/plugins/texteditor/fontsettingspage.cpp
View file @
55edbe1c
...
...
@@ -190,22 +190,22 @@ FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescrip
if
(
!
settingsFound
)
{
// Apply defaults
foreach
(
const
FormatDescription
&
f
,
m_descriptions
)
{
const
QString
id
=
f
.
id
();
const
QString
f
id
=
f
.
id
();
m_value
.
formatFor
(
id
).
setForeground
(
f
.
foreground
());
m_value
.
formatFor
(
id
).
setBackground
(
f
.
background
());
m_value
.
formatFor
(
id
).
setBold
(
f
.
format
().
bold
());
m_value
.
formatFor
(
id
).
setItalic
(
f
.
format
().
italic
());
m_value
.
formatFor
(
f
id
).
setForeground
(
f
.
foreground
());
m_value
.
formatFor
(
f
id
).
setBackground
(
f
.
background
());
m_value
.
formatFor
(
f
id
).
setBold
(
f
.
format
().
bold
());
m_value
.
formatFor
(
f
id
).
setItalic
(
f
.
format
().
italic
());
}
}
else
if
(
m_value
.
colorSchemeFileName
().
isEmpty
())
{
// No color scheme was loaded, but one might be imported from the ini file
ColorScheme
defaultScheme
;
foreach
(
const
FormatDescription
&
f
,
m_descriptions
)
{
const
QString
id
=
f
.
id
();
defaultScheme
.
formatFor
(
id
).
setForeground
(
f
.
foreground
());
defaultScheme
.
formatFor
(
id
).
setBackground
(
f
.
background
());
defaultScheme
.
formatFor
(
id
).
setBold
(
f
.
format
().
bold
());
defaultScheme
.
formatFor
(
id
).
setItalic
(
f
.
format
().
italic
());
const
QString
f
id
=
f
.
id
();
defaultScheme
.
formatFor
(
f
id
).
setForeground
(
f
.
foreground
());
defaultScheme
.
formatFor
(
f
id
).
setBackground
(
f
.
background
());
defaultScheme
.
formatFor
(
f
id
).
setBold
(
f
.
format
().
bold
());
defaultScheme
.
formatFor
(
f
id
).
setItalic
(
f
.
format
().
italic
());
}
if
(
m_value
.
colorScheme
()
!=
defaultScheme
)
{
// Save it as a color scheme file
...
...
src/shared/proparser/profileevaluator.cpp
View file @
55edbe1c
...
...
@@ -3351,8 +3351,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
int
parens
=
0
;
QString
test
;
test
.
reserve
(
20
);
QString
args
;
args
.
reserve
(
50
);
QString
args
String
;
args
String
.
reserve
(
50
);
const
QChar
*
d
=
cond
.
constData
();
const
QChar
*
ed
=
d
+
cond
.
size
();
while
(
d
<
ed
)
{
...
...
@@ -3368,12 +3368,12 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
}
else
if
(
c
==
'('
)
{
isFunc
=
true
;
if
(
parens
)
args
+=
c
;
args
String
+=
c
;
++
parens
;
}
else
if
(
c
==
')'
)
{
--
parens
;
if
(
parens
)
args
+=
c
;
args
String
+=
c
;
}
else
if
(
!
parens
)
{
if
(
c
==
'"'
)
quoted
=
true
;
...
...
@@ -3384,12 +3384,12 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
else
test
+=
c
;
}
else
{
args
+=
c
;
args
String
+=
c
;
}
if
(
!
quoted
&&
!
parens
&&
(
isOp
||
d
==
ed
))
{
if
(
m_cumulative
||
(
orOp
!=
ret
))
{
if
(
isFunc
)
ret
=
evaluateConditionalFunction
(
ProString
(
test
),
ProString
(
args
,
NoHash
));
ret
=
evaluateConditionalFunction
(
ProString
(
test
),
ProString
(
args
String
,
NoHash
));
else
ret
=
isActiveConfig
(
test
,
true
);
ret
^=
invert
;
...
...
@@ -3398,7 +3398,7 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
invert
=
false
;
isFunc
=
false
;
test
.
clear
();
args
.
clear
();
args
String
.
clear
();
}
}
return
returnBool
(
ret
);
...
...
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