┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-02-09 19:21:58 +0100
committerPeter Penz <[email protected]>2011-02-09 19:24:27 +0100
commitd3496b12310d9fec0e52e537c341e87fcaa2f8b5 (patch)
tree590f58beeca31163e5b17950540601d8a5dec20e /src/search
parentceba0f6f6a07babac230d1f136d16d34629b4cf3 (diff)
Coding style update for pointer comparison
Most developers seem to prefer if (ptr) ... if (!ptr) ... in comparison to if (ptr != 0) ... if (ptr == 0) ... Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.
Diffstat (limited to 'src/search')
-rw-r--r--src/search/filenamesearchprotocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/search/filenamesearchprotocol.cpp b/src/search/filenamesearchprotocol.cpp
index ddc23789c..4d6f59fa4 100644
--- a/src/search/filenamesearchprotocol.cpp
+++ b/src/search/filenamesearchprotocol.cpp
@@ -89,7 +89,7 @@ void FileNameSearchProtocol::searchDirectory(const KUrl& directory)
const KFileItemList items = dirLister->items();
foreach (const KFileItem& item, items) {
bool addItem = false;
- if ((m_regExp == 0) || item.name().contains(*m_regExp)) {
+ if (!m_regExp || item.name().contains(*m_regExp)) {
addItem = true;
} else if (m_checkContent && item.mimetype().startsWith(QLatin1String("text/"))) {
addItem = contentContainsPattern(item.url());
@@ -129,7 +129,7 @@ void FileNameSearchProtocol::searchDirectory(const KUrl& directory)
bool FileNameSearchProtocol::contentContainsPattern(const KUrl& fileName) const
{
- Q_ASSERT(m_regExp != 0);
+ Q_ASSERT(m_regExp);
QString path;
KTemporaryFile tempFile;