diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-05-27 09:21:08 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-06-23 08:22:31 +0000 |
commit | acaab9e6425726d7a3901e6224c6e59874bc5a62 (patch) | |
tree | 443521d372c2be777626000d26d52e834a661838 /src/bluetooth/qlowenergyservice.h | |
parent | 3acd1a5d4fc4dc501d8b0a149909511e91aafb05 (diff) |
Port from Q_ENUMS to new macro Q_ENUM
Remove Q_ENUMS in favor of the new Q_ENUM macro which provides
registration as meta enum and a debug stream operator.
Register some enums via Q_ENUM to improve debug output
and types auto-registration.
Change-Id: I31c9535a2de7da1783b4ec967612c02a57cb62ff
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergyservice.h')
-rw-r--r-- | src/bluetooth/qlowenergyservice.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bluetooth/qlowenergyservice.h b/src/bluetooth/qlowenergyservice.h index 8d7f8a21..dc03419d 100644 --- a/src/bluetooth/qlowenergyservice.h +++ b/src/bluetooth/qlowenergyservice.h @@ -50,6 +50,7 @@ public: PrimaryService = 0x0001, IncludedService = 0x0002 }; + Q_ENUM(ServiceType) Q_DECLARE_FLAGS(ServiceTypes, ServiceType) enum ServiceError { @@ -61,6 +62,7 @@ public: CharacteristicReadError, DescriptorReadError }; + Q_ENUM(ServiceError) enum ServiceState { InvalidService = 0, @@ -69,11 +71,13 @@ public: DiscoveringServices,// discoverDetails() called and running ServiceDiscovered // all details have been synchronized }; + Q_ENUM(ServiceState) enum WriteMode { WriteWithResponse = 0, WriteWithoutResponse }; + Q_ENUM(WriteMode) ~QLowEnergyService(); @@ -130,7 +134,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QLowEnergyService::ServiceTypes) QT_END_NAMESPACE -Q_DECLARE_METATYPE(QLowEnergyService::ServiceState) -Q_DECLARE_METATYPE(QLowEnergyService::ServiceError) - #endif // QLOWENERGYSERVICE_H |