From d3496b12310d9fec0e52e537c341e87fcaa2f8b5 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 9 Feb 2011 19:21:58 +0100 Subject: 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. --- src/views/draganddrophelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/views/draganddrophelper.cpp') diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index 24d5156e5..f7508e094 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -62,11 +62,11 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, const QModelIndexList indexes = itemView->selectionModel()->selectedIndexes(); if (!indexes.isEmpty()) { QMimeData *data = itemView->model()->mimeData(indexes); - if (data == 0) { + if (!data) { return; } - if (dolphinViewController != 0) { + if (dolphinViewController) { dolphinViewController->requestToolTipHiding(); } @@ -83,7 +83,7 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, bool DragAndDropHelper::isDragSource(QAbstractItemView* itemView) const { - return (m_dragSource != 0) && (m_dragSource == itemView); + return m_dragSource && (m_dragSource == itemView); } void DragAndDropHelper::dropUrls(const KFileItem& destItem, -- cgit v1.3