CppEditor: put Q_DECLARE_METATYPE right after the declaration

And before the first use outside the class. This will make sure the
template specialization is generated in the right place. If not, a
static assert is triggered when C++11 is enabled.

Change-Id: I8de7fa52a9986a1f99f3ad32696121ef565ee3b6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Erik Verbruggen
2013-10-15 13:11:11 +02:00
committed by Erik Verbruggen
parent 3d4c9fdda5
commit f70ad82bef

View File

@@ -339,8 +339,15 @@ enum Virtuality
Virtual,
PureVirtual
};
typedef QList<Virtuality> VirtualityList;
} // Internal namespace
} // CppEditor namespace
Q_DECLARE_METATYPE(CppEditor::Internal::Virtuality)
Q_DECLARE_METATYPE(CppEditor::Internal::VirtualityList)
namespace CppEditor {
namespace Internal {
void CppEditorPlugin::test_functionhelper_virtualFunctions()
{
@@ -431,7 +438,4 @@ void CppEditorPlugin::test_functionhelper_virtualFunctions_data()
} // namespace Internal
} // namespace CppEditor
Q_DECLARE_METATYPE(CppEditor::Internal::Virtuality)
Q_DECLARE_METATYPE(CppEditor::Internal::VirtualityList)
#endif