[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kubrick/frameworks] src: QStandardPaths::DataLocation is deprecated.
From:       Frederik Schwarzer <schwarzer () kde ! org>
Date:       2016-04-07 20:26:24
Message-ID: E1aoGVU-0007RW-Lq () scm ! kde ! org
[Download RAW message or body]

Git commit f1538eefb8bda6375943c502cde0053b129e132b by Frederik Schwarzer.
Committed on 07/04/2016 at 20:26.
Pushed by schwarzer into branch 'frameworks'.

QStandardPaths::DataLocation is deprecated.

M  +4    -4    src/game.cpp

http://commits.kde.org/kubrick/f1538eefb8bda6375943c502cde0053b129e132b

diff --git a/src/game.cpp b/src/game.cpp
index ac0232d..a3cec42 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -411,7 +411,7 @@ void Game::loadDemo (const QString & file)
 {
     if ((! demoPhase) && tooBusy())
 	return;
-    QString demoFile = QStandardPaths::locate(QStandardPaths::DataLocation, file);
+    QString demoFile = QStandardPaths::locate(QStandardPaths::AppDataLocation, \
file);  KConfig config (demoFile, KConfig::SimpleConfig);
     if (config.hasGroup ("KubrickGame")) {
 	if (! demoPhase) {
@@ -957,7 +957,7 @@ void Game::saveState ()
     if (demoPhase) {
 	return;				// Don't save if quitting during a demo.
     }
-    QString sFile = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + \
QLatin1Char('/') + "kubrick.save"; +    QString sFile = \
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') \
+ "kubrick.save";  KConfig config (sFile, KConfig::SimpleConfig);
     savePuzzle (config);
 }
@@ -965,7 +965,7 @@ void Game::saveState ()
 
 void Game::restoreState ()
 {
-    QString rFile = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + \
QLatin1Char('/') + "kubrick.save"; +    QString rFile = \
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') \
+ "kubrick.save";  KConfig config (rFile, KConfig::SimpleConfig);
     if (config.hasGroup ("KubrickGame")) {
 	loadPuzzle (config);
@@ -1826,7 +1826,7 @@ void Game::startNextDisplay ()
     int nRMoves = 0;
 
     // Set the animation speed: 0 = no animation, 15 = fastest.  Note that if
-    // the "Watch Your Own Moves" option is off, animation is set to very fast. 
+    // the "Watch Your Own Moves" option is off, animation is set to very fast.
     int shSpeed = viewShuffle ? moveSpeed : 0;
     int mvSpeed = viewMoves   ? moveSpeed : defaultOwnMove;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic