Replace unsafe toStdString() in DEBUG and WARN (see https://bugreports.qt.

Authored by sgerlach on Apr 26 2020, 12:21 PM.