Explicitely specify underlying type for Capacity enums.

This commit is contained in:
Andrius Štikonas 2019-02-10 01:43:05 +00:00
parent 723b05107d
commit 39a5645c38
2 changed files with 5 additions and 6 deletions

View File

@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.* * along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/ *************************************************************************/
#if !defined(KPMCORE_PARTITIONTABLE_H) #ifndef KPMCORE_PARTITIONTABLE_H
#define KPMCORE_PARTITIONTABLE_H #define KPMCORE_PARTITIONTABLE_H
#include "util/libpartitionmanagerexport.h" #include "util/libpartitionmanagerexport.h"
@ -50,7 +49,7 @@ class LIBKPMCORE_EXPORT PartitionTable : public PartitionNode
friend LIBKPMCORE_EXPORT QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable); friend LIBKPMCORE_EXPORT QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable);
public: public:
enum TableType : qint8 { enum TableType : int8_t {
unknownTableType = -1, unknownTableType = -1,
aix, aix,

View File

@ -36,11 +36,11 @@ class LIBKPMCORE_EXPORT Capacity
{ {
public: public:
/** Units we can deal with */ /** Units we can deal with */
enum class Unit : uint { Byte, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB }; enum class Unit : uint8_t {Byte, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB };
/** Type of capacity to print */ /** Type of capacity to print */
enum class Type { Used, Available, Total }; enum class Type : uint8_t { Used, Available, Total };
/** Flags for printing */ /** Flags for printing */
enum class Flag { NoFlags = 0, AppendUnit = 1, AppendBytes = 2 }; enum class Flag : uint8_t { NoFlags = 0, AppendUnit = 1, AppendBytes = 2 };
Q_DECLARE_FLAGS(Flags, Flag) Q_DECLARE_FLAGS(Flags, Flag)
public: public: