mart added inline comments. INLINE COMMENTS
> anthonyfieroni wrote in appletquickitem.cpp:57-68 > So Adaptive can a default even environment variable is not setted? > Furthermore you can make a static function to access value > > AppletQuickItemPrivate::PreloadPolicy AppletQuickItemPrivate::appletPolicy() > { > static const PreloadPolicy preloadPolicy = []() -> PreloadPolicy { > if (qEnvironmentVariableIsSet("PLASMA_PRELOAD_POLICY")) { > const QString policy = > QString::fromUtf8(qgetenv("PLASMA_PRELOAD_POLICY")).toLower(); > if (policy == QStringLiteral("aggressive")) { > return Aggressive; > } else if (policy == QStringLiteral("none")) { > return None; > } > } > return Adaptive; > }(); > return preloadPolicy; > } > So Adaptive can a default even environment variable is not setted? yes, adaptive is the default > Furthermore you can make a static function to access value it's done anyways only once as preloadPolicy is already a static? REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D10512 To: mart, #plasma Cc: anthonyfieroni, davidedmundson, broulik, apol, ngraham, plasma-devel, #frameworks, michaelh, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart