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/dolphiniconsview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/views/dolphiniconsview.cpp') diff --git a/src/views/dolphiniconsview.cpp b/src/views/dolphiniconsview.cpp index 6527c8611..a863de72d 100644 --- a/src/views/dolphiniconsview.cpp +++ b/src/views/dolphiniconsview.cpp @@ -54,8 +54,8 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, m_itemSize(), m_dropRect() { - Q_ASSERT(dolphinViewController != 0); - Q_ASSERT(viewModeController != 0); + Q_ASSERT(dolphinViewController); + Q_ASSERT(viewModeController); setModel(proxyModel); setLayoutDirection(Qt::LeftToRight); @@ -93,7 +93,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, // apply the icons mode settings to the widget const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings(); - Q_ASSERT(settings != 0); + Q_ASSERT(settings); if (settings->useSystemFont()) { m_font = KGlobalSettings::generalFont(); @@ -405,7 +405,7 @@ void DolphinIconsView::slotGlobalSettingsChanged(int category) Q_UNUSED(category); const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings(); - Q_ASSERT(settings != 0); + Q_ASSERT(settings); if (settings->useSystemFont()) { m_font = KGlobalSettings::generalFont(); } @@ -449,7 +449,7 @@ void DolphinIconsView::categoryDrawerActionRequested(int action, const QModelInd void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount) { const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings(); - Q_ASSERT(settings != 0); + Q_ASSERT(settings); int itemWidth = settings->itemWidth(); int itemHeight = settings->itemHeight(); @@ -510,7 +510,7 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount) setGridSizeOwn(QSize(itemWidth + spacing * 2, itemHeight + spacing)); KFileItemDelegate* delegate = dynamic_cast(itemDelegate()); - if (delegate != 0) { + if (delegate) { delegate->setMaximumSize(m_itemSize); } } -- cgit v1.3