diff options
author | con <qtc-committer@nokia.com> | 2010-06-24 15:44:46 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2010-06-24 17:52:25 +0200 |
commit | e8c0c7895c8aee93bebd58e516b912dad3ffb4ab (patch) | |
tree | 3a7cdf18c7741fb634c86cf34b07885db5850d71 /src/plugins/texteditor/findincurrentfile.cpp | |
parent | 4214193d219dc0bd1e2d86d39216b9cc6ffd6843 (diff) | |
download | qt-creator-e8c0c7895c8aee93bebd58e516b912dad3ffb4ab.tar.gz |
Use iterator instead of collecting all the files to search beforehand.
Especially for the file system filter, it's better not to block while
collecting all the file names by first iterating over the file system.
Now, the filters return an iterator, and the search thread takes a file
from it, searches it, and takes the next file.
This also unifies the file iterator for the custom locator filters and
the find in files on file system search filter.
Task-number: QTCREATORBUG-1690
Diffstat (limited to 'src/plugins/texteditor/findincurrentfile.cpp')
-rw-r--r-- | src/plugins/texteditor/findincurrentfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/texteditor/findincurrentfile.cpp b/src/plugins/texteditor/findincurrentfile.cpp index 22170f35e5..736bc78ae4 100644 --- a/src/plugins/texteditor/findincurrentfile.cpp +++ b/src/plugins/texteditor/findincurrentfile.cpp @@ -67,12 +67,12 @@ QKeySequence FindInCurrentFile::defaultShortcut() const return QKeySequence(); } -QStringList FindInCurrentFile::files() +Utils::FileIterator *FindInCurrentFile::files() { QStringList fileList; if (isEnabled()) fileList << m_currentFile->fileName(); - return fileList; + return new Utils::FileIterator(fileList); } bool FindInCurrentFile::isEnabled() const |