CppEditor: Remove duplicate code in cppeditorplugin.cpp

Change-Id: Ifeff4455b1ce0a0a7299f009beaf6319e9abb523
Reviewed-by: David Schulz <david.schulz@digia.com>