Skip to content
Permalink
Browse files

fix bug with Qt < 5.12 and Q_FLAG

  • Loading branch information
3nids committed Sep 11, 2020
1 parent 4544c96 commit 14ef69f8a5b3fceaf415ab4e9e9ef6389fae3631
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/core/qgsfield.h
@@ -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

/**

0 comments on commit 14ef69f

Please sign in to comment.
You can’t perform that action at this time.