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
3cd9c596
Commit
3cd9c596
authored
Oct 13, 2010
by
dt
Browse files
Optimize which folders we recursively enumerate
Reviewed-By: hunger
parent
f6402f16
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt4nodes.cpp
View file @
3cd9c596
...
...
@@ -644,15 +644,22 @@ void Qt4PriFileNode::watchFolders(const QSet<QString> &folders)
m_watchedFolders
=
folders
;
}
void
Qt4PriFileNode
::
folderChanged
(
const
QString
&
)
void
Qt4PriFileNode
::
folderChanged
(
const
QString
&
folder
)
{
//qDebug()<<"########## Qt4PriFileNode::folderChanged";
// So, we need to figure out which files changed.
QString
changedFolder
=
folder
;
if
(
!
changedFolder
.
endsWith
(
QLatin1Char
(
'/'
)))
changedFolder
.
append
(
QLatin1Char
(
'/'
));
// Collect all the files
QSet
<
QString
>
newFiles
;
foreach
(
const
QString
&
folder
,
m_watchedFolders
)
{
newFiles
+=
recursiveEnumerate
(
folder
);
newFiles
+=
recursiveEnumerate
(
changedFolder
);
foreach
(
const
QString
&
file
,
m_recursiveEnumerateFiles
)
{
if
(
!
file
.
startsWith
(
changedFolder
))
newFiles
.
insert
(
file
);
}
QSet
<
QString
>
addedFiles
=
newFiles
;
...
...
src/plugins/qt4projectmanager/qt4nodes.h
View file @
3cd9c596
...
...
@@ -155,7 +155,7 @@ public:
bool
renameFile
(
const
FileType
fileType
,
const
QString
&
filePath
,
const
QString
&
newFilePath
);
void
folderChanged
(
const
QString
&
f
older
);
void
folderChanged
(
const
QString
&
changedF
older
);
bool
deploysFolder
(
const
QString
&
folder
)
const
;
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
3cd9c596
...
...
@@ -1258,7 +1258,6 @@ void CentralizedFolderWatcher::folderChanged(const QString &folder)
if
(
!
folder
.
endsWith
(
'/'
))
folderWithSlash
.
append
(
'/'
);
// If a subdirectory was added, watch it too
QSet
<
QString
>
tmp
=
recursiveDirs
(
folderWithSlash
);
if
(
!
tmp
.
isEmpty
())
{
...
...
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