diff options
author | Iikka Eklund <iikka.eklund@digia.com> | 2012-09-06 13:42:29 +0300 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2012-09-28 10:52:53 +0200 |
commit | 63a37ecd2b60fa841f704a8b8b51a9ccfc400c7d (patch) | |
tree | 9fea342605d449abc800bf39f944ec2d2ce4765e | |
parent | 4767575f303a65ce7e7b7010db559729168f61b6 (diff) |
Fix filter list handling in qtpatchoperation.cpp
Fix a bug in filter handling. If no filters were given it caused all
files to be included which was not the original intention.
Added a check if no filters given then do not even try to search files
by type.
Change-Id: I2ceb83611c1c9a4a9f8bf58da0673c963dd4ae0c
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
-rw-r--r-- | src/libs/installer/qtpatchoperation.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libs/installer/qtpatchoperation.cpp b/src/libs/installer/qtpatchoperation.cpp index c37bec8fe..0ea72c48a 100644 --- a/src/libs/installer/qtpatchoperation.cpp +++ b/src/libs/installer/qtpatchoperation.cpp @@ -309,10 +309,12 @@ bool QtPatchOperation::performOperation() #endif // get file list defined by filters and patch them - QStringList filteredContent = getDirContent(prefix, filters); - foreach (QString fileName, filteredContent) { - if (QFile::exists(fileName)) { - QtPatch::patchTextFile(fileName, searchReplacePairs); + if (filters.count() > 0) { + const QStringList filteredContent = getDirContent(prefix, filters); + foreach (const QString &fileName, filteredContent) { + if (QFile::exists(fileName)) { + QtPatch::patchTextFile(fileName, searchReplacePairs); + } } } |