Replace std::array with std::vector
Less efficient but helps with keeping ABI stable
This commit is contained in:
parent
54be18e8ad
commit
63cea60ff1
|
@ -15,8 +15,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_DEVICE_H)
|
#ifndef KPMCORE_DEVICE_H
|
||||||
|
|
||||||
#define KPMCORE_DEVICE_H
|
#define KPMCORE_DEVICE_H
|
||||||
|
|
||||||
#include "util/libpartitionmanagerexport.h"
|
#include "util/libpartitionmanagerexport.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@ FileSystem::CommandSupportType btrfs::m_UpdateUUID = FileSystem::cmdSupportNone;
|
||||||
FileSystem::CommandSupportType btrfs::m_GetUUID = FileSystem::cmdSupportNone;
|
FileSystem::CommandSupportType btrfs::m_GetUUID = FileSystem::cmdSupportNone;
|
||||||
|
|
||||||
btrfs::btrfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QStorageInfo>
|
#include <QStorageInfo>
|
||||||
|
|
||||||
const std::array< QColor, FileSystem::__lastType > FileSystem::defaultColorCode =
|
const std::vector<QColor> FileSystem::defaultColorCode =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
QColor( 220,205,175 ), // unknown
|
QColor( 220,205,175 ), // unknown
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <array>
|
#include <vector>
|
||||||
|
|
||||||
class QColor;
|
class QColor;
|
||||||
class QValidator;
|
class QValidator;
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Supported FileSystem types */
|
/** Supported FileSystem types */
|
||||||
enum Type {
|
enum Type : int {
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
Extended = 1,
|
Extended = 1,
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public:
|
||||||
cmdSupportBackend = 4 /**< supported by the backend */
|
cmdSupportBackend = 4 /**< supported by the backend */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::array< QColor, __lastType > defaultColorCode;
|
static const std::vector<QColor> defaultColorCode;
|
||||||
|
|
||||||
Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType)
|
Q_DECLARE_FLAGS(CommandSupportTypes, CommandSupportType)
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ void PartWidget::updateChildren()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PartWidget::setFileSystemColorCode(const std::array< QColor, FileSystem::__lastType >& colorCode)
|
void PartWidget::setFileSystemColorCode(const std::vector<QColor>& colorCode)
|
||||||
{
|
{
|
||||||
m_fileSystemColorCode = colorCode;
|
m_fileSystemColorCode = colorCode;
|
||||||
repaint();
|
repaint();
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
#include <array>
|
|
||||||
|
|
||||||
class Partition;
|
class Partition;
|
||||||
|
|
||||||
class QPaintEvent;
|
class QPaintEvent;
|
||||||
|
@ -63,7 +61,7 @@ public:
|
||||||
return m_Partition; /**< @return the widget's Partition */
|
return m_Partition; /**< @return the widget's Partition */
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFileSystemColorCode( const std::array< QColor, FileSystem::__lastType >& colorCode );
|
void setFileSystemColorCode( const std::vector<QColor>& colorCode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent* event);
|
void paintEvent(QPaintEvent* event);
|
||||||
|
@ -76,7 +74,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
Partition* m_Partition;
|
Partition* m_Partition;
|
||||||
bool m_Active;
|
bool m_Active;
|
||||||
std::array< QColor, FileSystem::__lastType > m_fileSystemColorCode;
|
std::vector<QColor> m_fileSystemColorCode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue