History

minor tweaks in response to code review (very belated) and reported issues - explicitly registering some enums with Qt at runtime (needed if they're function return values) - replaced references to engine() with local variables if they already existed

Heather Anderson committed 4 years ago

Commit 0bce0661 parent 55b5a2c5 files · +10 −5Browse files

Showing the changes to interface/src/scripting/PerformanceScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

interface/src/scripting/PerformanceScriptingInterface.cpp+2−0
@@ -16,6 +16,8 @@ std::once_flag PerformanceScriptingInterface::registry_flag; · 15 unmodified lines
16PerformanceScriptingInterface::PerformanceScriptingInterface() {16PerformanceScriptingInterface::PerformanceScriptingInterface() {
17 std::call_once(registry_flag, [] {17 std::call_once(registry_flag, [] {
18 qmlRegisterType<PerformanceScriptingInterface>("PerformanceEnums", 1, 0, "PerformanceEnums");18 qmlRegisterType<PerformanceScriptingInterface>("PerformanceEnums", 1, 0, "PerformanceEnums");
19 qRegisterMetaType<PerformanceScriptingInterface::PerformancePreset>("PerformanceScriptingInterface::PerformancePreset");
20 qRegisterMetaType<PerformanceScriptingInterface::RefreshRateProfile>("PerformanceScriptingInterface::RefreshRateProfile");
19 });21 });
20}22}
21 23