┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/filenamesearchprotocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/filenamesearchprotocol.h')
-rw-r--r--src/search/filenamesearchprotocol.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/search/filenamesearchprotocol.h b/src/search/filenamesearchprotocol.h
index 1a2b8ad68..b2d64d6e3 100644
--- a/src/search/filenamesearchprotocol.h
+++ b/src/search/filenamesearchprotocol.h
@@ -19,25 +19,26 @@
#ifndef FILENAMESEARCHPROTOCOL_H
#define FILENAMESEARCHPROTOCOL_H
-
+
#include <kio/slavebase.h>
+class KFileItem;
class KUrl;
class QRegExp;
-
+
/**
* @brief Lists files where the filename matches do a given query.
*
* The query is defined as part of the "search" query item of the URL.
- * Example: The URL filenamesearch:///home/peter?search=hello lists
- * recursively all files inside the directory home/peter, that contain
- * the "hello" as part of their filename.
+ * The directory where the searching is started is defined in the "url" query
+ * item. If the query item "checkContent" is set to "yes", all files with
+ * a text MIME type will be checked for the content.
*/
class FileNameSearchProtocol : public KIO::SlaveBase {
public:
FileNameSearchProtocol(const QByteArray& pool, const QByteArray& app);
virtual ~FileNameSearchProtocol();
-
+
virtual void listDir(const KUrl& url);
private:
@@ -47,10 +48,11 @@ private:
* @return True, if the pattern m_searchPattern is part of
* the file \a fileName.
*/
- bool containsPattern(const KUrl& fileName) const;
+ bool contentContainsPattern(const KUrl& fileName) const;
+
bool m_checkContent;
QRegExp* m_regExp;
};
-
+
#endif