Add environment variable override helper function
This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
This commit is contained in:
parent
21fb2832e1
commit
41ad3c0938
9 changed files with 68 additions and 60 deletions
|
|
@ -14,3 +14,12 @@ namespace WMUtils {
|
|||
bool isRunningDesktopEnvironment();
|
||||
QString getDrmCardOverride();
|
||||
}
|
||||
|
||||
namespace Utils {
|
||||
template <typename T>
|
||||
bool getEnvironmentVariableOverride(const char* name, T* value) {
|
||||
bool ok;
|
||||
*value = (T)qEnvironmentVariableIntValue(name, &ok);
|
||||
return ok;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue