Adapt to kpmcore API changes std::array->std::vector.

This commit is contained in:
Andrius Štikonas 2018-04-05 21:54:55 +01:00
parent bf65a186bd
commit 3eae84de13
2 changed files with 7 additions and 5 deletions

View File

@ -116,9 +116,10 @@ FileSystem::Type defaultFileSystem()
return static_cast<FileSystem::Type>(Config::defaultFileSystem());
}
std::array< QColor, FileSystem::__lastType > fileSystemColorCodesFromSettings()
std::vector<QColor> fileSystemColorCodesFromSettings()
{
std::array< QColor, FileSystem::__lastType > cc;
std::vector<QColor> cc;
cc.reserve(FileSystem::__lastType);
for (int i = 0; i < FileSystem::__lastType; ++i)
{
cc[ i ] = Config::fileSystemColorCode( i );

View File

@ -16,13 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(GUIHELPERS_H)
#ifndef GUIHELPERS_H
#define GUIHELPERS_H
#include <fs/filesystem.h>
#include <util/capacity.h>
#include <vector>
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<QColor> fileSystemColorCodesFromSettings();
}
#endif