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
5f7ac07e
Commit
5f7ac07e
authored
Dec 09, 2016
by
Laurent Montel
😁
Browse files
Coding style
parent
b91cb4fb
Changes
133
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
5f7ac07e
...
...
@@ -814,7 +814,7 @@ void Bin::slotDeleteClip()
ProjectSubClip
*
sub
;
QPoint
zone
;
// check folders, remove child folders if there is any
QList
<
ProjectFolder
*>
topFolders
;
QList
<
ProjectFolder
*>
topFolders
;
foreach
(
const
QModelIndex
&
ix
,
indexes
)
{
if
(
!
ix
.
isValid
()
||
ix
.
column
()
!=
0
)
{
continue
;
...
...
@@ -851,7 +851,7 @@ void Bin::slotDeleteClip()
if
(
isChild
)
{
continue
;
}
QList
<
ProjectFolder
*>
childFolders
;
QList
<
ProjectFolder
*>
childFolders
;
// parse all folders to check for children
foreach
(
ProjectFolder
*
f
,
topFolders
)
{
if
(
current
->
folder
(
f
->
clipId
()))
{
...
...
@@ -870,7 +870,7 @@ void Bin::slotDeleteClip()
foldersIds
<<
f
->
clipId
();
}
QList
<
ProjectFolder
*>
topClips
;
QList
<
ProjectFolder
*>
topClips
;
// Check if clips are in already selected folders
foreach
(
const
QModelIndex
&
ix
,
indexes
)
{
if
(
!
ix
.
isValid
()
||
ix
.
column
()
!=
0
)
{
...
...
@@ -1487,11 +1487,11 @@ void Bin::autoSelect()
}*/
}
QList
<
ProjectClip
*>
Bin
::
selectedClips
()
QList
<
ProjectClip
*>
Bin
::
selectedClips
()
{
//TODO: handle clips inside folders
QModelIndexList
indexes
=
m_proxyModel
->
selectionModel
()
->
selectedIndexes
();
QList
<
ProjectClip
*>
list
;
QList
<
ProjectClip
*>
list
;
foreach
(
const
QModelIndex
&
ix
,
indexes
)
{
if
(
!
ix
.
isValid
()
||
ix
.
column
()
!=
0
)
{
continue
;
...
...
@@ -1967,14 +1967,14 @@ void Bin::slotProducerReady(const requestClipInfo &info, ClipController *control
int
width
=
clip
->
getProducerIntProperty
(
QStringLiteral
(
"meta.media.width"
));
if
(
m_doc
->
autoGenerateProxy
(
width
))
{
// Start proxy
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
}
}
else
if
(
t
==
Playlist
)
{
// always proxy playlists
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
}
else
if
(
t
==
Image
&&
m_doc
->
autoGenerateImageProxy
(
clip
->
getProducerIntProperty
(
QStringLiteral
(
"meta.media.width"
))))
{
// Start proxy
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
m_doc
->
slotProxyCurrentItem
(
true
,
QList
<
ProjectClip
*>
()
<<
clip
);
}
}
}
else
{
...
...
@@ -2203,10 +2203,10 @@ void Bin::slotUpdateJobStatus(const QString &id, int jobType, int status, const
}
}
void
Bin
::
doDisplayMessage
(
const
QString
&
text
,
KMessageWidget
::
MessageType
type
,
const
QList
<
QAction
*>
&
actions
)
void
Bin
::
doDisplayMessage
(
const
QString
&
text
,
KMessageWidget
::
MessageType
type
,
const
QList
<
QAction
*>
&
actions
)
{
// Remove axisting actions if any
QList
<
QAction
*>
acts
=
m_infoMessage
->
actions
();
QList
<
QAction
*>
acts
=
m_infoMessage
->
actions
();
while
(
!
acts
.
isEmpty
())
{
QAction
*
a
=
acts
.
takeFirst
();
m_infoMessage
->
removeAction
(
a
);
...
...
@@ -2312,7 +2312,7 @@ void Bin::slotStartCutJob(const QString &id)
void
Bin
::
startJob
(
const
QString
&
id
,
AbstractClipJob
::
JOBTYPE
type
)
{
QList
<
ProjectClip
*>
clips
;
QList
<
ProjectClip
*>
clips
;
ProjectClip
*
clip
=
getBinClip
(
id
);
if
(
clip
&&
!
hasPendingJob
(
id
,
type
))
{
// Launch job
...
...
@@ -2846,7 +2846,7 @@ void Bin::startClipJob(const QStringList ¶ms)
return
;
}
AbstractClipJob
::
JOBTYPE
jobType
=
(
AbstractClipJob
::
JOBTYPE
)
data
.
takeFirst
().
toInt
();
QList
<
ProjectClip
*>
clips
=
selectedClips
();
QList
<
ProjectClip
*>
clips
=
selectedClips
();
m_jobManager
->
prepareJobs
(
clips
,
m_doc
->
fps
(),
jobType
,
data
);
}
...
...
@@ -2893,7 +2893,7 @@ void Bin::slotAddClipCut(const QString &id, int in, int out)
m_doc
->
commandStack
()
->
push
(
command
);
}
void
Bin
::
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
data
)
void
Bin
::
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
data
)
{
ProjectClip
*
clip
=
getBinClip
(
id
);
if
(
!
clip
)
{
...
...
@@ -3128,7 +3128,7 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co
int
cutPos
=
0
;
QUndoCommand
*
command
=
new
QUndoCommand
();
command
->
setText
(
i18n
(
"Add Markers"
));
QList
<
CommentedTime
>
markersList
;
QList
<
CommentedTime
>
markersList
;
int
index
=
1
;
bool
simpleList
=
false
;
double
sourceFps
=
clip
->
getOriginalFps
();
...
...
@@ -3168,7 +3168,7 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co
}
}
void
Bin
::
slotAddClipMarker
(
const
QString
&
id
,
const
QList
<
CommentedTime
>
&
newMarkers
,
QUndoCommand
*
groupCommand
)
void
Bin
::
slotAddClipMarker
(
const
QString
&
id
,
const
QList
<
CommentedTime
>
&
newMarkers
,
QUndoCommand
*
groupCommand
)
{
ProjectClip
*
clip
=
getBinClip
(
id
);
if
(
!
clip
)
{
...
...
@@ -3227,7 +3227,7 @@ void Bin::slotLoadClipMarkers(const QString &id)
QUndoCommand
*
command
=
new
QUndoCommand
();
command
->
setText
(
QStringLiteral
(
"Load markers"
));
QString
markerText
;
QList
<
CommentedTime
>
markersList
;
QList
<
CommentedTime
>
markersList
;
foreach
(
const
QString
&
line
,
lines
)
{
markerText
.
clear
();
values
=
line
.
split
(
'\t'
,
QString
::
SkipEmptyParts
);
...
...
@@ -3277,7 +3277,7 @@ void Bin::slotSaveClipMarkers(const QString &id)
if
(
!
clip
)
{
return
;
}
QList
<
CommentedTime
>
markers
=
clip
->
commentedSnapMarkers
();
QList
<
CommentedTime
>
markers
=
clip
->
commentedSnapMarkers
();
if
(
!
markers
.
isEmpty
())
{
// Set up categories
KComboBox
*
cbox
=
new
KComboBox
;
...
...
@@ -3344,7 +3344,7 @@ void Bin::deleteClipMarker(const QString &comment, const QString &id, const GenT
command
->
setText
(
i18n
(
"Delete marker"
));
CommentedTime
marker
(
position
,
comment
);
marker
.
setMarkerType
(
-
1
);
QList
<
CommentedTime
>
markers
;
QList
<
CommentedTime
>
markers
;
markers
<<
marker
;
clip
->
addClipMarker
(
markers
,
command
);
if
(
command
->
childCount
()
>
0
)
{
...
...
@@ -3609,14 +3609,14 @@ void Bin::slotRenameFolder()
void
Bin
::
refreshProxySettings
()
{
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QUndoCommand
*
masterCommand
=
new
QUndoCommand
();
masterCommand
->
setText
(
m_doc
->
useProxy
()
?
i18n
(
"Enable proxies"
)
:
i18n
(
"Disable proxies"
));
if
(
!
m_doc
->
useProxy
())
{
// Disable all proxies
m_doc
->
slotProxyCurrentItem
(
false
,
clipList
,
false
,
masterCommand
);
}
else
{
QList
<
ProjectClip
*>
toProxy
;
QList
<
ProjectClip
*>
toProxy
;
foreach
(
ProjectClip
*
clp
,
clipList
)
{
ClipType
t
=
clp
->
clipType
();
if
(
t
==
Playlist
)
{
...
...
@@ -3648,7 +3648,7 @@ void Bin::refreshProxySettings()
QStringList
Bin
::
getProxyHashList
()
{
QStringList
list
;
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
foreach
(
ProjectClip
*
clp
,
clipList
)
{
if
(
clp
->
clipType
()
==
AV
||
clp
->
clipType
()
==
Video
||
clp
->
clipType
()
==
Playlist
)
{
list
<<
clp
->
hash
();
...
...
@@ -3682,7 +3682,7 @@ void Bin::reloadAllProducers()
if
(
m_rootFolder
==
Q_NULLPTR
||
m_rootFolder
->
isEmpty
()
||
!
isEnabled
())
{
return
;
}
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
emit
openClip
(
Q_NULLPTR
);
foreach
(
ProjectClip
*
clip
,
clipList
)
{
QDomDocument
doc
;
...
...
@@ -3706,7 +3706,7 @@ void Bin::slotMessageActionTriggered()
void
Bin
::
resetUsageCount
()
{
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
foreach
(
ProjectClip
*
clip
,
clipList
)
{
clip
->
setRefCount
(
0
);
}
...
...
@@ -3714,7 +3714,7 @@ void Bin::resetUsageCount()
void
Bin
::
cleanup
()
{
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QStringList
ids
;
QStringList
subIds
;
foreach
(
ProjectClip
*
clip
,
clipList
)
{
...
...
@@ -3730,7 +3730,7 @@ void Bin::cleanup()
void
Bin
::
getBinStats
(
uint
*
used
,
uint
*
unused
,
qint64
*
usedSize
,
qint64
*
unusedSize
)
{
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
foreach
(
ProjectClip
*
clip
,
clipList
)
{
if
(
clip
->
refCount
()
==
0
)
{
*
unused
+=
1
;
...
...
@@ -3775,8 +3775,8 @@ bool Bin::addClip(QDomElement elem, const QString &clipId)
void
Bin
::
rebuildProxies
()
{
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
toProxy
;
QList
<
ProjectClip
*>
clipList
=
m_rootFolder
->
childClips
();
QList
<
ProjectClip
*>
toProxy
;
foreach
(
ProjectClip
*
clp
,
clipList
)
{
if
(
clp
->
hasProxy
())
{
toProxy
<<
clp
;
...
...
src/bin/bin.h
View file @
5f7ac07e
...
...
@@ -394,7 +394,7 @@ public:
ProjectClip
*
getBinClip
(
const
QString
&
id
);
/** @brief Returns a list of selected clips */
QList
<
ProjectClip
*>
selectedClips
();
QList
<
ProjectClip
*>
selectedClips
();
/** @brief Start a job of selected type for a clip */
void
startJob
(
const
QString
&
id
,
AbstractClipJob
::
JOBTYPE
type
);
...
...
@@ -646,7 +646,7 @@ public slots:
void
abortAudioThumbs
();
/** @brief Abort all ongoing operations to prepare close. */
void
abortOperations
();
void
doDisplayMessage
(
const
QString
&
text
,
KMessageWidget
::
MessageType
type
,
const
QList
<
QAction
*>
&
actions
=
QList
<
QAction
*>
());
void
doDisplayMessage
(
const
QString
&
text
,
KMessageWidget
::
MessageType
type
,
const
QList
<
QAction
*>
&
actions
=
QList
<
QAction
*>
());
/** @brief Reset all clip usage to 0 */
void
resetUsageCount
();
/** @brief Select a clip in the Bin from its id. */
...
...
src/bin/projectclip.cpp
View file @
5f7ac07e
...
...
@@ -145,12 +145,12 @@ void ProjectClip::updateAudioThumbnail(const QVariantList &audioLevels)
emit
gotAudioData
();
}
QList
<
CommentedTime
>
ProjectClip
::
commentedSnapMarkers
()
const
QList
<
CommentedTime
>
ProjectClip
::
commentedSnapMarkers
()
const
{
if
(
m_controller
)
{
return
m_controller
->
commentedSnapMarkers
();
}
return
QList
<
CommentedTime
>
();
return
QList
<
CommentedTime
>
();
}
QStringList
ProjectClip
::
markersText
(
GenTime
in
,
GenTime
out
)
const
...
...
@@ -785,12 +785,12 @@ bool ProjectClip::rename(const QString &name, int column)
return
edited
;
}
void
ProjectClip
::
addClipMarker
(
QList
<
CommentedTime
>
newMarkers
,
QUndoCommand
*
groupCommand
)
void
ProjectClip
::
addClipMarker
(
QList
<
CommentedTime
>
newMarkers
,
QUndoCommand
*
groupCommand
)
{
if
(
!
m_controller
)
{
return
;
}
QList
<
CommentedTime
>
oldMarkers
;
QList
<
CommentedTime
>
oldMarkers
;
for
(
int
i
=
0
;
i
<
newMarkers
.
count
();
++
i
)
{
CommentedTime
oldMarker
=
m_controller
->
markerAt
(
newMarkers
.
at
(
i
).
time
());
if
(
oldMarker
==
CommentedTime
())
{
...
...
@@ -804,11 +804,11 @@ void ProjectClip::addClipMarker(QList <CommentedTime> newMarkers, QUndoCommand *
bool
ProjectClip
::
deleteClipMarkers
(
QUndoCommand
*
command
)
{
QList
<
CommentedTime
>
markers
=
commentedSnapMarkers
();
QList
<
CommentedTime
>
markers
=
commentedSnapMarkers
();
if
(
markers
.
isEmpty
())
{
return
false
;
}
QList
<
CommentedTime
>
newMarkers
;
QList
<
CommentedTime
>
newMarkers
;
for
(
int
i
=
0
;
i
<
markers
.
size
();
++
i
)
{
CommentedTime
marker
=
markers
.
at
(
i
);
marker
.
setMarkerType
(
-
1
);
...
...
@@ -818,7 +818,7 @@ bool ProjectClip::deleteClipMarkers(QUndoCommand *command)
return
true
;
}
void
ProjectClip
::
addMarkers
(
QList
<
CommentedTime
>
&
markers
)
void
ProjectClip
::
addMarkers
(
QList
<
CommentedTime
>
&
markers
)
{
if
(
!
m_controller
)
{
return
;
...
...
@@ -1062,7 +1062,7 @@ void ProjectClip::slotCreateAudioThumbs()
bool
jobFinished
=
false
;
if
(
KdenliveSettings
::
ffmpegaudiothumbnails
()
&&
m_type
!=
Playlist
)
{
QStringList
args
;
QList
<
QTemporaryFile
*>
channelFiles
;
QList
<
QTemporaryFile
*>
channelFiles
;
for
(
int
i
=
0
;
i
<
channels
;
i
++
)
{
QTemporaryFile
*
channelTmpfile
=
new
QTemporaryFile
;
if
(
!
channelTmpfile
->
open
())
{
...
...
@@ -1129,8 +1129,8 @@ void ProjectClip::slotCreateAudioThumbs()
if
(
!
ffmpegError
&&
audioThumbsProcess
.
exitStatus
()
!=
QProcess
::
CrashExit
)
{
int
dataSize
=
0
;
QList
<
const
qint16
*>
rawChannels
;
QList
<
QByteArray
>
sourceChannels
;
QList
<
const
qint16
*>
rawChannels
;
QList
<
QByteArray
>
sourceChannels
;
QList
<
qint16
>
data2
;
for
(
int
i
=
0
;
i
<
channelFiles
.
count
();
i
++
)
{
channelFiles
[
i
]
->
open
();
...
...
@@ -1154,7 +1154,7 @@ void ProjectClip::slotCreateAudioThumbs()
sourceChannels
<<
res
;
}
int
progress
=
0
;
QList
<
long
>
channelsData
;
QList
<
long
>
channelsData
;
double
offset
=
(
double
)
dataSize
/
(
2.0
*
lengthInFrames
);
int
intraOffset
=
1
;
if
(
offset
>
1000
)
{
...
...
src/bin/projectclip.h
View file @
5f7ac07e
...
...
@@ -167,7 +167,7 @@ public:
QColor
getProducerColorProperty
(
const
QString
&
key
)
const
;
double
getDoubleProducerProperty
(
const
QString
&
key
)
const
;
QList
<
CommentedTime
>
commentedSnapMarkers
()
const
;
QList
<
CommentedTime
>
commentedSnapMarkers
()
const
;
/** @brief Returns a list of all markers comments between in ant out frames. */
QStringList
markersText
(
GenTime
in
,
GenTime
out
)
const
;
...
...
@@ -188,9 +188,9 @@ public:
*/
const
QString
codec
(
bool
audioCodec
)
const
;
void
addClipMarker
(
QList
<
CommentedTime
>
newMarkers
,
QUndoCommand
*
groupCommand
);
void
addClipMarker
(
QList
<
CommentedTime
>
newMarkers
,
QUndoCommand
*
groupCommand
);
bool
deleteClipMarkers
(
QUndoCommand
*
groupCommand
);
void
addMarkers
(
QList
<
CommentedTime
>
&
markers
);
void
addMarkers
(
QList
<
CommentedTime
>
&
markers
);
/** @brief Add an effect to bin clip. */
void
addEffect
(
const
ProfileInfo
&
pInfo
,
QDomElement
&
effect
);
void
updateEffect
(
const
ProfileInfo
&
pInfo
,
QDomElement
&
effect
,
int
ix
,
bool
refreshStack
);
...
...
src/bin/projectfolder.cpp
View file @
5f7ac07e
...
...
@@ -69,9 +69,9 @@ ProjectClip *ProjectFolder::clip(const QString &id)
return
Q_NULLPTR
;
}
QList
<
ProjectClip
*>
ProjectFolder
::
childClips
()
QList
<
ProjectClip
*>
ProjectFolder
::
childClips
()
{
QList
<
ProjectClip
*>
allChildren
;
QList
<
ProjectClip
*>
allChildren
;
for
(
int
i
=
0
;
i
<
count
();
++
i
)
{
AbstractProjectItem
*
child
=
at
(
i
);
if
(
child
->
itemType
()
==
ClipItem
)
{
...
...
src/bin/projectfolder.h
View file @
5f7ac07e
...
...
@@ -82,7 +82,7 @@ public:
QString
getToolTip
()
const
Q_DECL_OVERRIDE
;
bool
rename
(
const
QString
&
name
,
int
column
)
Q_DECL_OVERRIDE
;
/** @brief Returns a list of all children and sub-children clips. */
QList
<
ProjectClip
*>
childClips
();
QList
<
ProjectClip
*>
childClips
();
private:
Bin
*
m_bin
;
...
...
src/capture/mltdevicecapture.cpp
View file @
5f7ac07e
...
...
@@ -153,7 +153,7 @@ void MltDeviceCapture::stop()
//if (!m_mltConsumer->is_stopped()) m_mltConsumer->stop();
}
if
(
m_mltProducer
)
{
QList
<
Mlt
::
Producer
*>
prods
;
QList
<
Mlt
::
Producer
*>
prods
;
Mlt
::
Service
service
(
m_mltProducer
->
parent
().
get_service
());
mlt_service_lock
(
service
.
get_service
());
if
(
service
.
type
()
==
tractor_type
)
{
...
...
src/definitions.h
View file @
5f7ac07e
...
...
@@ -223,7 +223,7 @@ struct requestClipInfo {
};
typedef
QMap
<
QString
,
QString
>
stringMap
;
typedef
QMap
<
int
,
QMap
<
int
,
QByteArray
>
>
audioByteArray
;
typedef
QMap
<
int
,
QMap
<
int
,
QByteArray
>
>
audioByteArray
;
typedef
QVector
<
qint16
>
audioShortVector
;
class
ItemInfo
...
...
src/dialogs/clipcreationdialog.cpp
View file @
5f7ac07e
...
...
@@ -395,7 +395,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl>
}*/
//TODO check folders
/*QList
< QList<QUrl> > foldersList;
/*QList< QList<QUrl> > foldersList;
QMimeDatabase db;
foreach(const QUrl & file, list) {
// Check there is no folder here
...
...
src/dialogs/profilesdialog.cpp
View file @
5f7ac07e
...
...
@@ -472,12 +472,12 @@ QString ProfilesDialog::existingProfile(const MltVideoProfile &profile)
}
// static
QList
<
MltVideoProfile
>
ProfilesDialog
::
profilesList
()
QList
<
MltVideoProfile
>
ProfilesDialog
::
profilesList
()
{
// Check if the profile has a matching entry in existing ones
QStringList
profilesFilter
;
profilesFilter
<<
QStringLiteral
(
"*"
);
QList
<
MltVideoProfile
>
list
;
QList
<
MltVideoProfile
>
list
;
// Check the Mlt profiles
QDir
mltDir
(
KdenliveSettings
::
mltpath
());
QStringList
profilesFiles
=
mltDir
.
entryList
(
profilesFilter
,
QDir
::
Files
);
...
...
src/dialogs/profilesdialog.h
View file @
5f7ac07e
...
...
@@ -46,7 +46,7 @@ public:
/** @brief Check if a given profile has a profile file describing it */
static
QString
existingProfile
(
const
MltVideoProfile
&
profile
);
static
bool
existingProfileDescription
(
const
QString
&
desc
);
static
QList
<
MltVideoProfile
>
profilesList
();
static
QList
<
MltVideoProfile
>
profilesList
();
/** @brief Check if a given profile matches passed properties:
* @param width The profile frame width
...
...
src/dialogs/renderwidget.cpp
View file @
5f7ac07e
...
...
@@ -392,7 +392,7 @@ void RenderWidget::slotCheckEndGuidePosition()
}
}
void
RenderWidget
::
setGuides
(
const
QMap
<
double
,
QString
>
&
guidesData
,
double
duration
)
void
RenderWidget
::
setGuides
(
const
QMap
<
double
,
QString
>
&
guidesData
,
double
duration
)
{
m_view
.
guide_start
->
clear
();
m_view
.
guide_end
->
clear
();
...
...
@@ -938,7 +938,7 @@ void RenderWidget::focusFirstVisibleItem(const QString &profile)
{
QTreeWidgetItem
*
item
=
0
;
if
(
!
profile
.
isEmpty
())
{
QList
<
QTreeWidgetItem
*>
items
=
m_view
.
formats
->
findItems
(
profile
,
Qt
::
MatchExactly
|
Qt
::
MatchRecursive
);
QList
<
QTreeWidgetItem
*>
items
=
m_view
.
formats
->
findItems
(
profile
,
Qt
::
MatchExactly
|
Qt
::
MatchRecursive
);
if
(
!
items
.
isEmpty
())
{
item
=
items
.
first
();
}
...
...
src/doc/documentchecker.cpp
View file @
5f7ac07e
...
...
@@ -114,9 +114,9 @@ bool DocumentChecker::hasErrorInClips()
}
}
// List clips whose proxy is missing
QList
<
QDomElement
>
missingProxies
;
QList
<
QDomElement
>
missingProxies
;
// List clips who have a working proxy but no source clip
QList
<
QDomElement
>
missingSources
;
QList
<
QDomElement
>
missingSources
;
m_safeImages
.
clear
();
m_safeFonts
.
clear
();
m_missingFonts
.
clear
();
...
...
src/doc/documentchecker.h
View file @
5f7ac07e
...
...
@@ -67,7 +67,7 @@ private:
void
checkStatus
();
QMap
<
QString
,
QString
>
m_missingTitleImages
;
QMap
<
QString
,
QString
>
m_missingTitleFonts
;
QList
<
QDomElement
>
m_missingClips
;
QList
<
QDomElement
>
m_missingClips
;
QStringList
m_missingFonts
;
QStringList
m_safeImages
;
QStringList
m_safeFonts
;
...
...
src/doc/documentvalidator.cpp
View file @
5f7ac07e
...
...
@@ -1160,7 +1160,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
// Create easily searchable index of original producers
QMap
<
QString
,
QDomElement
>
m_source_producers
;
QMap
<
QString
,
QDomElement
>
m_source_producers
;
for
(
int
j
=
0
;
j
<
kdenlive_producers
.
count
();
j
++
)
{
QDomElement
prod
=
kdenlive_producers
.
at
(
j
).
toElement
();
QString
id
=
prod
.
attribute
(
QStringLiteral
(
"id"
));
...
...
@@ -1478,7 +1478,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
// convert old keyframe filters to animated
// these filters were "animated" by adding several instance of the filter, each one having a start and end tag.
// We convert by parsing the start and end tags vor values and adding all to the new animated parameter
QMap
<
QString
,
QStringList
>
keyframeFilterToConvert
;
QMap
<
QString
,
QStringList
>
keyframeFilterToConvert
;
keyframeFilterToConvert
.
insert
(
QStringLiteral
(
"volume"
),
QStringList
()
<<
QStringLiteral
(
"gain"
)
<<
QStringLiteral
(
"end"
)
<<
QStringLiteral
(
"level"
));
keyframeFilterToConvert
.
insert
(
QStringLiteral
(
"brightness"
),
QStringList
()
<<
QStringLiteral
(
"start"
)
<<
QStringLiteral
(
"end"
)
<<
QStringLiteral
(
"level"
));
...
...
@@ -1492,7 +1492,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
QString
id
=
EffectsList
::
property
(
eff
,
QStringLiteral
(
"kdenlive_id"
));
if
(
keyframeFilterToConvert
.
contains
(
id
)
&&
!
parsedIds
.
contains
(
id
))
{
parsedIds
<<
id
;
QMap
<
int
,
double
>
values
;
QMap
<
int
,
double
>
values
;
QStringList
conversionParams
=
keyframeFilterToConvert
.
value
(
id
);
int
offset
=
eff
.
attribute
(
QStringLiteral
(
"in"
)).
toInt
();
int
out
=
eff
.
attribute
(
QStringLiteral
(
"out"
)).
toInt
();
...
...
@@ -1595,7 +1595,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
return
true
;
}
void
DocumentValidator
::
convertKeyframeEffect
(
const
QDomElement
&
effect
,
const
QStringList
&
params
,
QMap
<
int
,
double
>
&
values
,
int
offset
)
void
DocumentValidator
::
convertKeyframeEffect
(
const
QDomElement
&
effect
,
const
QStringList
&
params
,
QMap
<
int
,
double
>
&
values
,
int
offset
)
{
QLocale
locale
;
int
in
=
effect
.
attribute
(
QStringLiteral
(
"in"
)).
toInt
()
-
offset
;
...
...
@@ -1732,8 +1732,8 @@ bool DocumentValidator::isModified() const
void DocumentValidator::updateEffects()
{
// WARNING: order by findDirs will determine which js file to use (in case multiple scripts for the same filter exist)
QMap
<QString, QUrl> paths;
QMap
<QString, QScriptProgram> scripts;
QMap<QString, QUrl> paths;
QMap<QString, QScriptProgram> scripts;
QStringList directories = QStandardPaths::locateAll(QStandardPaths::DataLocation, "effects/update");
foreach (const QString &directoryName, directories) {
QDir directory(directoryName);
...
...
src/doc/documentvalidator.h
View file @
5f7ac07e
...
...
@@ -61,7 +61,7 @@ private:
QString
factorizeGeomValue
(
const
QString
&
value
,
double
factor
);
/** @brief Kdenlive <= 0.9.10 saved title clip item position/opacity with locale which was wrong, fix. */
void
fixTitleProducerLocale
(
QDomElement
&
producer
);
void
convertKeyframeEffect
(
const
QDomElement
&
effect
,
const
QStringList
&
params
,
QMap
<
int
,
double
>
&
values
,
int
offset
);
void
convertKeyframeEffect
(
const
QDomElement
&
effect
,
const
QStringList
&
params
,
QMap
<
int
,
double
>
&
values
,
int
offset
);
};
#endif
src/doc/kdenlivedoc.cpp
View file @
5f7ac07e
...
...
@@ -337,7 +337,7 @@ int KdenliveDoc::setSceneList()
QDomDocument
KdenliveDoc
::
createEmptyDocument
(
int
videotracks
,
int
audiotracks
)
{
QList
<
TrackInfo
>
tracks
;
QList
<
TrackInfo
>
tracks
;
// Tracks are added «backwards», so we need to reverse the track numbering
// mbt 331: http://www.kdenlive.org/mantis/view.php?id=331
// Better default names for tracks: Audio 1 etc. instead of blank numbers
...
...
@@ -368,7 +368,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(int videotracks, int audiotracks)
return
createEmptyDocument
(
tracks
);
}
QDomDocument
KdenliveDoc
::
createEmptyDocument
(
const
QList
<
TrackInfo
>
&
tracks
)
QDomDocument
KdenliveDoc
::
createEmptyDocument
(
const
QList
<
TrackInfo
>
&
tracks
)
{
// Creating new document
QDomDocument
doc
;
...
...
@@ -763,7 +763,7 @@ void KdenliveDoc::setProjectFolder(const QUrl &url)
void
KdenliveDoc
::
moveProjectData
(
const
QString
&
/*src*/
,
const
QString
&
dest
)
{
// Move proxies
QList
<
ClipController
*>
list
=
pCore
->
binController
()
->
getControllerList
();
QList
<
ClipController
*>
list
=
pCore
->
binController
()
->
getControllerList
();
QList
<
QUrl
>
cacheUrls
;
for
(
int
i
=
0
;
i
<
list
.
count
();
++
i
)
{
ClipController
*
clip
=
list
.
at
(
i
);
...
...
@@ -1589,7 +1589,7 @@ void KdenliveDoc::switchProfile(MltVideoProfile profile, const QString &id, cons
}
// Build actions for the info message (switch / cancel)
QList
<
QAction
*>
list
;
QList
<
QAction
*>
list
;
QAction
*
ac
=
new
QAction
(
KoIconUtils
::
themedIcon
(
QStringLiteral
(
"dialog-ok"
)),
i18n
(
"Switch"
),
this
);
QVariantList
params
;
connect
(
ac
,
&
QAction
::
triggered
,
this
,
&
KdenliveDoc
::
slotSwitchProfile
);
...
...
src/doc/kdenlivedoc.h
View file @
5f7ac07e
...
...
@@ -186,7 +186,7 @@ private:
/** Timer used to reload clips when they have been externally modified */
QTimer
m_modifiedTimer
;
/** List of the clip IDs that need to be reloaded after being externally modified */
QMap
<
QString
,
QTime
>
m_modifiedClips
;
QMap
<
QString
,
QTime
>
m_modifiedClips
;
int
m_width
;
int
m_height
;
Timecode
m_timecode
;
...
...
src/dvdwizard/dvdwizard.cpp
View file @
5f7ac07e
...
...
@@ -294,7 +294,7 @@ void DvdWizard::generateDvd()
void
DvdWizard
::
processSpumux
()
{
//qCDebug(KDENLIVE_LOG) << "/// STARTING SPUMUX";
QMap
<
QString
,
QRect
>
buttons
=
m_pageMenu
->
buttonsInfo
();
QMap
<
QString
,
QRect
>
buttons
=
m_pageMenu
->
buttonsInfo
();
QStringList
buttonsTarget
;
// create xml spumux file
QListWidgetItem
*
spuitem
=
m_status
.
job_progress
->
item
(
2
);
...
...
@@ -507,7 +507,7 @@ void DvdWizard::processSpumux()
processDvdauthor
(
menuMovieUrl
,
buttons
,
buttonsTarget
);
}
void
DvdWizard
::
processDvdauthor
(
const
QString
&
menuMovieUrl
,
const
QMap
<
QString
,
QRect
>
&
buttons
,
const
QStringList
&
buttonsTarget
)
void
DvdWizard
::
processDvdauthor
(
const
QString
&
menuMovieUrl
,
const
QMap
<
QString
,
QRect
>
&
buttons
,
const
QStringList
&
buttonsTarget
)
{
// create dvdauthor xml
QListWidgetItem
*
authitem
=
m_status
.
job_progress
->
item
(
3
);
...
...
src/dvdwizard/dvdwizard.h
View file @
5f7ac07e
...
...
@@ -31,7 +31,7 @@
#include
<QTemporaryFile>
typedef
QMap
<
QString
,
QRect
>
stringRectMap
;
typedef
QMap
<
QString
,
QRect
>
stringRectMap
;
class
DvdWizard
:
public
QWizard
{
...
...
Prev
1
2
3
4
5
…
7
Next
Write
Preview
Supports
Markdown
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