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