From 3eae84de134037639e6cfc248d96fcc31b4c9d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 5 Apr 2018 21:54:55 +0100 Subject: [PATCH] Adapt to kpmcore API changes std::array->std::vector. --- src/util/guihelpers.cpp | 5 +++-- src/util/guihelpers.h | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/util/guihelpers.cpp b/src/util/guihelpers.cpp index 33aa2ea..0f8dbeb 100644 --- a/src/util/guihelpers.cpp +++ b/src/util/guihelpers.cpp @@ -116,9 +116,10 @@ FileSystem::Type defaultFileSystem() return static_cast(Config::defaultFileSystem()); } -std::array< QColor, FileSystem::__lastType > fileSystemColorCodesFromSettings() +std::vector fileSystemColorCodesFromSettings() { - std::array< QColor, FileSystem::__lastType > cc; + std::vector cc; + cc.reserve(FileSystem::__lastType); for (int i = 0; i < FileSystem::__lastType; ++i) { cc[ i ] = Config::fileSystemColorCode( i ); diff --git a/src/util/guihelpers.h b/src/util/guihelpers.h index 656be77..5313045 100644 --- a/src/util/guihelpers.h +++ b/src/util/guihelpers.h @@ -16,13 +16,14 @@ * along with this program. If not, see .* *************************************************************************/ -#if !defined(GUIHELPERS_H) - +#ifndef GUIHELPERS_H #define GUIHELPERS_H #include #include +#include + class QIcon; class QPoint; class QString; @@ -35,7 +36,7 @@ void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree); namespace GuiHelpers { FileSystem::Type defaultFileSystem(); -std::array< QColor, FileSystem::__lastType > fileSystemColorCodesFromSettings(); +std::vector fileSystemColorCodesFromSettings(); } #endif