diff options
| -rw-r--r-- | autotests/kconfigtest.h | 4 | ||||
| -rw-r--r-- | src/core/kconfigbackend.h | 4 | ||||
| -rw-r--r-- | src/core/kconfiggroup.h | 6 | 
3 files changed, 7 insertions, 7 deletions
| diff --git a/autotests/kconfigtest.h b/autotests/kconfigtest.h index 0a3de477..8cd5cdb2 100644 --- a/autotests/kconfigtest.h +++ b/autotests/kconfigtest.h @@ -24,13 +24,13 @@  class KConfigTest : public QObject  {      Q_OBJECT -    Q_ENUMS(Testing) -    Q_FLAGS(Flags)  public:      enum Testing { Ones = 1, Tens = 10, Hundreds = 100}; +    Q_ENUM(Testing)      enum bits { bit0 = 1, bit1 = 2, bit2 = 4, bit3 = 8 };      Q_DECLARE_FLAGS(Flags, bits) +    Q_FLAG(Flags)  private Q_SLOTS:      void initTestCase(); diff --git a/src/core/kconfigbackend.h b/src/core/kconfigbackend.h index 631769be..1fdc0aa7 100644 --- a/src/core/kconfigbackend.h +++ b/src/core/kconfigbackend.h @@ -48,8 +48,6 @@ class QDateTime;  class KCONFIGCORE_EXPORT KConfigBackend : public QObject, public QSharedData  {      Q_OBJECT -    Q_FLAGS(ParseOption) -    Q_FLAGS(WriteOption)  public:      /** @@ -86,6 +84,7 @@ public:          ParseDefaults = 2, /// entries should be marked as @em default          ParseExpansions = 4 /// entries are allowed to be marked as @em expandable      }; +    Q_FLAG(ParseOption)      /// @typedef typedef QFlags<ParseOption> ParseOptions      Q_DECLARE_FLAGS(ParseOptions, ParseOption) @@ -93,6 +92,7 @@ public:      enum WriteOption {          WriteGlobal = 1 /// only write entries marked as "global"      }; +    Q_FLAG(WriteOption)      /// @typedef typedef QFlags<WriteOption> WriteOptions      Q_DECLARE_FLAGS(WriteOptions, WriteOption) diff --git a/src/core/kconfiggroup.h b/src/core/kconfiggroup.h index 3e0052ad..57dd5ad9 100644 --- a/src/core/kconfiggroup.h +++ b/src/core/kconfiggroup.h @@ -650,10 +650,10 @@ private:  #define KCONFIGGROUP_ENUMERATOR_ERROR(ENUM) \      "The Qt MetaObject system does not seem to know about \"" ENUM \ -    "\" please use Q_ENUMS or Q_FLAGS to register it." +    "\" please use Q_ENUM or Q_FLAG to register it."  /** - * To add support for your own enums in KConfig, you can declare them with Q_ENUMS() + * To add support for your own enums in KConfig, you can declare them with Q_ENUM()   * in a QObject subclass (which will make moc generate the code to turn the   * enum into a string and vice-versa), and then (in the cpp code)   * use the macro @@ -686,7 +686,7 @@ private:      { group.writeEntry(key, value, flags); }  /** - * Similar to KCONFIGGROUP_DECLARE_ENUM_QOBJECT but for flags declared with Q_FLAGS() + * Similar to KCONFIGGROUP_DECLARE_ENUM_QOBJECT but for flags declared with Q_FLAG()   * (where multiple values can be set at the same time)   */  #define KCONFIGGROUP_DECLARE_FLAGS_QOBJECT(Class, Flags)                            \ | 
