Commit df65e081 authored by Volker Krause's avatar Volker Krause
Browse files

Work around moc4's limited understanding of preprocessor conditionals

parent 50a8ad26
......@@ -94,6 +94,9 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include \"${CMAKE_SOURCE_DIR}/src/compat/qt4compat.h\"")
endif()
include(Qt4ECMStub)
# Qt4 moc limitation workaround (Qt4 moc cannot evaluate QT_VERSION preprocessor conditionals
add_definitions(-DQT4_MOC_WORKAROUND)
endif()
# debug suffixes for qmake compatibility
......
......@@ -108,8 +108,12 @@ public:
DetailedSystemInformation = 0x30, ///< Transmit detailed system information.
DetailedUsageStatistics = 0x40, ///< Transmit detailed usage statistics.
};
#ifndef QT4_MOC_WORKAROUND
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
Q_ENUM(StatisticsCollectionMode)
#else
Q_ENUMS(StatisticsCollectionMode)
#endif
#else
Q_ENUMS(StatisticsCollectionMode)
#endif
......
......@@ -43,7 +43,7 @@ class SurveyInfoData;
*/
class USERFEEDBACKCORE_EXPORT SurveyInfo
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#ifndef QT4_MOC_WORKAROUND
Q_GADGET
Q_PROPERTY(bool isValid READ isValid)
Q_PROPERTY(QUrl url READ url)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment