Fix for QStandardPaths porting

Authored by chehrlic on Aug 24 2017, 7:00 AM.

Description

Fix for QStandardPaths porting

Summary:
Since QStandardPaths::locate() only returns a valid filename when
the file exists, we have to make sure to not pass an empty
filename to KConfig when trying to restore / save a puzzle

Test Plan:

  1. remove ~/.local/share/palapeli (very important!)
    1. Start a puzzle, quit palapeli
    2. Start palapeli and proceed with the last puzzle -> puzzle is loaded correctly
    3. Try to restart puuzle (after finished or within) -> all pieces are placed randomly

Reviewers: KDE Games, ltoscano

Reviewed By: ltoscano

Subscribers: ltoscano, KDE Games

Differential Revision: https://phabricator.kde.org/D7502

Details

Committed
chehrlicAug 25 2017, 5:49 PM
Reviewer
ltoscano
Differential Revision
D7502: Fix for QStandardPaths porting
Parents
R423:f9490f5b415e: KF5 port: remove KF5::KDELibs4Support
Branches
Unknown
Tags
Unknown