Commit 62884f30 authored by Frederik Schwarzer's avatar Frederik Schwarzer

QStandardPaths::DataLocation is deprecated.

parent e6150f8f
......@@ -21,7 +21,7 @@
* -------------------------------------------------------------------------
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -260,7 +260,7 @@ int main( int argc, char **argv )
}
}
}
}
}
return 0;
}
......@@ -311,7 +311,7 @@ int main( int argc, char **argv )
}
QString gametype = parser.value(QStringLiteral("gametype")).toLower();
QFile savedState( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + saved_state_file) ;
QFile savedState( QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + saved_state_file);
MainWindow *w = new MainWindow;
if (parser.positionalArguments().count())
......@@ -335,6 +335,6 @@ int main( int argc, char **argv )
w->show();
const KDBusService dbusService(KDBusService::Multiple);
return app.exec();
}
......@@ -23,7 +23,7 @@
* -------------------------------------------------------------------------
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -726,7 +726,7 @@ void MainWindow::toggleDemo()
}
void MainWindow::toggleDemoAction(bool active)
void MainWindow::toggleDemoAction(bool active)
{
m_demoAction->setChecked( active );
m_demoAction->setIcon( QIcon::fromTheme( QLatin1String( active ? "media-playback-pause" : "media-playback-start" ) ) );
......@@ -756,7 +756,7 @@ void MainWindow::saveNewToolbarConfig()
void MainWindow::closeEvent(QCloseEvent *e)
{
QString stateDirName = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
QString stateDirName = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QString stateFileName = stateDirName + QLatin1Char('/') + saved_state_file ;
QDir stateFileDir(stateDirName);
if(!stateFileDir.exists())
......@@ -768,7 +768,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
// Remove the existing state file, if any.
stateFile.remove();
if ( m_dealer )
{
if ( Settings::rememberStateOnExit() && !m_dealer->isGameWon() )
......
......@@ -3,7 +3,7 @@
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -22,8 +22,8 @@
SoundEngine::SoundEngine( QObject * parent )
: QObject( parent ),
m_cardPickedUp( QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("sounds/card-pickup.ogg") ) ),
m_cardPutDown( QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("sounds/card-down.ogg") ) )
m_cardPickedUp( QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("sounds/card-pickup.ogg") ) ),
m_cardPutDown( QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("sounds/card-down.ogg") ) )
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment