Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
02fbeb71
Commit
02fbeb71
authored
Jul 31, 2016
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cannot write backup file on first start
parent
e5ca186b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/project/projectmanager.cpp
src/project/projectmanager.cpp
+5
-4
No files found.
src/project/projectmanager.cpp
View file @
02fbeb71
...
@@ -69,10 +69,10 @@ ProjectManager::ProjectManager(QObject* parent) :
...
@@ -69,10 +69,10 @@ ProjectManager::ProjectManager(QObject* parent) :
m_autoSaveTimer
.
setSingleShot
(
true
);
m_autoSaveTimer
.
setSingleShot
(
true
);
connect
(
&
m_autoSaveTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
slotAutoSave
()));
connect
(
&
m_autoSaveTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
slotAutoSave
()));
// Ensure the default data folder exist
// Ensure the default data folder exist
QDir
dir
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppDataLocation
));
QDir
dir
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppDataLocation
));
dir
.
mk
dir
(
QStringLiteral
(
".backup"
));
dir
.
mk
path
(
QStringLiteral
(
".backup"
));
dir
.
mkdir
(
QStringLiteral
(
"titles"
));
dir
.
mkdir
(
QStringLiteral
(
"titles"
));
}
}
...
@@ -321,6 +321,7 @@ bool ProjectManager::saveFileAs()
...
@@ -321,6 +321,7 @@ bool ProjectManager::saveFileAs()
fd
.
setMimeTypeFilters
(
QStringList
()
<<
QStringLiteral
(
"application/x-kdenlive"
));
fd
.
setMimeTypeFilters
(
QStringList
()
<<
QStringLiteral
(
"application/x-kdenlive"
));
fd
.
setAcceptMode
(
QFileDialog
::
AcceptSave
);
fd
.
setAcceptMode
(
QFileDialog
::
AcceptSave
);
fd
.
setFileMode
(
QFileDialog
::
AnyFile
);
fd
.
setFileMode
(
QFileDialog
::
AnyFile
);
fd
.
setOption
(
QFileDialog
::
DontConfirmOverwrite
,
false
);
fd
.
setDefaultSuffix
(
QStringLiteral
(
"kdenlive"
));
fd
.
setDefaultSuffix
(
QStringLiteral
(
"kdenlive"
));
if
(
fd
.
exec
()
!=
QDialog
::
Accepted
)
{
if
(
fd
.
exec
()
!=
QDialog
::
Accepted
)
{
return
false
;
return
false
;
...
@@ -330,12 +331,12 @@ bool ProjectManager::saveFileAs()
...
@@ -330,12 +331,12 @@ bool ProjectManager::saveFileAs()
}
}
QString
outputFile
=
fd
.
selectedFiles
().
at
(
0
);
QString
outputFile
=
fd
.
selectedFiles
().
at
(
0
);
if
(
QFile
::
exists
(
outputFile
))
{
/*
if (QFile::exists(outputFile)) {
// Show the file dialog again if the user does not want to overwrite the file
// Show the file dialog again if the user does not want to overwrite the file
if (KMessageBox::questionYesNo(pCore->window(), i18n("File %1 already exists.\nDo you want to overwrite it?", outputFile)) == KMessageBox::No) {
if (KMessageBox::questionYesNo(pCore->window(), i18n("File %1 already exists.\nDo you want to overwrite it?", outputFile)) == KMessageBox::No) {
return saveFileAs();
return saveFileAs();
}
}
}
}
*/
bool
ok
=
false
;
bool
ok
=
false
;
QDir
cacheDir
=
m_project
->
getCacheDir
(
CacheBase
,
&
ok
);
QDir
cacheDir
=
m_project
->
getCacheDir
(
CacheBase
,
&
ok
);
if
(
ok
)
{
if
(
ok
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment