Use cached appName for DBus (dis)connecting.
My previous code assumed it was always called with a valid QCoreApplication
instance AND a valid argc,argv combo. That assumption can fail if main()
exits without having destroyed the app instance.
Also, replace getFile() with QFileInfo::fileName().