src: use FilePath in FileSystem::getFileNamesFromDirectory
This commit is contained in:
@@ -40,13 +40,13 @@ namespace utility
|
||||
{
|
||||
std::vector<std::string> extensions;
|
||||
extensions.push_back(extension);
|
||||
std::vector<std::string> fontFileNames = FileSystem::getFileNamesFromDirectory(path, extensions);
|
||||
std::vector<FilePath> fontFilePaths = FileSystem::getFilePathsFromDirectory(path, extensions);
|
||||
|
||||
std::set<int> loadedFontIds;
|
||||
|
||||
for (const std::string& fontFileName: fontFileNames)
|
||||
for (const FilePath& fontFilePath: fontFilePaths)
|
||||
{
|
||||
QFile file(fontFileName.c_str());
|
||||
QFile file(fontFilePath.str().c_str());
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
int id = QFontDatabase::addApplicationFontFromData(file.readAll());
|
||||
|
||||
@@ -16,12 +16,7 @@ QtProjectWizzardContentPreferences::QtProjectWizzardContentPreferences(
|
||||
, m_oldColorSchemeIndex(-1)
|
||||
, m_newColorSchemeIndex(-1)
|
||||
{
|
||||
std::vector<std::string> colorSchemePaths =
|
||||
FileSystem::getFileNamesFromDirectory(ResourcePaths::getColorSchemesPath(), std::vector<std::string>(1, ".xml"));
|
||||
for (const std::string& colorScheme : colorSchemePaths)
|
||||
{
|
||||
m_colorSchemePaths.push_back(FilePath(colorScheme));
|
||||
}
|
||||
m_colorSchemePaths = FileSystem::getFilePathsFromDirectory(ResourcePaths::getColorSchemesPath(), std::vector<std::string>(1, ".xml"));
|
||||
}
|
||||
|
||||
QtProjectWizzardContentPreferences::~QtProjectWizzardContentPreferences()
|
||||
|
||||
Reference in New Issue
Block a user