Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
699495f0
Commit
699495f0
authored
14 years ago
by
Friedemann Kleint
Browse files
Options
Downloads
Patches
Plain Diff
Fix compiler warnings, constify.
parent
dfee3388
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/utils/filesearch.cpp
+7
-9
7 additions, 9 deletions
src/libs/utils/filesearch.cpp
src/plugins/qt4projectmanager/profileeditor.cpp
+1
-1
1 addition, 1 deletion
src/plugins/qt4projectmanager/profileeditor.cpp
with
8 additions
and
10 deletions
src/libs/utils/filesearch.cpp
+
7
−
9
View file @
699495f0
...
@@ -79,20 +79,18 @@ void runFileSearch(QFutureInterface<FileSearchResultList> &future,
...
@@ -79,20 +79,18 @@ void runFileSearch(QFutureInterface<FileSearchResultList> &future,
future
.
setProgressRange
(
0
,
files
->
maxProgress
());
future
.
setProgressRange
(
0
,
files
->
maxProgress
());
future
.
setProgressValueAndText
(
files
->
currentProgress
(),
msgFound
(
searchTerm
,
numMatches
,
numFilesSearched
));
future
.
setProgressValueAndText
(
files
->
currentProgress
(),
msgFound
(
searchTerm
,
numMatches
,
numFilesSearched
));
bool
caseInsensitive
=
!
(
flags
&
QTextDocument
::
FindCaseSensitively
);
const
bool
caseInsensitive
=
!
(
flags
&
QTextDocument
::
FindCaseSensitively
);
bool
wholeWord
=
(
flags
&
QTextDocument
::
FindWholeWords
);
const
bool
wholeWord
=
(
flags
&
QTextDocument
::
FindWholeWords
);
const
QString
searchTermLower
=
searchTerm
.
toLower
();
const
QString
searchTermLower
=
searchTerm
.
toLower
();
const
QString
searchTermUpper
=
searchTerm
.
toUpper
();
const
QString
searchTermUpper
=
searchTerm
.
toUpper
();
int
termLength
=
searchTerm
.
length
();
const
int
termLength
=
searchTerm
.
length
();
int
termMaxIndex
=
termLength
-
1
;
const
int
termMaxIndex
=
termLength
-
1
;
const
QChar
*
termData
=
searchTerm
.
constData
();
const
QChar
*
termData
=
searchTerm
.
constData
();
const
QChar
*
termDataLower
=
searchTermLower
.
constData
();
const
QChar
*
termDataLower
=
searchTermLower
.
constData
();
const
QChar
*
termDataUpper
=
searchTermUpper
.
constData
();
const
QChar
*
termDataUpper
=
searchTermUpper
.
constData
();
int
chunkSize
=
qMax
(
100000
,
2
*
termLength
);
QFile
file
;
QFile
file
;
QString
str
;
QString
str
;
QTextStream
stream
;
QTextStream
stream
;
...
@@ -295,7 +293,7 @@ QString Utils::expandRegExpReplacement(const QString &replaceText, const QString
...
@@ -295,7 +293,7 @@ QString Utils::expandRegExpReplacement(const QString &replaceText, const QString
{
{
// handles \1 \\ \& & \t
// handles \1 \\ \& & \t
QString
result
;
QString
result
;
int
numCaptures
=
capturedTexts
.
size
()
-
1
;
const
int
numCaptures
=
capturedTexts
.
size
()
-
1
;
for
(
int
i
=
0
;
i
<
replaceText
.
length
();
++
i
)
{
for
(
int
i
=
0
;
i
<
replaceText
.
length
();
++
i
)
{
QChar
c
=
replaceText
.
at
(
i
);
QChar
c
=
replaceText
.
at
(
i
);
if
(
c
==
QLatin1Char
(
'\\'
)
&&
i
<
replaceText
.
length
()
-
1
)
{
if
(
c
==
QLatin1Char
(
'\\'
)
&&
i
<
replaceText
.
length
()
-
1
)
{
...
@@ -408,8 +406,8 @@ bool SubDirFileIterator::hasNext() const
...
@@ -408,8 +406,8 @@ bool SubDirFileIterator::hasNext() const
return
true
;
return
true
;
while
(
!
m_dirs
.
isEmpty
()
&&
m_currentFiles
.
isEmpty
())
{
while
(
!
m_dirs
.
isEmpty
()
&&
m_currentFiles
.
isEmpty
())
{
QDir
dir
=
m_dirs
.
pop
();
QDir
dir
=
m_dirs
.
pop
();
qreal
dirProgressMax
=
m_progressValues
.
pop
();
const
qreal
dirProgressMax
=
m_progressValues
.
pop
();
bool
processed
=
m_processedValues
.
pop
();
const
bool
processed
=
m_processedValues
.
pop
();
if
(
dir
.
exists
())
{
if
(
dir
.
exists
())
{
QStringList
subDirs
;
QStringList
subDirs
;
if
(
!
processed
)
{
if
(
!
processed
)
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/profileeditor.cpp
+
1
−
1
View file @
699495f0
...
@@ -121,7 +121,7 @@ static bool isValidFileNameChar(const QChar &c)
...
@@ -121,7 +121,7 @@ static bool isValidFileNameChar(const QChar &c)
}
}
ProFileEditor
::
Link
ProFileEditor
::
findLinkAt
(
const
QTextCursor
&
cursor
,
ProFileEditor
::
Link
ProFileEditor
::
findLinkAt
(
const
QTextCursor
&
cursor
,
bool
resolveTarget
)
bool
/*
resolveTarget
*/
)
{
{
Link
link
;
Link
link
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment