diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp
index ce9625eecc6e6f2660113f72737b1f5eecbc3b4c..d0b10a99a2c1beab1d191dc5efe17402b5b35e12 100644
--- a/src/plugins/cppeditor/cppclasswizard.cpp
+++ b/src/plugins/cppeditor/cppclasswizard.cpp
@@ -295,9 +295,9 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
     // Copy/Assignment for shared data classes.
     if (params.classType == Utils::NewClassWidget::SharedDataClass) {
         headerStr << namespaceIndent << indent
-                  << unqualifiedClassName << "(const " << unqualifiedClassName << "&);\n"
+                  << unqualifiedClassName << "(const " << unqualifiedClassName << " &);\n"
                   << namespaceIndent << indent
-                  << unqualifiedClassName << "& operator=(const " << unqualifiedClassName << "&);\n"
+                  << unqualifiedClassName << " &operator=(const " << unqualifiedClassName << " &);\n"
                   << namespaceIndent << indent
                   << '~' << unqualifiedClassName << "();\n";
     }