diff --git a/src/core/device.h b/src/core/device.h index a32f77b..db7c391 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -15,8 +15,7 @@ * along with this program. If not, see .* *************************************************************************/ -#if !defined(KPMCORE_DEVICE_H) - +#ifndef KPMCORE_DEVICE_H #define KPMCORE_DEVICE_H #include "util/libpartitionmanagerexport.h" diff --git a/src/fs/btrfs.cpp b/src/fs/btrfs.cpp index e202213..864cf56 100644 --- a/src/fs/btrfs.cpp +++ b/src/fs/btrfs.cpp @@ -44,7 +44,7 @@ FileSystem::CommandSupportType btrfs::m_UpdateUUID = FileSystem::cmdSupportNone; FileSystem::CommandSupportType btrfs::m_GetUUID = FileSystem::cmdSupportNone; btrfs::btrfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) : - FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Btrfs) + FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Type::Btrfs) { } diff --git a/src/fs/filesystem.cpp b/src/fs/filesystem.cpp index f540145..0dea891 100644 --- a/src/fs/filesystem.cpp +++ b/src/fs/filesystem.cpp @@ -36,7 +36,7 @@ #include #include -const std::array< QColor, FileSystem::__lastType > FileSystem::defaultColorCode = +const std::vector FileSystem::defaultColorCode = { { QColor( 220,205,175 ), // unknown diff --git a/src/fs/filesystem.h b/src/fs/filesystem.h index 244c83c..fb5816f 100644 --- a/src/fs/filesystem.h +++ b/src/fs/filesystem.h @@ -28,7 +28,7 @@ #include #include -#include +#include class QColor; class QValidator; @@ -57,7 +57,7 @@ public: }; /** Supported FileSystem types */ - enum Type { + enum Type : int { Unknown = 0, Extended = 1, @@ -101,7 +101,7 @@ public: cmdSupportBackend = 4 /**< supported by the backend */ }; - static const std::array< QColor, __lastType > defaultColorCode; + static const std::vector defaultColorCode; Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType) diff --git a/src/gui/partwidget.cpp b/src/gui/partwidget.cpp index 49b252f..3615c3d 100644 --- a/src/gui/partwidget.cpp +++ b/src/gui/partwidget.cpp @@ -71,7 +71,7 @@ void PartWidget::updateChildren() } } -void PartWidget::setFileSystemColorCode(const std::array< QColor, FileSystem::__lastType >& colorCode) +void PartWidget::setFileSystemColorCode(const std::vector& colorCode) { m_fileSystemColorCode = colorCode; repaint(); diff --git a/src/gui/partwidget.h b/src/gui/partwidget.h index 452aa69..8275483 100644 --- a/src/gui/partwidget.h +++ b/src/gui/partwidget.h @@ -26,8 +26,6 @@ #include -#include - class Partition; class QPaintEvent; @@ -63,7 +61,7 @@ public: return m_Partition; /**< @return the widget's Partition */ } - void setFileSystemColorCode( const std::array< QColor, FileSystem::__lastType >& colorCode ); + void setFileSystemColorCode( const std::vector& colorCode ); protected: void paintEvent(QPaintEvent* event); @@ -76,7 +74,7 @@ protected: private: Partition* m_Partition; bool m_Active; - std::array< QColor, FileSystem::__lastType > m_fileSystemColorCode; + std::vector m_fileSystemColorCode; }; #endif