Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0
-
None
-
36d524e6a3b64a8c35805c1b868d6d67ccae765c
Description
In qprocessordetection.h the processor definitions for x86 are defined as follows:
# if defined(_M_IX86) # define Q_PROCESSOR_X86 (_M_IX86/100) # elif defined(__i686__) || defined(__athlon__) || defined(__SSE__) || defined(__pentiumpro__) # define Q_PROCESSOR_X86 6 # elif defined(__i586__) || defined(__k6__) || defined(__pentium__) # define Q_PROCESSOR_X86 5 # elif defined(__i486__) || defined(__80486__) # define Q_PROCESSOR_X86 4 # else # define Q_PROCESSOR_X86 3 # endif
defines like _i686_ are defined by compiler. This means that the define is not available for the moc compiler. If you want to compile for X86 and you have a construct like this
#ifndef Q_PROCESSOR_X86
private slots:
void doSomeNonX86Things(void);
#endif
for moc compiler slot doSomeNonX86Things is part of the code (because Q_PROCESSOR_X86 is not defined) and for X86 compiler method doSomeNonX86Things ist NOT part of the code (because Q_PROCESSOR_X86 is defined). In this case code could not be compiled for X86.