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/dolphindetailsview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/views/dolphindetailsview.cpp') diff --git a/src/views/dolphindetailsview.cpp b/src/views/dolphindetailsview.cpp index 482925aaa..5c2e9576f 100644 --- a/src/views/dolphindetailsview.cpp +++ b/src/views/dolphindetailsview.cpp @@ -59,9 +59,9 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, m_decorationSize() { const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); - Q_ASSERT(settings != 0); - Q_ASSERT(dolphinViewController != 0); - Q_ASSERT(viewModeController != 0); + Q_ASSERT(settings); + Q_ASSERT(dolphinViewController); + Q_ASSERT(viewModeController); setLayoutDirection(Qt::LeftToRight); setAcceptDrops(true); @@ -388,7 +388,7 @@ void DolphinDetailsView::configureSettings(const QPoint& pos) popup.addSeparator(); QAction* activatedAction = popup.exec(header()->mapToGlobal(pos)); - if (activatedAction != 0) { + if (activatedAction) { const bool show = activatedAction->isChecked(); const int columnIndex = activatedAction->data().toInt(); @@ -574,7 +574,7 @@ void DolphinDetailsView::slotGlobalSettingsChanged(int category) Q_UNUSED(category); const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); - Q_ASSERT(settings != 0); + Q_ASSERT(settings); if (settings->useSystemFont()) { m_font = KGlobalSettings::generalFont(); } -- cgit v1.3