Skip to content
GitLab
Menu
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
f4177065
Commit
f4177065
authored
Jul 23, 2012
by
Jean-Baptiste Mardelle
Browse files
Use char for single character [krazy 1-44] by Mikko Rapeli
parent
e286ff48
Changes
44
Hide whitespace changes
Inline
Side-by-side
renderer/kdenlive_render.cpp
View file @
f4177065
...
...
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
if
(
vprepos
>=
0
)
{
vpre
=
args
.
at
(
vprepos
);
}
QStringList
vprelist
=
vpre
.
replace
(
"vpre="
,
""
).
split
(
","
);
QStringList
vprelist
=
vpre
.
replace
(
"vpre="
,
""
).
split
(
','
);
if
(
vprelist
.
size
()
>
0
)
{
args
.
replaceInStrings
(
QRegExp
(
"^vpre=.*"
),
QString
(
"vpre="
).
append
(
vprelist
.
at
(
0
)));
}
...
...
src/abstractclipitem.cpp
View file @
f4177065
...
...
@@ -351,7 +351,7 @@ int AbstractClipItem::mouseOverKeyFrames(QPointF pos, double maxOffset)
x1
=
br
.
x
()
+
maxw
*
(
i
.
key
()
-
cropStart
().
frames
(
m_fps
));
y1
=
br
.
bottom
()
-
(
i
.
value
()
-
m_keyframeOffset
)
*
maxh
;
if
(
qAbs
(
pos
.
x
()
-
x1
)
<
maxOffset
&&
qAbs
(
pos
.
y
()
-
y1
)
<
10
)
{
setToolTip
(
'['
+
QString
::
number
((
GenTime
(
i
.
key
(),
m_fps
)
-
cropStart
()).
seconds
(),
'f'
,
2
)
+
i18n
(
"seconds"
)
+
", "
+
QString
::
number
(
i
.
value
(),
'f'
,
1
)
+
"]"
);
setToolTip
(
'['
+
QString
::
number
((
GenTime
(
i
.
key
(),
m_fps
)
-
cropStart
()).
seconds
(),
'f'
,
2
)
+
i18n
(
"seconds"
)
+
", "
+
QString
::
number
(
i
.
value
(),
'f'
,
1
)
+
']'
);
return
i
.
key
();
}
else
if
(
x1
>
pos
.
x
())
{
break
;
...
...
src/archivewidget.cpp
View file @
f4177065
...
...
@@ -197,7 +197,7 @@ ArchiveWidget::ArchiveWidget(QString projectName, QDomDocument doc, QList <DocCl
}
}
else
total
+=
items
;
parentItem
->
setText
(
0
,
files_list
->
topLevelItem
(
i
)
->
text
(
0
)
+
" "
+
i18np
(
"(%1 item)"
,
"(%1 items)"
,
items
));
parentItem
->
setText
(
0
,
files_list
->
topLevelItem
(
i
)
->
text
(
0
)
+
' '
+
i18np
(
"(%1 item)"
,
"(%1 items)"
,
items
));
}
}
if
(
m_name
.
isEmpty
())
m_name
=
i18n
(
"Untitled"
);
...
...
@@ -356,7 +356,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items
QString
filter
=
slideUrl
.
fileName
();
QString
ext
=
filter
.
section
(
'.'
,
-
1
);
filter
=
filter
.
section
(
'%'
,
0
,
-
2
);
QString
regexp
=
"^"
+
filter
+
"
\\
d+
\\
."
+
ext
+
"$"
;
QString
regexp
=
'^'
+
filter
+
"
\\
d+
\\
."
+
ext
+
'$'
;
QRegExp
rx
(
regexp
);
QStringList
slideImages
;
QString
directory
=
dir
.
absolutePath
();
...
...
@@ -376,10 +376,10 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items
else
if
(
filesList
.
contains
(
fileName
))
{
// we have 2 files with same name
int
ix
=
0
;
QString
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
"_"
+
QString
::
number
(
ix
)
+
"."
+
fileName
.
section
(
'.'
,
-
1
);
QString
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
'_'
+
QString
::
number
(
ix
)
+
'.'
+
fileName
.
section
(
'.'
,
-
1
);
while
(
filesList
.
contains
(
newFileName
))
{
ix
++
;
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
"_"
+
QString
::
number
(
ix
)
+
"."
+
fileName
.
section
(
'.'
,
-
1
);
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
'_'
+
QString
::
number
(
ix
)
+
'.'
+
fileName
.
section
(
'.'
,
-
1
);
}
fileName
=
newFileName
;
item
->
setData
(
0
,
Qt
::
UserRole
,
fileName
);
...
...
@@ -442,7 +442,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QMap <QString, QS
QString
filter
=
slideUrl
.
fileName
();
QString
ext
=
filter
.
section
(
'.'
,
-
1
);
filter
=
filter
.
section
(
'%'
,
0
,
-
2
);
QString
regexp
=
"^"
+
filter
+
"
\\
d+
\\
."
+
ext
+
"$"
;
QString
regexp
=
'^'
+
filter
+
"
\\
d+
\\
."
+
ext
+
'$'
;
QRegExp
rx
(
regexp
);
QStringList
slideImages
;
qint64
totalSize
=
0
;
...
...
@@ -462,7 +462,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QMap <QString, QS
else
if
(
filesList
.
contains
(
fileName
))
{
// we have 2 files with same name
int
ix
=
0
;
QString
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
"_"
+
QString
::
number
(
ix
)
+
"."
+
fileName
.
section
(
'.'
,
-
1
);
QString
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
'_'
+
QString
::
number
(
ix
)
+
'.'
+
fileName
.
section
(
'.'
,
-
1
);
while
(
filesList
.
contains
(
newFileName
))
{
ix
++
;
newFileName
=
fileName
.
section
(
'.'
,
0
,
-
2
)
+
"_"
+
QString
::
number
(
ix
)
+
"."
+
fileName
.
section
(
'.'
,
-
1
);
...
...
@@ -549,7 +549,7 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
else
isSlideshow
=
false
;
files_list
->
setCurrentItem
(
parentItem
);
parentItem
->
setExpanded
(
true
);
destPath
=
parentItem
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
"/"
;
destPath
=
parentItem
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
'/'
;
destUrl
=
KUrl
(
archive_url
->
url
().
path
(
KUrl
::
AddTrailingSlash
)
+
destPath
);
QTreeWidgetItem
*
item
;
for
(
int
j
=
0
;
j
<
parentItem
->
childCount
();
j
++
)
{
...
...
@@ -558,7 +558,7 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
// Special case: slideshows
items
++
;
if
(
isSlideshow
)
{
destPath
+=
item
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
"/"
;
destPath
+=
item
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
'/'
;
destUrl
=
KUrl
(
archive_url
->
url
().
path
(
KUrl
::
AddTrailingSlash
)
+
destPath
);
QStringList
srcFiles
=
item
->
data
(
0
,
Qt
::
UserRole
+
1
).
toStringList
();
for
(
int
k
=
0
;
k
<
srcFiles
.
count
();
k
++
)
{
...
...
@@ -689,7 +689,7 @@ bool ArchiveWidget::processProjectFile()
KUrl
src
(
item
->
text
(
0
));
KUrl
dest
=
destUrl
;
if
(
isSlideshow
)
{
dest
=
KUrl
(
destUrl
.
path
(
KUrl
::
AddTrailingSlash
)
+
item
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
"/"
+
src
.
fileName
());
dest
=
KUrl
(
destUrl
.
path
(
KUrl
::
AddTrailingSlash
)
+
item
->
data
(
0
,
Qt
::
UserRole
).
toString
()
+
'/'
+
src
.
fileName
());
}
else
if
(
item
->
data
(
0
,
Qt
::
UserRole
).
isNull
())
{
dest
.
addPath
(
src
.
fileName
());
...
...
@@ -703,7 +703,7 @@ bool ArchiveWidget::processProjectFile()
}
QDomElement
mlt
=
m_doc
.
documentElement
();
QString
root
=
mlt
.
attribute
(
"root"
)
+
"/"
;
QString
root
=
mlt
.
attribute
(
"root"
)
+
'/'
;
// Adjust global settings
QString
basePath
;
...
...
@@ -769,8 +769,8 @@ bool ArchiveWidget::processProjectFile()
QString
endString
(
"
\"
"
);
endString
.
append
(
basePath
);
playList
.
replace
(
startString
,
endString
);
startString
=
">"
+
archive_url
->
url
().
path
(
KUrl
::
RemoveTrailingSlash
);
endString
=
">"
+
basePath
;
startString
=
'>'
+
archive_url
->
url
().
path
(
KUrl
::
RemoveTrailingSlash
);
endString
=
'>'
+
basePath
;
playList
.
replace
(
startString
,
endString
);
}
...
...
@@ -1005,7 +1005,7 @@ void ArchiveWidget::slotProxyOnly(int onlyProxy)
itemsCount
++
;
}
}
parentItem
->
setText
(
0
,
parentItem
->
text
(
0
).
section
(
"("
,
0
,
0
)
+
i18np
(
"(%1 item)"
,
"(%1 items)"
,
itemsCount
));
parentItem
->
setText
(
0
,
parentItem
->
text
(
0
).
section
(
'('
,
0
,
0
)
+
i18np
(
"(%1 item)"
,
"(%1 items)"
,
itemsCount
));
}
project_files
->
setText
(
i18np
(
"%1 file to archive, requires %2"
,
"%1 files to archive, requires %2"
,
total
,
KIO
::
convertSize
(
m_requestedSize
)));
slotCheckSpace
();
...
...
src/clipitem.cpp
View file @
f4177065
...
...
@@ -823,7 +823,7 @@ void ClipItem::paint(QPainter *painter,
else
{
#if KDE_IS_VERSION(4,5,0)
if
(
m_clip
&&
m_clip
->
thumbProducer
())
{
QString
path
=
m_clip
->
fileURL
().
path
()
+
"_"
;
QString
path
=
m_clip
->
fileURL
().
path
()
+
'_'
;
QImage
img
;
QPen
pen
(
Qt
::
white
);
pen
.
setStyle
(
Qt
::
DotLine
);
...
...
@@ -1539,14 +1539,14 @@ EffectsParameterList ClipItem::addEffect(QDomElement effect, bool /*animate*/)
needInOutSync
=
true
;
}
if
(
e
.
attribute
(
"type"
)
==
"simplekeyframe"
)
{
QStringList
values
=
e
.
attribute
(
"keyframes"
).
split
(
";"
,
QString
::
SkipEmptyParts
);
QStringList
values
=
e
.
attribute
(
"keyframes"
).
split
(
';'
,
QString
::
SkipEmptyParts
);
double
factor
=
locale
.
toDouble
(
e
.
attribute
(
"factor"
,
"1"
));
double
offset
=
e
.
attribute
(
"offset"
,
"0"
).
toDouble
();
if
(
factor
!=
1
||
offset
!=
0
)
{
for
(
int
j
=
0
;
j
<
values
.
count
();
j
++
)
{
QString
pos
=
values
.
at
(
j
).
section
(
':'
,
0
,
0
);
double
val
=
(
locale
.
toDouble
(
values
.
at
(
j
).
section
(
':'
,
1
,
1
))
-
offset
)
/
factor
;
values
[
j
]
=
pos
+
"="
+
locale
.
toString
(
val
);
values
[
j
]
=
pos
+
'='
+
locale
.
toString
(
val
);
}
}
parameters
.
addParam
(
e
.
attribute
(
"name"
),
values
.
join
(
";"
));
...
...
@@ -1797,18 +1797,18 @@ void ClipItem::insertKeyframe(QDomElement effect, int pos, int val)
newkfr
.
append
(
str
);
}
else
if
(
!
added
)
{
if
(
i
==
m_visibleParam
)
newkfr
.
append
(
QString
::
number
(
pos
)
+
":"
+
QString
::
number
(
val
));
newkfr
.
append
(
QString
::
number
(
pos
)
+
':'
+
QString
::
number
(
val
));
else
newkfr
.
append
(
QString
::
number
(
pos
)
+
":"
+
locale
.
toString
(
newval
));
newkfr
.
append
(
QString
::
number
(
pos
)
+
':'
+
locale
.
toString
(
newval
));
if
(
kpos
>
pos
)
newkfr
.
append
(
str
);
added
=
true
;
}
else
newkfr
.
append
(
str
);
}
if
(
!
added
)
{
if
(
i
==
m_visibleParam
)
newkfr
.
append
(
QString
::
number
(
pos
)
+
":"
+
QString
::
number
(
val
));
newkfr
.
append
(
QString
::
number
(
pos
)
+
':'
+
QString
::
number
(
val
));
else
newkfr
.
append
(
QString
::
number
(
pos
)
+
":"
+
e
.
attribute
(
"default"
));
newkfr
.
append
(
QString
::
number
(
pos
)
+
':'
+
e
.
attribute
(
"default"
));
}
e
.
setAttribute
(
"keyframes"
,
newkfr
.
join
(
";"
));
}
...
...
@@ -1836,9 +1836,9 @@ void ClipItem::movedKeyframe(QDomElement effect, int oldpos, int newpos, double
newpos
=
qMax
(
newpos
,
start
);
newpos
=
qMin
(
newpos
,
end
);
if
(
i
==
m_visibleParam
)
newkfr
.
append
(
QString
::
number
(
newpos
)
+
":"
+
locale
.
toString
(
value
));
newkfr
.
append
(
QString
::
number
(
newpos
)
+
':'
+
locale
.
toString
(
value
));
else
newkfr
.
append
(
QString
::
number
(
newpos
)
+
":"
+
str
.
section
(
':'
,
1
,
1
));
newkfr
.
append
(
QString
::
number
(
newpos
)
+
':'
+
str
.
section
(
':'
,
1
,
1
));
}
}
e
.
setAttribute
(
"keyframes"
,
newkfr
.
join
(
";"
));
...
...
@@ -2059,9 +2059,9 @@ void ClipItem::updateGeometryKeyframes(QDomElement effect, int paramIndex, int w
if
(
keyframe
.
contains
(
'='
))
{
int
pos
=
keyframe
.
section
(
'='
,
0
,
0
).
toInt
();
pos
+=
offset
;
data
.
append
(
QString
::
number
(
pos
)
+
"="
+
keyframe
.
section
(
'='
,
1
)
+
";"
);
data
.
append
(
QString
::
number
(
pos
)
+
'='
+
keyframe
.
section
(
'='
,
1
)
+
";"
);
}
else
data
.
append
(
keyframe
+
";"
);
else
data
.
append
(
keyframe
+
';'
);
}
}
Mlt
::
Geometry
geometry
(
data
.
toUtf8
().
data
(),
oldInfo
.
cropDuration
.
frames
(
m_fps
),
width
,
height
);
...
...
src/clipmanager.cpp
View file @
f4177065
...
...
@@ -531,7 +531,7 @@ void ClipManager::slotAddClipList(const KUrl::List urls, const QString &group, c
KFileMetaInfo
metaInfo
(
file
.
path
(),
QString
(
"image/jpeg"
),
KFileMetaInfo
::
TechnicalInfo
);
const
QHash
<
QString
,
KFileMetaInfoItem
>
metaInfoItems
=
metaInfo
.
items
();
foreach
(
const
KFileMetaInfoItem
&
metaInfoItem
,
metaInfoItems
)
{
prod
.
setAttribute
(
"meta.attr."
+
metaInfoItem
.
name
().
section
(
"#"
,
1
),
metaInfoItem
.
value
().
toString
());
prod
.
setAttribute
(
"meta.attr."
+
metaInfoItem
.
name
().
section
(
'#'
,
1
),
metaInfoItem
.
value
().
toString
());
}
}
}
else
if
(
type
->
is
(
"application/x-kdenlivetitle"
))
{
...
...
src/clipproperties.cpp
View file @
f4177065
...
...
@@ -518,7 +518,7 @@ ClipProperties::ClipProperties(QList <DocClipBase *>cliplist, Timecode tc, QMap
setFont
(
KGlobalSettings
::
toolBarFont
());
m_view
.
setupUi
(
this
);
QString
title
=
windowTitle
();
title
.
append
(
" "
+
i18np
(
"(%1 clip)"
,
"(%1 clips)"
,
cliplist
.
count
()));
title
.
append
(
' '
+
i18np
(
"(%1 clip)"
,
"(%1 clips)"
,
cliplist
.
count
()));
setWindowTitle
(
title
);
QMap
<
QString
,
QString
>
props
=
cliplist
.
at
(
0
)
->
properties
();
m_old_props
=
commonproperties
;
...
...
@@ -1005,7 +1005,7 @@ void ClipProperties::parseFolder()
QString
filter
=
KUrl
(
m_view
.
clip_path
->
text
()).
fileName
();
QString
ext
=
filter
.
section
(
'.'
,
-
1
);
filter
=
filter
.
section
(
'%'
,
0
,
-
2
);
QString
regexp
=
"^"
+
filter
+
"
\\
d+
\\
."
+
ext
+
"$"
;
QString
regexp
=
'^'
+
filter
+
"
\\
d+
\\
."
+
ext
+
'$'
;
QRegExp
rx
(
regexp
);
QStringList
entries
;
foreach
(
const
QString
&
path
,
result
)
{
...
...
src/clipstabilize.cpp
View file @
f4177065
...
...
@@ -147,7 +147,7 @@ QStringList ClipStabilize::params()
QHashIterator
<
QString
,
QHash
<
QString
,
QString
>
>
it
(
m_ui_params
);
while
(
it
.
hasNext
()){
it
.
next
();
filterparamsList
<<
it
.
key
()
+
"="
+
it
.
value
().
value
(
"value"
);
filterparamsList
<<
it
.
key
()
+
'='
+
it
.
value
().
value
(
"value"
);
}
params
<<
filterparamsList
.
join
(
" "
);
...
...
@@ -256,7 +256,7 @@ void ClipStabilize::fillParameters(QStringList lst)
m_ui_params
.
clear
();
while
(
!
lst
.
isEmpty
()){
QString
vallist
=
lst
.
takeFirst
();
QStringList
cont
=
vallist
.
split
(
","
);
QStringList
cont
=
vallist
.
split
(
','
);
QString
name
=
cont
.
takeFirst
();
while
(
!
cont
.
isEmpty
()){
QString
valname
=
cont
.
takeFirst
();
...
...
src/cliptranscode.cpp
View file @
f4177065
...
...
@@ -79,7 +79,7 @@ ClipTranscode::ClipTranscode(KUrl::List urls, const QString ¶ms, const QStri
QMapIterator
<
QString
,
QString
>
i
(
profiles
);
while
(
i
.
hasNext
())
{
i
.
next
();
QStringList
data
=
i
.
value
().
split
(
";"
);
QStringList
data
=
i
.
value
().
split
(
';'
);
profile_list
->
addItem
(
i
.
key
(),
data
.
at
(
0
));
if
(
data
.
count
()
>
1
)
profile_list
->
setItemData
(
profile_list
->
count
()
-
1
,
data
.
at
(
1
),
Qt
::
UserRole
+
1
);
}
...
...
src/customtrackview.cpp
View file @
f4177065
...
...
@@ -5208,7 +5208,7 @@ void CustomTrackView::buildGuidesMenu(QMenu *goMenu) const
goMenu->clear();
double fps = m_document->fps();
for (int i = 0; i < m_guides.count(); i++) {
act = goMenu->addAction(m_guides.at(i)->label() +
"/"
+ Timecode::getStringTimecode(m_guides.at(i)->position().frames(fps), fps));
act = goMenu->addAction(m_guides.at(i)->label() +
'/'
+ Timecode::getStringTimecode(m_guides.at(i)->position().frames(fps), fps));
act->setData(m_guides.at(i)->position().frames(m_document->fps()));
}
goMenu->setEnabled(!m_guides.isEmpty());
...
...
@@ -5754,7 +5754,7 @@ void CustomTrackView::adjustKeyfames(GenTime oldstart, GenTime newstart, GenTime
if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe")) {
QString def = e.attribute("default");
// Effect has a keyframe type parameter, we need to adjust the values
QStringList keys = e.attribute("keyframes").split(
";"
, QString::SkipEmptyParts);
QStringList keys = e.attribute("keyframes").split(
';'
, QString::SkipEmptyParts);
QStringList newKeyFrames;
foreach(const QString &str, keys) {
int pos = str.section(':', 0, 0).toInt();
...
...
@@ -7026,13 +7026,13 @@ void CustomTrackView::adjustEffectParameters(EffectsParameterList ¶meters, Q
parameters.addParam("_sync_in_out", "1");
}
if (e.attribute("type") == "simplekeyframe") {
QStringList values = e.attribute("keyframes").split(
";"
, QString::SkipEmptyParts);
QStringList values = e.attribute("keyframes").split(
';'
, QString::SkipEmptyParts);
double factor = e.attribute("factor", "1").toDouble();
double offset = e.attribute("offset", "0").toDouble();
for (int j = 0; j < values.count(); j++) {
QString pos = values.at(j).section(':', 0, 0);
double val = (values.at(j).section(':', 1, 1).toDouble() - offset) / factor;
values[j] = pos +
"="
+ locale.toString(val);
values[j] = pos +
'='
+ locale.toString(val);
}
// kDebug() << "/ / / /SENDING KEYFR:" << values;
parameters.addParam(paramname, values.join(";"));
...
...
src/databackup/backupwidget.cpp
View file @
f4177065
...
...
@@ -35,15 +35,15 @@ BackupWidget::BackupWidget(KUrl projectUrl, KUrl projectFolder, const QString &p
if
(
projectUrl
.
isEmpty
())
{
// No url, means we opened the backup dialog from an empty project
info_label
->
setText
(
i18n
(
"Showing all backup files in folder"
));
m_projectWildcard
=
"*"
;
m_projectWildcard
=
'*'
;
}
else
{
info_label
->
setText
(
i18n
(
"Showing backup files for %1"
,
projectUrl
.
fileName
()));
m_projectWildcard
=
projectUrl
.
fileName
().
section
(
'.'
,
0
,
-
2
);
if
(
!
projectId
.
isEmpty
())
m_projectWildcard
.
append
(
"-"
+
projectId
);
if
(
!
projectId
.
isEmpty
())
m_projectWildcard
.
append
(
'-'
+
projectId
);
else
{
// No project id, it was lost, add wildcard
m_projectWildcard
.
append
(
"*"
);
m_projectWildcard
.
append
(
'*'
);
}
}
project_url
->
setUrl
(
projectFolder
);
...
...
@@ -85,9 +85,9 @@ void BackupWidget::slotParseBackupFiles()
QString
label
;
for
(
int
i
=
0
;
i
<
resultList
.
count
();
i
++
)
{
label
=
resultList
.
at
(
i
).
lastModified
().
toString
(
Qt
::
SystemLocaleLongDate
);
if
(
m_projectWildcard
.
startsWith
(
"*"
))
{
if
(
m_projectWildcard
.
startsWith
(
'*'
))
{
// Displaying all backup files, so add project name in the entries
label
.
prepend
(
resultList
.
at
(
i
).
fileName
().
section
(
"-"
,
0
,
-
7
)
+
".kdenlive - "
);
label
.
prepend
(
resultList
.
at
(
i
).
fileName
().
section
(
'-'
,
0
,
-
7
)
+
".kdenlive - "
);
}
item
=
new
QListWidgetItem
(
label
,
backup_list
);
item
->
setData
(
Qt
::
UserRole
,
resultList
.
at
(
i
).
absoluteFilePath
());
...
...
src/docclipbase.cpp
View file @
f4177065
...
...
@@ -66,7 +66,7 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin
}
if
(
xml
.
hasAttribute
(
"cutzones"
))
{
QStringList
cuts
=
xml
.
attribute
(
"cutzones"
).
split
(
";"
,
QString
::
SkipEmptyParts
);
QStringList
cuts
=
xml
.
attribute
(
"cutzones"
).
split
(
';'
,
QString
::
SkipEmptyParts
);
for
(
int
i
=
0
;
i
<
cuts
.
count
();
i
++
)
{
QString
z
=
cuts
.
at
(
i
);
addCutZone
(
z
.
section
(
'-'
,
0
,
0
).
toInt
(),
z
.
section
(
'-'
,
1
,
1
).
toInt
(),
z
.
section
(
'-'
,
2
,
2
));
...
...
@@ -243,7 +243,7 @@ QDomElement DocClipBase::toXML(bool hideTemporaryProperties) const
QMapIterator
<
QString
,
QString
>
i
(
m_properties
);
while
(
i
.
hasNext
())
{
i
.
next
();
if
(
hideTemporaryProperties
&&
i
.
key
().
startsWith
(
"_"
))
continue
;
if
(
hideTemporaryProperties
&&
i
.
key
().
startsWith
(
'_'
))
continue
;
if
(
!
i
.
value
().
isEmpty
())
clip
.
setAttribute
(
i
.
key
(),
i
.
value
());
}
doc
.
appendChild
(
clip
);
...
...
src/documentchecker.cpp
View file @
f4177065
...
...
@@ -103,7 +103,7 @@ bool DocumentChecker::hasErrorInClips()
prodId
=
mltProd
.
attribute
(
"id"
);
// Don't check slowmotion clips for now... (TODO?)
if
(
prodId
.
startsWith
(
"slowmotion"
))
continue
;
if
(
prodId
.
contains
(
"_"
))
prodId
=
prodId
.
section
(
"_"
,
0
,
0
);
if
(
prodId
.
contains
(
'_'
))
prodId
=
prodId
.
section
(
'_'
,
0
,
0
);
if
(
prodId
!=
id
)
continue
;
if
(
mltDuration
>
0
)
{
// We have several MLT producers for the same clip (probably track producers)
...
...
@@ -366,7 +366,7 @@ bool DocumentChecker::hasErrorInClips()
if
(
property
.
attribute
(
"name"
)
==
"resource"
)
{
QString
resource
=
property
.
firstChild
().
nodeValue
();
QString
suffix
;
if
(
slowmotion
)
suffix
=
"?"
+
resource
.
section
(
'?'
,
-
1
);
if
(
slowmotion
)
suffix
=
'?'
+
resource
.
section
(
'?'
,
-
1
);
property
.
firstChild
().
setNodeValue
(
realPath
+
suffix
);
break
;
}
...
...
@@ -799,7 +799,7 @@ void DocumentChecker::slotFixDuration()
for
(
int
j
=
0
;
j
<
documentProducers
.
count
();
j
++
)
{
QDomElement
mltProd
=
documentProducers
.
at
(
j
).
toElement
();
QString
prodId
=
mltProd
.
attribute
(
"id"
);
if
(
prodId
==
id
||
prodId
.
startsWith
(
id
+
"_"
))
{
if
(
prodId
==
id
||
prodId
.
startsWith
(
id
+
'_'
))
{
EffectsList
::
removeProperty
(
mltProd
,
"length"
);
}
}
...
...
src/dragvalue.cpp
View file @
f4177065
...
...
@@ -361,7 +361,7 @@ CustomLabel::CustomLabel(const QString &label, bool showSlider, int range, QWidg
//m_precision(pow(10, precision)),
{
setFont
(
KGlobalSettings
::
toolBarFont
());
setFormat
(
" "
+
label
);
setFormat
(
' '
+
label
);
setFocusPolicy
(
Qt
::
StrongFocus
);
setCursor
(
Qt
::
PointingHandCursor
);
setSizePolicy
(
QSizePolicy
::
MinimumExpanding
,
QSizePolicy
::
Maximum
);
...
...
@@ -370,7 +370,7 @@ CustomLabel::CustomLabel(const QString &label, bool showSlider, int range, QWidg
setRange
(
0
,
range
);
QSize
sh
;
const
QFontMetrics
&
fm
=
fontMetrics
();
sh
.
setWidth
(
fm
.
width
(
" "
+
label
+
" "
));
sh
.
setWidth
(
fm
.
width
(
' '
+
label
+
' '
));
setMaximumWidth
(
sh
.
width
());
setObjectName
(
"dragOnly"
);
}
...
...
src/effectstack/collapsibleeffect.cpp
View file @
f4177065
...
...
@@ -81,7 +81,7 @@ CollapsibleEffect::CollapsibleEffect(QDomElement effect, QDomElement original_ef
QDomElement
namenode
=
m_effect
.
firstChildElement
(
"name"
);
if
(
namenode
.
isNull
())
return
;
QString
effectname
=
i18n
(
namenode
.
text
().
toUtf8
().
data
());
if
(
m_regionEffect
)
effectname
.
append
(
":"
+
KUrl
(
EffectsList
::
parameter
(
m_effect
,
"resource"
)).
fileName
());
if
(
m_regionEffect
)
effectname
.
append
(
':'
+
KUrl
(
EffectsList
::
parameter
(
m_effect
,
"resource"
)).
fileName
());
QHBoxLayout
*
l
=
static_cast
<
QHBoxLayout
*>
(
frame
->
layout
());
title
=
new
QLabel
(
this
);
...
...
src/effectstack/parametercontainer.cpp
View file @
f4177065
...
...
@@ -163,7 +163,7 @@ ParameterContainer::ParameterContainer(QDomElement effect, ItemInfo info, Effect
QStringList
listitems
=
pa
.
attribute
(
"paramlist"
).
split
(
';'
);
if
(
listitems
.
count
()
==
1
)
{
// probably custom effect created before change to ';' as separator
listitems
=
pa
.
attribute
(
"paramlist"
).
split
(
","
);
listitems
=
pa
.
attribute
(
"paramlist"
).
split
(
','
);
}
QDomElement
list
=
pa
.
firstChildElement
(
"paramlistdisplay"
);
QStringList
listitemsdisplay
;
...
...
src/encodingprofilesdialog.cpp
View file @
f4177065
...
...
@@ -102,7 +102,7 @@ void EncodingProfilesDialog::slotShowParams()
profile_parameters
->
clear
();
QListWidgetItem
*
item
=
profile_list
->
currentItem
();
if
(
!
item
)
return
;
profile_parameters
->
setPlainText
(
item
->
data
(
Qt
::
UserRole
).
toString
().
section
(
";"
,
0
,
0
));
profile_parameters
->
setPlainText
(
item
->
data
(
Qt
::
UserRole
).
toString
().
section
(
';'
,
0
,
0
));
}
void
EncodingProfilesDialog
::
slotDeleteProfile
()
...
...
@@ -136,11 +136,11 @@ void EncodingProfilesDialog::slotAddProfile()
QListWidgetItem
*
item
=
profile_list
->
currentItem
();
if
(
item
)
{
QString
data
=
item
->
data
(
Qt
::
UserRole
).
toString
();
pparams
->
setPlainText
(
data
.
section
(
";"
,
0
,
0
));
pext
->
setText
(
data
.
section
(
";"
,
1
,
1
));
pparams
->
setPlainText
(
data
.
section
(
';'
,
0
,
0
));
pext
->
setText
(
data
.
section
(
';'
,
1
,
1
));
}
if
(
d
->
exec
()
==
QDialog
::
Accepted
)
{
m_configGroup
->
writeEntry
(
pname
->
text
(),
pparams
->
toPlainText
()
+
";"
+
pext
->
text
());
m_configGroup
->
writeEntry
(
pname
->
text
(),
pparams
->
toPlainText
()
+
';'
+
pext
->
text
());
slotLoadProfiles
();
}
delete
d
;
...
...
@@ -169,12 +169,12 @@ void EncodingProfilesDialog::slotEditProfile()
if
(
item
)
{
pname
->
setText
(
item
->
text
());
QString
data
=
item
->
data
(
Qt
::
UserRole
).
toString
();
pparams
->
setPlainText
(
data
.
section
(
";"
,
0
,
0
));
pext
->
setText
(
data
.
section
(
";"
,
1
,
1
));
pparams
->
setPlainText
(
data
.
section
(
';'
,
0
,
0
));
pext
->
setText
(
data
.
section
(
';'
,
1
,
1
));
pparams
->
setFocus
();
}
if
(
d
->
exec
()
==
QDialog
::
Accepted
)
{
m_configGroup
->
writeEntry
(
pname
->
text
(),
pparams
->
toPlainText
()
+
";"
+
pext
->
text
());
m_configGroup
->
writeEntry
(
pname
->
text
(),
pparams
->
toPlainText
()
+
';'
+
pext
->
text
());
slotLoadProfiles
();
}
delete
d
;
...
...
src/kdenlivedoc.cpp
View file @
f4177065
...
...
@@ -87,9 +87,9 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
bool
success
=
false
;
// init default document properties
m_documentProperties
[
"zoom"
]
=
"7"
;
m_documentProperties
[
"verticalzoom"
]
=
"1"
;
m_documentProperties
[
"zonein"
]
=
"0"
;
m_documentProperties
[
"zoom"
]
=
'7'
;
m_documentProperties
[
"verticalzoom"
]
=
'1'
;
m_documentProperties
[
"zonein"
]
=
'0'
;
m_documentProperties
[
"zoneout"
]
=
"100"
;
m_documentProperties
[
"enableproxy"
]
=
QString
::
number
((
int
)
KdenliveSettings
::
enableproxy
());
m_documentProperties
[
"proxyparams"
]
=
KdenliveSettings
::
proxyparams
();
...
...
@@ -769,7 +769,7 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene, const
cleanupBackupFiles
();
QFileInfo
info
(
file
);
QString
fileName
=
KUrl
(
path
).
fileName
().
section
(
'.'
,
0
,
-
2
);
fileName
.
append
(
"-"
+
m_documentProperties
.
value
(
"documentid"
));
fileName
.
append
(
'-'
+
m_documentProperties
.
value
(
"documentid"
));
fileName
.
append
(
info
.
lastModified
().
toString
(
"-yyyy-MM-dd-hh-mm"
));
fileName
.
append
(
".kdenlive.png"
);
KUrl
backupFile
=
m_projectFolder
;
...
...
@@ -1693,7 +1693,7 @@ void KdenliveDoc::backupLastSavedVersion(const QString &path)
KIO
::
NetAccess
::
mkdir
(
backupFile
,
kapp
->
activeWindow
());
QString
fileName
=
KUrl
(
path
).
fileName
().
section
(
'.'
,
0
,
-
2
);
QFileInfo
info
(
file
);
fileName
.
append
(
"-"
+
m_documentProperties
.
value
(
"documentid"
));
fileName
.
append
(
'-'
+
m_documentProperties
.
value
(
"documentid"
));
fileName
.
append
(
info
.
lastModified
().
toString
(
"-yyyy-MM-dd-hh-mm"
));
fileName
.
append
(
".kdenlive"
);
backupFile
.
addPath
(
fileName
);
...
...
@@ -1713,7 +1713,7 @@ void KdenliveDoc::cleanupBackupFiles()
backupFile
.
addPath
(
".backup/"
);
QDir
dir
(
backupFile
.
path
());
QString
projectFile
=
url
().
fileName
().
section
(
'.'
,
0
,
-
2
);
projectFile
.
append
(
"-"
+
m_documentProperties
.
value
(
"documentid"
));
projectFile
.
append
(
'-'
+
m_documentProperties
.
value
(
"documentid"
));
projectFile
.
append
(
"-??"
);
projectFile
.
append
(
"??"
);
projectFile
.
append
(
"-??"
);
...
...
src/kdenlivesettingsdialog.cpp
View file @
f4177065
...
...
@@ -437,7 +437,7 @@ void KdenliveSettingsDialog::slotReadAudioDevices()
QStringList
lines
=
result
.
split
(
'\n'
);
foreach
(
const
QString
&
data
,
lines
)
{
//kDebug() << "// READING LINE: " << data;
if
(
!
data
.
startsWith
(
" "
)
&&
data
.
count
(
':'
)
>
1
)
{
if
(
!
data
.
startsWith
(
' '
)
&&
data
.
count
(
':'
)
>
1
)
{
QString
card
=
data
.
section
(
':'
,
0
,
0
).
section
(
' '
,
-
1
);
QString
device
=
data
.
section
(
':'
,
1
,
1
).
section
(
' '
,
-
1
);
m_configSdl
.
kcfg_audio_device
->
addItem
(
data
.
section
(
':'
,
-
1
).
simplified
(),
"plughw:"
+
card
+
','
+
device
);
...
...
@@ -633,19 +633,19 @@ void KdenliveSettingsDialog::updateSettings()
// Check encoding profiles
QString
data
=
m_configCapture
.
kcfg_v4l_profile
->
itemData
(
m_configCapture
.
kcfg_v4l_profile
->
currentIndex
()).
toString
();
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
";"
,
0
,
0
)
!=
KdenliveSettings
::
v4l_parameters
()
||
data
.
section
(
";"
,
1
,
1
)
!=
KdenliveSettings
::
v4l_extension
()))
{
KdenliveSettings
::
setV4l_parameters
(
data
.
section
(
";"
,
0
,
0
));
KdenliveSettings
::
setV4l_extension
(
data
.
section
(
";"
,
1
,
1
));
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
';'
,
0
,
0
)
!=
KdenliveSettings
::
v4l_parameters
()
||
data
.
section
(
';'
,
1
,
1
)
!=
KdenliveSettings
::
v4l_extension
()))
{
KdenliveSettings
::
setV4l_parameters
(
data
.
section
(
';'
,
0
,
0
));
KdenliveSettings
::
setV4l_extension
(
data
.
section
(
';'
,
1
,
1
));
}
data
=
m_configCapture
.
kcfg_decklink_profile
->
itemData
(
m_configCapture
.
kcfg_decklink_profile
->
currentIndex
()).
toString
();
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
";"
,
0
,
0
)
!=
KdenliveSettings
::
decklink_parameters
()
||
data
.
section
(
";"
,
1
,
1
)
!=
KdenliveSettings
::
decklink_extension
()))
{
KdenliveSettings
::
setDecklink_parameters
(
data
.
section
(
";"
,
0
,
0
));
KdenliveSettings
::
setDecklink_extension
(
data
.
section
(
";"
,
1
,
1
));
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
';'
,
0
,
0
)
!=
KdenliveSettings
::
decklink_parameters
()
||
data
.
section
(
';'
,
1
,
1
)
!=
KdenliveSettings
::
decklink_extension
()))
{
KdenliveSettings
::
setDecklink_parameters
(
data
.
section
(
';'
,
0
,
0
));
KdenliveSettings
::
setDecklink_extension
(
data
.
section
(
';'
,
1
,
1
));
}
data
=
m_configProject
.
kcfg_proxy_profile
->
itemData
(
m_configProject
.
kcfg_proxy_profile
->
currentIndex
()).
toString
();
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
";"
,
0
,
0
)
!=
KdenliveSettings
::
proxyparams
()
||
data
.
section
(
";"
,
1
,
1
)
!=
KdenliveSettings
::
proxyextension
()))
{
KdenliveSettings
::
setProxyparams
(
data
.
section
(
";"
,
0
,
0
));
KdenliveSettings
::
setProxyextension
(
data
.
section
(
";"
,
1
,
1
));
if
(
!
data
.
isEmpty
()
&&
(
data
.
section
(
';'
,
0
,
0
)
!=
KdenliveSettings
::
proxyparams
()
||
data
.
section
(
';'
,
1
,
1
)
!=
KdenliveSettings
::
proxyextension
()))
{
KdenliveSettings
::
setProxyparams
(
data
.
section
(
';'
,
0
,
0
));
KdenliveSettings
::
setProxyextension
(
data
.
section
(
';'
,
1
,
1
));
}
...
...
@@ -800,7 +800,7 @@ void KdenliveSettingsDialog::slotAddTranscode()
QListWidgetItem
*
item
=
new
QListWidgetItem
(
m_configTranscode
.
profile_name
->
text
());
QString
data
=
m_configTranscode
.
profile_parameters
->
toPlainText
();
data
.
append
(
" %1."
+
m_configTranscode
.
profile_extension
->
text
());
data
.
append
(
";"
);
data
.
append
(
';'
);
if
(
!
m_configTranscode
.
profile_description
->
text
().
isEmpty
())
data
.
append
(
m_configTranscode
.
profile_description
->
text
());
if
(
m_configTranscode
.
profile_audioonly
->
isChecked
())
data
.
append
(
";audio"
);
...
...
@@ -818,7 +818,7 @@ void KdenliveSettingsDialog::slotUpdateTranscodingProfile()
item
->
setText
(
m_configTranscode
.
profile_name
->
text
());
QString
data
=
m_configTranscode
.
profile_parameters
->
toPlainText
();
data
.
append
(
" %1."
+
m_configTranscode
.
profile_extension
->
text
());
data
.
append
(
";"
);
data
.
append
(
';'
);
if
(
!
m_configTranscode
.
profile_description
->
text
().
isEmpty
())
data
.
append
(
m_configTranscode
.
profile_description
->
text
());
if
(
m_configTranscode
.
profile_audioonly
->
isChecked
())
data
.
append
(
";audio"
);
...
...
@@ -908,19 +908,19 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
m_configCapture
.
kcfg_v4l_format
->
addItem
(
i18n
(
"Current settings"
));
}
QStringList
pixelformats
=
info
.
split
(
">"
,
QString
::
SkipEmptyParts
);
QStringList
pixelformats
=
info
.
split
(
'>'
,
QString
::
SkipEmptyParts
);
QString
itemSize
;
QString
pixelFormat
;
QStringList
itemRates
;
for
(
int
i
=
0
;
i
<
pixelformats
.
count
();
i
++
)
{
QString
format
=
pixelformats
.
at
(
i
).
section
(
':'
,
0
,
0
);
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
":"
,
QString
::
SkipEmptyParts
);
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
':'
,
QString
::
SkipEmptyParts
);
pixelFormat
=
sizes
.
takeFirst
();
for
(
int
j
=
0
;
j
<
sizes
.
count
();
j
++
)
{
itemSize
=
sizes
.
at
(
j
).
section
(
"="
,
0
,
0
);
itemRates
=
sizes
.
at
(
j
).
section
(
"="
,
1
,
1
).
split
(
","
,
QString
::
SkipEmptyParts
);
itemSize
=
sizes
.
at
(
j
).
section
(
'='
,
0
,
0
);
itemRates
=
sizes
.
at
(
j
).
section
(
'='
,
1
,
1
).
split
(
','
,
QString
::
SkipEmptyParts
);
for
(
int
k
=
0
;
k
<
itemRates
.
count
();
k
++
)
{
m_configCapture
.
kcfg_v4l_format
->
addItem
(
"["
+
format
+
"] "
+
itemSize
+
" ("
+
itemRates
.
at
(
k
)
+
")"
,
QStringList
()
<<
format
<<
itemSize
.
section
(
'x'
,
0
,
0
)
<<
itemSize
.
section
(
'x'
,
1
,
1
)
<<
itemRates
.
at
(
k
).
section
(
'/'
,
0
,
0
)
<<
itemRates
.
at
(
k
).
section
(
'/'
,
1
,
1
));
m_configCapture
.
kcfg_v4l_format
->
addItem
(
'['
+
format
+
"] "
+
itemSize
+
" ("
+
itemRates
.
at
(
k
)
+
')'
,
QStringList
()
<<
format
<<
itemSize
.
section
(
'x'
,
0
,
0
)
<<
itemSize
.
section
(
'x'
,
1
,
1
)
<<
itemRates
.
at
(
k
).
section
(
'/'
,
0
,
0
)
<<
itemRates
.
at
(
k
).
section
(
'/'
,
1
,
1
));
}
}
}
...
...
@@ -1060,7 +1060,7 @@ void KdenliveSettingsDialog::slotUpdateDecklinkProfile(int ix)
else
ix
=
m_configCapture
.
kcfg_decklink_profile
->
currentIndex
();
QString
data
=
m_configCapture
.
kcfg_decklink_profile
->
itemData
(
ix
).
toString
();
if
(
data
.
isEmpty
())
return
;
m_configCapture
.
decklink_parameters
->
setPlainText
(
data
.
section
(
";"
,
0
,
0
));
m_configCapture
.
decklink_parameters
->
setPlainText
(
data
.
section
(
';'
,
0
,
0
));
//
}