Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 92e20a4b authored by Leslie Zhai's avatar Leslie Zhai

Change default save path to $HOME/Videos or fallback $HOME instead of /tmp or /var/tmp

BUG: 385367
parent 00cda753
......@@ -17,7 +17,7 @@
#include <KConfigCore/KConfig>
#include <KConfigCore/KConfigGroup>
#include <QtCore/QStandardPaths>
#include <QFileInfo>
K3b::GlobalSettings::GlobalSettings()
: m_eject(true),
......@@ -43,7 +43,13 @@ void K3b::GlobalSettings::readSettings( const KConfigGroup& c )
m_useManualBufferSize = c.readEntry( "Manual buffer size", false );
m_bufferSize = c.readEntry( "Fifo buffer", 4 );
m_force = c.readEntry( "Force unsafe operations", false );
m_defaultTempPath = c.readPathEntry( "Temp Dir", QStandardPaths::writableLocation( QStandardPaths::TempLocation ) );
m_defaultTempPath = c.readPathEntry("Temp Dir",
QStandardPaths::writableLocation(QStandardPaths::MoviesLocation));
QFileInfo checkPath(m_defaultTempPath);
if (!checkPath.exists()) {
m_defaultTempPath =
QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
}
}
......
......@@ -15,10 +15,10 @@
#ifndef _K3B_VIDEOCD_OPTIONS_H_
#define _K3B_VIDEOCD_OPTIONS_H_
#include "k3bglobals.h"
#include <KI18n/KLocalizedString>
#include <QtCore/QString>
#include <QFileInfo>
#include <QStandardPaths>
namespace K3b {
class VideoCdRippingOptions
......@@ -27,6 +27,7 @@ class VideoCdRippingOptions
VideoCdRippingOptions()
: m_videocdsize( 0 ),
m_videocdsource( "/dev/cdrom" ),
m_videocddestination(K3b::defaultTempPath()),
m_videocddescription( i18n( "Video CD" ) ),
m_videocdripfiles( false ),
m_videocdripsegments( false ),
......@@ -34,13 +35,7 @@ class VideoCdRippingOptions
m_ignoreExt( false ),
m_sector2336( false ),
m_extractXML( false )
{
m_videocddestination = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation);
QFileInfo checkPath(m_videocddestination);
if (! checkPath.exists()) {
m_videocddestination = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
}
}
{}
void setVideoCdSize( unsigned long size ) { m_videocdsize = size;}
void setVideoCdSource( const QString& source ) { m_videocdsource = source;}
......
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