• Christian Ehrlicher's avatar
    Fix for QStandardPaths porting · 90051d7c
    Christian Ehrlicher authored
    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!)
               2. Start a puzzle, quit palapeli
               3. Start palapeli and proceed with the last puzzle
                  -> puzzle is loaded correctly
               4. 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
    90051d7c
gameplay.h 4.43 KB