Skip to content

Commit

Permalink
fix bug with Qt < 5.12 and Q_FLAG
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 11, 2020
1 parent 4544c96 commit 14ef69f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/qgsfield.h
Expand Up @@ -73,15 +73,24 @@ class CORE_EXPORT QgsField
* and are not describing any information from the data provider.
* \since QGIS 3.16
*/
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
enum ConfigurationFlag
#else
enum class ConfigurationFlag : int
#endif
{
None = 0, //!< No flag is defined
Searchable = 0x1, //!< Defines if the field is searchable (used in the locator search for instance)
DefaultFlags = Searchable, //!< Default set of flags for a field
};
Q_ENUM( ConfigurationFlag )
Q_DECLARE_FLAGS( ConfigurationFlags, ConfigurationFlag )
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
// https://bugreports.qt.io/browse/QTBUG-47652
Q_ENUM( ConfigurationFlags )
#else
Q_FLAG( ConfigurationFlags )
#endif
#endif

/**
Expand Down

0 comments on commit 14ef69f

Please sign in to comment.