[Qt-interest] creating custom types

Frank Hemer frank at hemer.org
Sat Jan 31 13:06:17 CET 2009


On Saturday 31 January 2009 12:59:17 ami guru wrote:
> Hello forum,
>
>
> I am trying to create custom types as follows:
>
>
> ************************************
> struct MFRotaion
> {
>   MFRotation()
>   {
>     this->multiFieldRotationArray.clear();
>   }
>
>
>   MFRotation(const MFRotation &_mfRotation)
>   {
>     this->multiFieldRotationArray = _mfRotation.multiFieldRotationArray;
>   }
>
>   QVector<SFRotation> multiFieldRotationArray;
>
> };
>
>
> Q_DECLARE_METATYPE(MFRotation)
>
>
>
> ***********************************'
>
>
>
> The other custom types were defined and did not give any errors , but the
> above one is giving the following errors:
>
>
> *******************************************
>
> H3DCustomTypes.h:457: error: ISO C++ forbids declaration of 'MFRotation'
> with no type
> H3DCustomTypes.h:463: error: expected ',' or '...' before '&' token
> H3DCustomTypes.h:463: error: ISO C++ forbids declaration of 'MFRotation'
> with no type
> H3DCustomTypes.h:463: error: ISO C++ forbids declaration of 'MFRotation'
> with no type
> H3DCustomTypes.h: In member function 'int MFRotaion::MFRotation()':
> H3DCustomTypes.h:460: warning: no return statement in function returning
> non-void
> H3DCustomTypes.h: In member function 'int MFRotaion::MFRotation(int)':
> H3DCustomTypes.h:465: error: '_mfRotation' was not declared in this scope
> H3DCustomTypes.h:466: warning: no return statement in function returning
> non-void
> H3DCustomTypes.h: At global scope:
> H3DCustomTypes.h:463: warning: unused parameter 'MFRotation'
> H3DCustomTypes.h:473: error: 'MFRotation' was not declared in this scope
> H3DCustomTypes.h:473: error: template argument 1 is invalid
> make[2]: *** [../../Build/H3DSceneEditor/Release/H3DMainWindow.o] Error 1
> make[2]: Leaving directory `/home/sajjad/QT/H3D/src/H3DSceneEditor'
> make[1]: *** [release] Error 2
> make[1]: Leaving directory `/home/sajjad/QT/H3D/src/H3DSceneEditor'
> make: *** [sub-H3DSceneEditor-make_default-ordered] Error 2
>
>
> *******************************************'
>
>
> Any hint?

Typo at MFRotaion???

Frank




More information about the Qt-interest-old mailing list