From df449ac3d419f594090ed74194c0fc24a5ba24e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 9 Apr 2018 13:42:36 +0100 Subject: [PATCH 1/2] Mark old enum values as deprecated. --- src/core/partition.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/partition.h b/src/core/partition.h index f62da08..de3e6c0 100644 --- a/src/core/partition.h +++ b/src/core/partition.h @@ -80,10 +80,10 @@ public: New, /**< from a NewOperation */ Copy, /**< from a CopyOperation */ Restore, /**< from a RestoreOperation */ - StateNone = 0, /**< deprecated */ - StateNew = 1, /**< deprecated */ - StateCopy = 2, /**< deprecated */ - StateRestore = 3 /**< deprecated */ + StateNone __attribute__((deprecated)) = None, + StateNew __attribute__((deprecated)) = New, + StateCopy __attribute__((deprecated)) = Copy, + StateRestore __attribute__((deprecated)) = Restore }; Partition(PartitionNode* parent, const Device& device, const PartitionRole& role, FileSystem* fs, qint64 sectorStart, qint64 sectorEnd, QString partitionPath, PartitionTable::Flags availableFlags = PartitionTable::FlagNone, const QString& mountPoint = QString(), bool mounted = false, PartitionTable::Flags activeFlags = PartitionTable::FlagNone, State state = State::None); From 4773023f7504e9626aaec6e820bfbfd4e81962ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 12 Apr 2018 13:47:33 +0300 Subject: [PATCH 2/2] Add migration documentation for deprecated enum values. --- src/core/partition.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/partition.h b/src/core/partition.h index de3e6c0..63f604d 100644 --- a/src/core/partition.h +++ b/src/core/partition.h @@ -80,10 +80,10 @@ public: New, /**< from a NewOperation */ Copy, /**< from a CopyOperation */ Restore, /**< from a RestoreOperation */ - StateNone __attribute__((deprecated)) = None, - StateNew __attribute__((deprecated)) = New, - StateCopy __attribute__((deprecated)) = Copy, - StateRestore __attribute__((deprecated)) = Restore + StateNone __attribute__((deprecated("Use Partition::State::None"))) = None, + StateNew __attribute__((deprecated("Use Partition::State::New"))) = New, + StateCopy __attribute__((deprecated("Use Partition::State::Copy"))) = Copy, + StateRestore __attribute__((deprecated("Use Partition::State::Restore"))) = Restore }; Partition(PartitionNode* parent, const Device& device, const PartitionRole& role, FileSystem* fs, qint64 sectorStart, qint64 sectorEnd, QString partitionPath, PartitionTable::Flags availableFlags = PartitionTable::FlagNone, const QString& mountPoint = QString(), bool mounted = false, PartitionTable::Flags activeFlags = PartitionTable::FlagNone, State state = State::None);