Commit efe80215 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

FeaturedModel: improve mobile check

parent 70e969ab
......@@ -44,7 +44,7 @@ FeaturedModel::FeaturedModel()
const QString dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QDir().mkpath(dir);
const bool isMobile = qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE");
const bool isMobile = QByteArrayList{"1", "true"}.contains(qgetenv("QT_QUICK_CONTROLS_MOBILE"));
auto fileName = isMobile ? QLatin1String("/featured-mobile-5.9.json") : QLatin1String("/featured-5.9.json");
*featuredCache = dir + fileName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment