Replace QString(str.c_str()) with QString::fromStdString.

This is more idiomatic, and less hacky.

Refs #9970.
Finish project loading support for Graphs.

This commit adds support for a few awkward edge cases that were not yet
supported by the project file loading refactoring.

Refs #9970.