From 30fd098d9f531941dd08b373a0278a14240bbd31 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 27 May 2011 09:35:47 +0200 Subject: [PATCH] C++ indenter: Make CppCodeStyleSettings a class. Also register it with the meta type system. Change-Id: Id720e43d19765283765e7dbbd46820ba9cfb1be7 Reviewed-on: http://codereview.qt.nokia.com/172 Reviewed-by: Bill King --- src/plugins/cpptools/cppcodestylesettings.h | 3 ++- src/plugins/cpptools/cpptoolsplugin.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/cpptools/cppcodestylesettings.h b/src/plugins/cpptools/cppcodestylesettings.h index 20651ed11c..320c99471f 100644 --- a/src/plugins/cpptools/cppcodestylesettings.h +++ b/src/plugins/cpptools/cppcodestylesettings.h @@ -12,8 +12,9 @@ QT_END_NAMESPACE namespace CppTools { -struct CPPTOOLS_EXPORT CppCodeStyleSettings +class CPPTOOLS_EXPORT CppCodeStyleSettings { +public: CppCodeStyleSettings(); bool indentBlockBraces; diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index cf2762677d..39144d05a2 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -44,6 +44,7 @@ #include "cppcompletionassist.h" #include "cpptoolssettings.h" #include "cppcodestylesettingsfactory.h" +#include "cppcodestylesettings.h" #include @@ -105,6 +106,9 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) { Q_UNUSED(arguments) Q_UNUSED(error) + + qRegisterMetaType("CppTools::CppCodeStyleSettings"); + Core::ICore *core = Core::ICore::instance(); Core::ActionManager *am = core->actionManager(); -- 2.11.0