Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
1d1595e7
Commit
1d1595e7
authored
Nov 02, 2016
by
Jean-Baptiste Mardelle
Browse files
Fix various regressions introduced with project folder change
CCBUG: 371965
parent
4a3f660b
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/doc/documentchecker.cpp
View file @
1d1595e7
...
...
@@ -93,7 +93,6 @@ bool DocumentChecker::hasErrorInClips()
}
if
(
!
storageFolder
.
isEmpty
()
&&
!
QFile
::
exists
(
storageFolder
)
&&
QFile
::
exists
(
m_url
.
adjusted
(
QUrl
::
RemoveFilename
).
path
()
+
QStringLiteral
(
"/"
)
+
documentid
))
{
storageFolder
=
m_url
.
adjusted
(
QUrl
::
RemoveFilename
).
path
();
qDebug
()
<<
"* * *Switching storage folder: "
<<
storageFolder
;
EffectsList
::
setProperty
(
playlists
.
at
(
i
).
toElement
(),
QStringLiteral
(
"kdenlive:docproperties.storagefolder"
),
storageFolder
+
QStringLiteral
(
"/"
)
+
documentid
);
m_doc
.
documentElement
().
setAttribute
(
QStringLiteral
(
"modified"
),
QStringLiteral
(
"1"
));
}
...
...
src/doc/kdenlivedoc.cpp
View file @
1d1595e7
...
...
@@ -1387,7 +1387,10 @@ QMap <QString, QString> KdenliveDoc::documentProperties()
{
m_documentProperties
.
insert
(
QStringLiteral
(
"version"
),
QString
::
number
(
DOCUMENTVERSION
));
m_documentProperties
.
insert
(
QStringLiteral
(
"kdenliveversion"
),
QStringLiteral
(
KDENLIVE_VERSION
));
m_documentProperties
.
insert
(
QStringLiteral
(
"storagefolder"
),
m_projectFolder
+
QStringLiteral
(
"/"
)
+
m_documentProperties
.
value
(
QStringLiteral
(
"documentid"
)));
if
(
!
m_projectFolder
.
isEmpty
())
{
m_documentProperties
.
insert
(
QStringLiteral
(
"storagefolder"
),
m_projectFolder
+
QStringLiteral
(
"/"
)
+
m_documentProperties
.
value
(
QStringLiteral
(
"documentid"
)));
}
m_documentProperties
.
insert
(
QStringLiteral
(
"profile"
),
profilePath
());
m_documentProperties
.
insert
(
QStringLiteral
(
"position"
),
QString
::
number
(
m_render
->
seekPosition
().
frames
(
m_render
->
fps
())));
return
m_documentProperties
;
...
...
src/kdenlivesettings.kcfg
View file @
1d1595e7
...
...
@@ -383,7 +383,7 @@
<label>
Default folder for project files.
</label>
<default></default>
</entry>
<entry
name=
"customprojectfolder"
type=
"Bool"
>
<label>
Don't use default XDG folders to store project files.
</label>
<default>
false
</default>
...
...
src/project/dialogs/projectsettings.cpp
View file @
1d1595e7
...
...
@@ -96,13 +96,8 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap <QString, QString> metad
QString
storageFolder
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"storagefolder"
));
if
(
!
storageFolder
.
isEmpty
())
{
custom_folder
->
setChecked
(
true
);
QDir
dir
(
storageFolder
);
dir
.
cdUp
();
project_folder
->
setUrl
(
QUrl
::
fromLocalFile
(
dir
.
absolutePath
()));
}
else
{
xdg_folder
->
setChecked
(
true
);
project_folder
->
setUrl
(
QUrl
::
fromLocalFile
(
KdenliveSettings
::
defaultprojectfolder
()));
}
project_folder
->
setUrl
(
QUrl
::
fromLocalFile
(
doc
->
projectFolder
()));
TemporaryData
*
cacheWidget
=
new
TemporaryData
(
doc
,
true
,
this
);
connect
(
cacheWidget
,
SIGNAL
(
disableProxies
()),
this
,
SIGNAL
(
disableProxies
()));
connect
(
cacheWidget
,
SIGNAL
(
disablePreview
()),
this
,
SIGNAL
(
disablePreview
()));
...
...
@@ -119,9 +114,8 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap <QString, QString> metad
m_proxyextension
=
KdenliveSettings
::
proxyextension
();
m_previewparams
=
KdenliveSettings
::
previewparams
();
m_previewextension
=
KdenliveSettings
::
previewextension
();
xdg_folder
->
setChecked
(
!
KdenliveSettings
::
customprojectfolder
());
custom_folder
->
setChecked
(
KdenliveSettings
::
customprojectfolder
());
project_folder
->
setUrl
(
QUrl
::
fromLocalFile
(
KdenliveSettings
::
defaultprojectfolder
(
)));
project_folder
->
setUrl
(
QUrl
::
fromLocalFile
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
CacheLocation
)));
}
// Select profile
...
...
src/project/projectmanager.cpp
View file @
1d1595e7
...
...
@@ -336,7 +336,7 @@ bool ProjectManager::hasSelection() const
bool
ProjectManager
::
saveFileAs
()
{
QFileDialog
fd
(
pCore
->
window
());
fd
.
setDirectory
(
m_project
->
url
().
isValid
()
?
m_project
->
url
().
adjusted
(
QUrl
::
RemoveFilename
).
path
()
:
m_project
->
project
F
older
());
fd
.
setDirectory
(
m_project
->
url
().
isValid
()
?
m_project
->
url
().
adjusted
(
QUrl
::
RemoveFilename
).
path
()
:
KdenliveSettings
::
default
project
f
older
());
fd
.
setMimeTypeFilters
(
QStringList
()
<<
QStringLiteral
(
"application/x-kdenlive"
));
fd
.
setAcceptMode
(
QFileDialog
::
AcceptSave
);
fd
.
setFileMode
(
QFileDialog
::
AnyFile
);
...
...
src/ui/configproject_ui.ui
View file @
1d1595e7
...
...
@@ -248,7 +248,11 @@
</widget>
</item>
<item>
<widget
class=
"KUrlRequester"
name=
"projecturl"
/>
<widget
class=
"KUrlRequester"
name=
"projecturl"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
</widget>
</item>
</layout>
</item>
...
...
src/ui/projectsettings_ui.ui
View file @
1d1595e7
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
591
</width>
<height>
7
46
</height>
<height>
7
10
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -27,26 +27,26 @@
<string>
Settings
</string>
</attribute>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"
0
"
column=
"
0"
colspan=
"4
"
>
<widget
class=
"Q
Label"
name=
"label_4
"
>
<item
row=
"
4
"
column=
"
1
"
>
<widget
class=
"Q
CheckBox"
name=
"video_thumbs
"
>
<property
name=
"text"
>
<string>
Project folder to store proxy clips, thumbnails, previews
</string>
<string>
Video
</string>
</property>
</widget>
</item>
<item
row=
"
1
"
column=
"
0"
colspan=
"4
"
>
<widget
class=
"Q
RadioButton"
name=
"xdg_folder
"
>
<item
row=
"
4
"
column=
"
2
"
>
<widget
class=
"Q
CheckBox"
name=
"audio_thumbs
"
>
<property
name=
"text"
>
<string>
Standard system fo
&
lders
</string>
<string>
Audio
</string>
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"0"
colspan=
"4"
>
<item
row=
"
1
"
column=
"0"
colspan=
"4"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"Q
RadioButton
"
name=
"custom_folder"
>
<widget
class=
"Q
CheckBox
"
name=
"custom_folder"
>
<property
name=
"text"
>
<string>
C
&
ustom
F
older
</string>
<string>
Custom
project f
older
</string>
</property>
</widget>
</item>
...
...
@@ -59,14 +59,14 @@
</item>
</layout>
</item>
<item
row=
"
3
"
column=
"0"
colspan=
"4"
>
<item
row=
"
2
"
column=
"0"
colspan=
"4"
>
<widget
class=
"QGroupBox"
name=
"profile_box"
>
<property
name=
"title"
>
<string>
Video Profile
</string>
</property>
</widget>
</item>
<item
row=
"
4
"
column=
"0"
colspan=
"4"
>
<item
row=
"
3
"
column=
"0"
colspan=
"4"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QLabel"
name=
"label_7"
>
...
...
@@ -103,41 +103,21 @@
</item>
</layout>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Thumbnails:
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"video_thumbs"
>
<item
row=
"0"
column=
"0"
colspan=
"4"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
Video
</string>
<string>
Project folder to store proxy clips, thumbnails, previews
</string>
</property>
</widget>
</item>
<item
row=
"
5
"
column=
"
2
"
>
<widget
class=
"Q
CheckBox"
name=
"audio_thumbs
"
>
<item
row=
"
4
"
column=
"
0
"
>
<widget
class=
"Q
Label"
name=
"label_2
"
>
<property
name=
"text"
>
<string>
Audio
</string>
<string>
Thumbnails:
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"3"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
229
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"6"
column=
"0"
colspan=
"4"
>
<item
row=
"5"
column=
"0"
colspan=
"4"
>
<widget
class=
"QGroupBox"
name=
"enable_proxy"
>
<property
name=
"title"
>
<string>
Prox
&
y clips
</string>
...
...
@@ -248,7 +228,7 @@
</layout>
</widget>
</item>
<item
row=
"
7
"
column=
"0"
colspan=
"4"
>
<item
row=
"
6
"
column=
"0"
colspan=
"4"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QLabel"
name=
"label_25"
>
...
...
@@ -292,7 +272,7 @@
</item>
</layout>
</item>
<item
row=
"
8
"
column=
"0"
colspan=
"4"
>
<item
row=
"
7
"
column=
"0"
colspan=
"4"
>
<widget
class=
"QPlainTextEdit"
name=
"previewparams"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Maximum"
>
...
...
@@ -305,7 +285,7 @@
</property>
</widget>
</item>
<item
row=
"
9
"
column=
"0"
colspan=
"4"
>
<item
row=
"
8
"
column=
"0"
colspan=
"4"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -318,22 +298,28 @@
</property>
</spacer>
</item>
<item
row=
"4"
column=
"3"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
229
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
<zorder>
label_4
</zorder>
<zorder>
project_folder
</zorder>
<zorder>
profile_box
</zorder>
<zorder>
label_2
</zorder>
<zorder>
video_thumbs
</zorder>
<zorder>
audio_thumbs
</zorder>
<zorder>
enable_proxy
</zorder>
<zorder></zorder>
<zorder></zorder>
<zorder>
horizontalSpacer
</zorder>
<zorder>
label_25
</zorder>
<zorder>
proxyparams
</zorder>
<zorder>
xdg_folder
</zorder>
<zorder>
custom_folder
</zorder>
<zorder>
verticalSpacer
</zorder>
<zorder>
previewparams
</zorder>
<zorder>
verticalSpacer
</zorder>
</widget>
...
...
@@ -535,25 +521,6 @@
</widget>
</item>
</layout>
<zorder>
tabWidget
</zorder>
<zorder>
buttonBox
</zorder>
<zorder>
label_4
</zorder>
<zorder>
preview_profile
</zorder>
<zorder>
label_7
</zorder>
<zorder>
audio_thumbs
</zorder>
<zorder>
label_8
</zorder>
<zorder>
label_25
</zorder>
<zorder>
preview_showprofileinfo
</zorder>
<zorder>
video_tracks
</zorder>
<zorder>
profile_box
</zorder>
<zorder>
horizontalSpacer
</zorder>
<zorder>
enable_proxy
</zorder>
<zorder>
video_thumbs
</zorder>
<zorder>
preview_manageprofile
</zorder>
<zorder>
horizontalSpacer_2
</zorder>
<zorder>
project_folder
</zorder>
<zorder>
label_2
</zorder>
<zorder>
audio_tracks
</zorder>
</widget>
<customwidgets>
<customwidget>
...
...
@@ -614,12 +581,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
92
</x>
<y>
1
37
</y>
<x>
124
</x>
<y>
1
01
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
377
</x>
<y>
1
37
</y>
<x>
409
</x>
<y>
1
01
</y>
</hint>
</hints>
</connection>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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