Commit ab680e3c authored by David Faure's avatar David Faure

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent 36adbf87
......@@ -1031,7 +1031,7 @@ QString K3b::IsoImager::dummyDir( K3b::DirItem* dir )
// permissions we create different dummy dirs to be passed to mkisofs
//
QString path = QStandardPaths::writableLocation( QStandardPaths::DataLocation ) + "/temp/";
QString path = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + "/temp/";
QDir().mkpath(path);
QDir _appDir( path );
......@@ -1092,7 +1092,7 @@ QString K3b::IsoImager::dummyDir( K3b::DirItem* dir )
void K3b::IsoImager::clearDummyDirs()
{
QString jobId = qApp->sessionId() + '_' + QString::number( m_sessionNumber );
QString path = QStandardPaths::writableLocation( QStandardPaths::DataLocation ) + "/temp/";
QString path = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + "/temp/";
QDir().mkpath(path);
QDir appDir( path );
if( appDir.cd( jobId ) ) {
......
......@@ -364,7 +364,7 @@ void K3b::VcdXmlView::write( QFile& file )
d->addFileElement( xmlDoc, elemFolder, QStandardPaths::locate( QStandardPaths::GenericDataLocation, "k3b/cdi/cdi_text.fnt" ), "CDI_TEXT.FNT" );
d->addFileElement( xmlDoc, elemFolder, QStandardPaths::locate( QStandardPaths::GenericDataLocation, "k3b/cdi/cdi_vcd.app" ), "CDI_VCD.APP" );
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::DataLocation ) + "/cdi";
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + "/cdi";
QDir().mkpath(dirPath);
QString usercdicfg = dirPath + "cdi_vcd.cfg";
if ( QFile::exists( usercdicfg ) )
......
......@@ -696,7 +696,7 @@ void K3b::MainWindow::saveProperties( KConfigGroup& grp )
// 4. save the status of every project (modified/saved)
QString saveDir = QString( "%1/sessions/%2/" ).arg(
QStandardPaths::writableLocation( QStandardPaths::DataLocation ),
QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ),
qApp->sessionId() );
QDir().mkpath(saveDir);
......@@ -750,7 +750,7 @@ void K3b::MainWindow::readProperties( const KConfigGroup& grp )
// 4. delete "~/.kde/share/apps/k3b/sessions/" + KApp->sessionId()
QString saveDir = QString( "%1/sessions/%2/" ).arg(
QStandardPaths::writableLocation( QStandardPaths::DataLocation ),
QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ),
qApp->sessionId() );
QDir().mkpath(saveDir);
......
......@@ -32,7 +32,7 @@ namespace
{
QString debuggingOutputFilePath()
{
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::DataLocation );
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation );
QDir().mkpath( dirPath );
return dirPath + "/lastlog.log";
}
......
......@@ -794,7 +794,7 @@ void K3b::VcdBurnDialog::saveSettings( KConfigGroup c )
void K3b::VcdBurnDialog::saveCdiConfig()
{
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::DataLocation ) + "/cdi";
QString dirPath = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + "/cdi";
QDir().mkpath( dirPath );
QString filename = dirPath + "/cdi_vcd.cfg";
......@@ -812,7 +812,7 @@ void K3b::VcdBurnDialog::saveCdiConfig()
void K3b::VcdBurnDialog::loadCdiConfig()
{
QString filename = QStandardPaths::writableLocation( QStandardPaths::DataLocation ) + "/cdi/cdi_vcd.cfg";
QString filename = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + "/cdi/cdi_vcd.cfg";
if ( QFile::exists( filename ) ) {
QFile cdi( filename );
if ( cdi.open( QIODevice::ReadOnly ) ) {
......
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