mWorker->search(dir, recursive, filter);
}
bool Internal::Engine::busy() const
{
mWorker->search(dir, recursive, filter);
}
bool Internal::Engine::busy() const
{
foreach (QString const & file, files) {
// Check for the cancel flag
{
QMutexLocker l(&mLock);
if (mDoCancel)
foreach (QString const & file, files) {
// Check for the cancel flag
{
QMutexLocker l(&mLock);
if (mDoCancel)
/* We read ReadBufferSize bytes from the file and append to the buffer.
* We keep max 2 x ReadBufferSize bytes in the buffer and throw away the oldest
* ReadBufferSize bytes of data. Every block is checked twice, but we make sure that
* also strings that stretch from one block to another are checked.
*/
/* We read ReadBufferSize bytes from the file and append to the buffer.
* We keep max 2 x ReadBufferSize bytes in the buffer and throw away the oldest
* ReadBufferSize bytes of data. Every block is checked twice, but we make sure that
* also strings that stretch from one block to another are checked.
*/
buf.append(b);
if (buf.size() > (2 * ReadBufferSize))
buf.remove(0, ReadBufferSize);
buf.append(b);
if (buf.size() > (2 * ReadBufferSize))
buf.remove(0, ReadBufferSize);
foreach (QString const & directory, dirs) {
// Check for the cancel flag
{
QMutexLocker l(&mLock);
if (mDoCancel)
foreach (QString const & directory, dirs) {
// Check for the cancel flag
{
QMutexLocker l(&mLock);
if (mDoCancel)