You don't have to mix anything.
What you use in your enum are hexadecimal values not binary.
That means (left side hex, right side binary): 0x0 == 0, 0x1 == 1, 0x10 == 10000, 0x100 == 100000000!
I guess what you actually want is what Chris Kawa said: 0x01 == 1, 0x02 == 10, 0x04 == 100, 0x08 == 1000, 0x10 == 10000
Today after many times of compiling and testing, I found this error was caused by the definition of macro QT_NO_SHAREDMEMORY, it made the definition of class QSharedMemory unavailable in header file <QT_INSTALL_DIR>/include/QtCore/qsharedmemory.h.
The macro QT_NO_SHAREDMEMORY is defined in qconfig.h, which is generated in my custom-building progress of Qt5.5.0. But the qconfig.h in official version of Qt5.5.0 does not contains the definition of that macro. So I guess whether the configure scripts generated this macro, because qconfig.h is generated by the scripts in file <QT_SRC_DIR>/qtbase/configure.
After many times of testing, I found there is a part of script code which is very strange and make me confused. this part of script lies in line 4453 - 4463:
# check IPC support
if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
# SYSV IPC is not supported - check POSIX IPC
if compileTest unix/ipc_posix "ipc_posix" ; then
if [ "$XPLATFORM_ANDROID" = "no" ] ; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY"
As mentioned above, if the script found the compileTest of ipc_posix failed, and if the target platform is not android, then variable QCONFIG_FLAGS will be appended with QT_NO_SYSTEMSEMAPHORE and QT_NO_SHAREDMEMORY. Therefore the scripts between line 6662 and 6693 will generate the definition of macro QT_NO_SHAREDMEMORY in file qconfig.h.
I'm doubted that why the SYSTEMSEMAPHORE and SHAREDMEMORY should be disabled while the target platform is not android. I guess maybe it is a clerical error and the code if [ "$XPLATFORM_ANDROID" = "no" ] ; should be if [ "$XPLATFORM_ANDROID" != "no" ] ;. But I'm not sure, could any one tell me?