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/dolphinviewactionhandler.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/dolphinviewactionhandler.cpp')
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 0959a03f7..6046abc8c 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -320,7 +320,7 @@ KActionCollection* DolphinViewActionHandler::actionCollection() void DolphinViewActionHandler::updateViewActions() { QAction* viewModeAction = m_actionCollection->action(currentViewModeActionName()); - if (viewModeAction != 0) { + if (viewModeAction) { viewModeAction->setChecked(true); QAction* viewModeMenu = m_actionCollection->action("view_mode"); @@ -484,7 +484,7 @@ void DolphinViewActionHandler::slotSortingChanged(DolphinView::Sorting sorting) } } - if (action != 0) { + if (action) { action->setChecked(true); QAction* sortByMenu = m_actionCollection->action("sort"); @@ -495,12 +495,12 @@ void DolphinViewActionHandler::slotSortingChanged(DolphinView::Sorting sorting) void DolphinViewActionHandler::slotZoomLevelChanged(int level) { QAction* zoomInAction = m_actionCollection->action(KStandardAction::name(KStandardAction::ZoomIn)); - if (zoomInAction != 0) { + if (zoomInAction) { zoomInAction->setEnabled(level < ZoomLevelInfo::maximumLevel()); } QAction* zoomOutAction = m_actionCollection->action(KStandardAction::name(KStandardAction::ZoomOut)); - if (zoomOutAction != 0) { + if (zoomOutAction) { zoomOutAction->setEnabled(level > ZoomLevelInfo::minimumLevel()); } } |
