Make sure target for displayMsg is not null

In the key related functions bufferInfo.bufferName() was used, but this
returns a null QString, which causes a segfault when processed later on,
so replace them with emtpy strings.