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/panels/terminal/terminalpanel.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/panels/terminal/terminalpanel.cpp') diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index d928380d8..61d80cbfa 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -58,9 +58,7 @@ bool TerminalPanel::urlChanged() return false; } - const bool sendInput = (m_terminal != 0) - && (m_terminal->foregroundProcessId() == -1) - && isVisible(); + const bool sendInput = m_terminal && (m_terminal->foregroundProcessId() == -1) && isVisible(); if (sendInput) { changeDir(url()); } @@ -75,18 +73,18 @@ void TerminalPanel::showEvent(QShowEvent* event) return; } - if (m_terminal == 0) { + if (!m_terminal) { m_clearTerminal = true; KPluginFactory* factory = KPluginLoader("libkonsolepart").factory(); KParts::ReadOnlyPart* part = factory ? (factory->create(this)) : 0; - if (part != 0) { + if (part) { connect(part, SIGNAL(destroyed(QObject*)), this, SLOT(terminalExited())); m_terminalWidget = part->widget(); m_layout->addWidget(m_terminalWidget); m_terminal = qobject_cast(part); } } - if (m_terminal != 0) { + if (m_terminal) { m_terminal->showShellInDir(url().toLocalFile()); changeDir(url()); m_terminalWidget->setFocus(); -- cgit v1.3