-
calrama authored
If anyone cares why this is UB : 1. as<std::string>() creates a temporary 2. .c_str() returns a pointer into memory owned by the temporary 3. the temporary's lifetime ends and it is destroyed 4. the pointer into now freed memoroy is passed to QString() Also, don't make non-void functions without returning anything...
calrama authoredIf anyone cares why this is UB : 1. as<std::string>() creates a temporary 2. .c_str() returns a pointer into memory owned by the temporary 3. the temporary's lifetime ends and it is destroyed 4. the pointer into now freed memoroy is passed to QString() Also, don't make non-void functions without returning anything...
Code owners
Assign users and groups as approvers for specific file changes. Learn more.