I suppose this if-else-tree could be simplified to

    if (!filePath.isEmpty() && !File(filePath).exists()) {
        _desktopEntry = QSharedPointer<MDesktopEntry>(new MDesktopEntry(filePath));
    } else {
        _desktopEntry.clear();
    }