Improve performance of checking path extension

This commit is contained in:
Vladimir Golovnev (Glassez)
2022-02-14 11:47:29 +03:00
parent bc94de5626
commit 293479a1f2
2 changed files with 4 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ namespace
if (themePath.filename() == CONFIG_FILE_NAME)
return std::make_unique<FolderThemeSource>(themePath);
if ((themePath.extension() == QLatin1String(".qbtheme"))
if ((themePath.hasExtension(QLatin1String(".qbtheme")))
&& QResource::registerResource(themePath.data(), QLatin1String("/uitheme")))
{
return std::make_unique<QRCThemeSource>();