diff options
| author | Peter Penz <[email protected]> | 2011-02-09 19:21:58 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-02-09 19:24:27 +0100 |
| commit | d3496b12310d9fec0e52e537c341e87fcaa2f8b5 (patch) | |
| tree | 590f58beeca31163e5b17950540601d8a5dec20e /src/views/dolphiniconsview.cpp | |
| parent | ceba0f6f6a07babac230d1f136d16d34629b4cf3 (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/views/dolphiniconsview.cpp')
| -rw-r--r-- | src/views/dolphiniconsview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<KFileItemDelegate*>(itemDelegate()); - if (delegate != 0) { + if (delegate) { delegate->setMaximumSize(m_itemSize); } } |
