mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Simplify findSvgFilePath, define result value on definition
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
c42cb28741
commit
1284749d70
1 changed files with 5 additions and 3 deletions
|
@ -23,15 +23,16 @@
|
|||
#include <QSvgRenderer>
|
||||
|
||||
namespace {
|
||||
|
||||
QString findSvgFilePath(const QString &fileName, const QStringList &possibleColors)
|
||||
{
|
||||
QString result;
|
||||
result = QString{OCC::Theme::themePrefix} + fileName;
|
||||
auto result = QString{OCC::Theme::themePrefix + fileName};
|
||||
|
||||
if (QFile::exists(result)) {
|
||||
return result;
|
||||
} else {
|
||||
for (const auto &color : possibleColors) {
|
||||
result = QString{OCC::Theme::themePrefix} + color + QStringLiteral("/") + fileName;
|
||||
result = QString{OCC::Theme::themePrefix + color + QStringLiteral("/") + fileName};
|
||||
|
||||
if (QFile::exists(result)) {
|
||||
return result;
|
||||
|
@ -42,6 +43,7 @@ QString findSvgFilePath(const QString &fileName, const QStringList &possibleColo
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace OCC {
|
||||
|
|
Loading…
Reference in a new issue