Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.7.4
-
None
-
Windows 7 x64
Visual Studio 2010 Service Pack 1
Qt 4.7.4
Description
Inside a class, I use the Q_ENUMS() macro to include an enumeration in Qt's meta-object system. I noticed that if I used the strongly typed enums feature from c++11, the moc compiler no longer includes the enum information into the generated .cxx file.
example 1:
class example1 : public QObject
{
Q_ENUMS( enum1 )
public:
enum enum1
;
};
example 2:
class example2 : public QObject
{
Q_ENUMS( enum2 )
public:
enum enum2 : int
;
};
example 3:
class example3 : public QObject
{
Q_ENUMS( enum3 )
public:
enum class enum3
;
};
example 4:
class example4 : public QObject
{
Q_ENUMS( enum4 )
public:
enum class enum4 : int
;
};
Example 1 works with the moc compiler but examples 2, 3, and 4 do not. The code for examples for 2, 3, and 4 are valid for c++11.