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
30bbf15f
Commit
30bbf15f
authored
Jun 26, 2017
by
Nicolas Carion
Browse files
linting
parent
b09c59a8
Changes
67
Hide whitespace changes
Inline
Side-by-side
src/abstractmodel/abstracttreemodel.cpp
View file @
30bbf15f
...
...
@@ -25,8 +25,8 @@
#include
<QDebug>
#include
<utility>
#include
<unordered_set>
#include
<queue>
#include
<unordered_set>
int
AbstractTreeModel
::
currentTreeId
=
0
;
AbstractTreeModel
::
AbstractTreeModel
(
QObject
*
parent
)
...
...
@@ -41,7 +41,8 @@ std::shared_ptr<AbstractTreeModel> AbstractTreeModel::construct(QObject *parent)
return
self
;
}
AbstractTreeModel
::~
AbstractTreeModel
(){
AbstractTreeModel
::~
AbstractTreeModel
()
{
m_allItems
.
clear
();
rootItem
.
reset
();
}
...
...
@@ -201,16 +202,14 @@ std::shared_ptr<TreeItem> AbstractTreeModel::getRoot() const
bool
AbstractTreeModel
::
checkConsistency
()
{
// first check that the root is all good
if
(
!
rootItem
||
!
rootItem
->
m_isRoot
||
!
rootItem
->
isInModel
()
||
m_allItems
.
count
(
rootItem
->
getId
())
==
0
){
qDebug
()
<<
!
rootItem
->
m_isRoot
<<
!
rootItem
->
isInModel
()
<<
(
m_allItems
.
count
(
rootItem
->
getId
())
==
0
);
if
(
!
rootItem
||
!
rootItem
->
m_isRoot
||
!
rootItem
->
isInModel
()
||
m_allItems
.
count
(
rootItem
->
getId
())
==
0
)
{
qDebug
()
<<
!
rootItem
->
m_isRoot
<<
!
rootItem
->
isInModel
()
<<
(
m_allItems
.
count
(
rootItem
->
getId
())
==
0
);
qDebug
()
<<
"ERROR: Model is not valid because root is not properly constructed"
;
return
false
;
}
// Then we traverse the tree from the root, checking the infos on the way
std
::
unordered_set
<
int
>
seenIDs
;
std
::
queue
<
std
::
pair
<
int
,
std
::
pair
<
int
,
int
>>
>
queue
;
// store (id, (depth, parentId))
std
::
queue
<
std
::
pair
<
int
,
std
::
pair
<
int
,
int
>>>
queue
;
// store (id, (depth, parentId))
queue
.
push
({
rootItem
->
getId
(),
{
0
,
rootItem
->
getId
()}});
while
(
!
queue
.
empty
())
{
auto
current
=
queue
.
front
();
...
...
@@ -236,17 +235,16 @@ bool AbstractTreeModel::checkConsistency()
return
false
;
}
if
(
currentId
!=
rootItem
->
getId
())
{
if
((
currentDepth
==
0
||
currentItem
->
m_isRoot
))
{
if
((
currentDepth
==
0
||
currentItem
->
m_isRoot
))
{
qDebug
()
<<
"ERROR: Invalid tree: duplicate root"
;
return
false
;
}
if
(
auto
ptr
=
currentItem
->
parentItem
().
lock
())
{
if
(
ptr
->
getId
()
!=
parentId
||
ptr
->
child
(
currentItem
->
row
())
->
getId
()
!=
currentItem
->
getId
())
{
if
(
ptr
->
getId
()
!=
parentId
||
ptr
->
child
(
currentItem
->
row
())
->
getId
()
!=
currentItem
->
getId
())
{
qDebug
()
<<
"ERROR: Invalid tree: invalid parent link"
;
return
false
;
}
}
else
{
}
else
{
qDebug
()
<<
"ERROR: Invalid tree: invalid parent"
;
return
false
;
}
...
...
src/abstractmodel/abstracttreemodel.hpp
View file @
30bbf15f
...
...
@@ -50,7 +50,6 @@ public:
/* @brief Given an item from the hierarchy, construct the corresponding ModelIndex */
QModelIndex
getIndexFromItem
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
)
const
;
/* @brief Return a ptr to an item given its id */
std
::
shared_ptr
<
TreeItem
>
getItemById
(
int
id
)
const
;
...
...
src/abstractmodel/treeitem.cpp
View file @
30bbf15f
...
...
@@ -160,7 +160,7 @@ bool TreeItem::changeParent(std::shared_ptr<TreeItem> newParent)
res
=
newParent
->
appendChild
(
shared_from_this
());
if
(
res
)
{
m_parentItem
=
newParent
;
}
else
if
(
oldParent
){
}
else
if
(
oldParent
)
{
// something went wrong, we have to reset the parent.
bool
reverse
=
oldParent
->
appendChild
(
shared_from_this
());
Q_ASSERT
(
reverse
);
...
...
@@ -249,7 +249,8 @@ void TreeItem::deregisterSelf()
}
}
bool
TreeItem
::
hasAncestor
(
int
id
)
{
bool
TreeItem
::
hasAncestor
(
int
id
)
{
if
(
m_id
==
id
)
{
return
true
;
}
...
...
src/assets/assetpanel.cpp
View file @
30bbf15f
...
...
@@ -20,8 +20,8 @@
***************************************************************************/
#include
"assetpanel.hpp"
#include
"effects/effectstack/model/effectstackmodel.hpp"
#include
"effects/effectstack/model/effectitemmodel.hpp"
#include
"effects/effectstack/model/effectstackmodel.hpp"
#include
"effects/effectstack/view/effectstackview.hpp"
#include
"kdenlivesettings.h"
#include
"model/assetparametermodel.hpp"
...
...
@@ -62,7 +62,7 @@ void AssetPanel::showTransition(int tid, std::shared_ptr<AssetParameterModel> tr
m_transitionWidget
->
setModel
(
transitionModel
,
QPair
<
int
,
int
>
(
-
1
,
-
1
),
true
);
}
void
AssetPanel
::
showEffectStack
(
const
QString
&
clipName
,
std
::
shared_ptr
<
EffectStackModel
>
effectsModel
,
QPair
<
int
,
int
>
range
)
void
AssetPanel
::
showEffectStack
(
const
QString
&
clipName
,
std
::
shared_ptr
<
EffectStackModel
>
effectsModel
,
QPair
<
int
,
int
>
range
)
{
clear
();
m_assetTitle
->
setText
(
i18n
(
"%1 effects"
,
clipName
));
...
...
@@ -125,8 +125,7 @@ const QString AssetPanel::getStyleSheet()
QStringLiteral
(
"QFrame#decoframesub {border-top:1px solid palette(light);} QFrame#decoframesub[active=
\"
true
\"
] {background: %1;}"
).
arg
(
hgh
.
name
()));
// group background
stylesheet
.
append
(
QStringLiteral
(
"QFrame#decoframegroup {border:2px solid palette(dark);margin:0px;margin-top:2px;} "
));
stylesheet
.
append
(
QStringLiteral
(
"QFrame#decoframegroup {border:2px solid palette(dark);margin:0px;margin-top:2px;} "
));
// effect title bar
stylesheet
.
append
(
QStringLiteral
(
"QFrame#frame {margin-bottom:2px;} QFrame#frame[target=
\"
true
\"
] "
...
...
src/assets/assetpanel.hpp
View file @
30bbf15f
...
...
@@ -47,7 +47,7 @@ public:
void
showTransition
(
int
tid
,
std
::
shared_ptr
<
AssetParameterModel
>
transition_model
);
/* @brief Shows the parameters of the given effect stack model */
void
showEffectStack
(
const
QString
&
clipName
,
std
::
shared_ptr
<
EffectStackModel
>
effectsModel
,
QPair
<
int
,
int
>
range
);
void
showEffectStack
(
const
QString
&
clipName
,
std
::
shared_ptr
<
EffectStackModel
>
effectsModel
,
QPair
<
int
,
int
>
range
);
/* @brief Clear the panel so that it doesn't display anything */
void
clear
();
...
...
src/assets/model/assetcommand.cpp
View file @
30bbf15f
...
...
@@ -19,13 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#include
"assetcommand.hpp"
#include
"transitions/transitionsrepository.hpp"
#include
"effects/effectsrepository.hpp"
#include
"transitions/transitionsrepository.hpp"
#include
<memory>
AssetCommand
::
AssetCommand
(
std
::
shared_ptr
<
AssetParameterModel
>
model
,
const
QModelIndex
&
index
,
const
QString
&
value
,
QUndoCommand
*
parent
)
:
QUndoCommand
(
parent
)
,
m_model
(
model
)
...
...
@@ -67,11 +65,11 @@ int AssetCommand::id() const
// virtual
bool
AssetCommand
::
mergeWith
(
const
QUndoCommand
*
other
)
{
if
(
other
->
id
()
!=
id
()
||
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_index
!=
m_index
||
m_stamp
.
msecsTo
(
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_stamp
)
>
3000
)
{
if
(
other
->
id
()
!=
id
()
||
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_index
!=
m_index
||
m_stamp
.
msecsTo
(
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_stamp
)
>
3000
)
{
return
false
;
}
m_value
=
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_value
;
m_stamp
=
static_cast
<
const
AssetCommand
*>
(
other
)
->
m_stamp
;
return
true
;
}
src/assets/model/assetcommand.hpp
View file @
30bbf15f
...
...
@@ -23,8 +23,8 @@
#define ASSETCOMMAND_H
#include
"assetparametermodel.hpp"
#include
<QUndoCommand>
#include
<QTime>
#include
<QUndoCommand>
class
AssetCommand
:
public
QUndoCommand
{
...
...
src/assets/model/assetparametermodel.cpp
View file @
30bbf15f
...
...
@@ -21,8 +21,8 @@
#include
"assetparametermodel.hpp"
#include
"core.h"
#include
"klocalizedstring.h"
#include
"kdenlivesettings.h"
#include
"klocalizedstring.h"
#include
"profiles/profilemodel.hpp"
#include
<QDebug>
#include
<QLocale>
...
...
@@ -173,7 +173,9 @@ QVariant AssetParameterModel::data(const QModelIndex &index, int role) const
return
element
.
attribute
(
QStringLiteral
(
"opacity"
))
!=
QLatin1String
(
"false"
);
case
ValueRole
:
{
QString
value
=
m_asset
->
get
(
paramName
.
toUtf8
().
constData
());
return
value
.
isEmpty
()
?
(
element
.
attribute
(
QStringLiteral
(
"value"
)).
isNull
()
?
parseAttribute
(
QStringLiteral
(
"default"
),
element
)
:
element
.
attribute
(
QStringLiteral
(
"value"
)))
:
value
;
return
value
.
isEmpty
()
?
(
element
.
attribute
(
QStringLiteral
(
"value"
)).
isNull
()
?
parseAttribute
(
QStringLiteral
(
"default"
),
element
)
:
element
.
attribute
(
QStringLiteral
(
"value"
)))
:
value
;
}
case
ListValuesRole
:
return
element
.
attribute
(
QStringLiteral
(
"paramlist"
)).
split
(
QLatin1Char
(
';'
));
...
...
@@ -195,7 +197,7 @@ int AssetParameterModel::rowCount(const QModelIndex &parent) const
// static
ParamType
AssetParameterModel
::
paramTypeFromStr
(
const
QString
&
type
)
{
if
(
type
==
QLatin1String
(
"double"
)
||
type
==
QLatin1String
(
"float"
)
||
type
==
QLatin1String
(
"constant"
))
{
if
(
type
==
QLatin1String
(
"double"
)
||
type
==
QLatin1String
(
"float"
)
||
type
==
QLatin1String
(
"constant"
))
{
return
ParamType
::
Double
;
}
if
(
type
==
QLatin1String
(
"list"
))
{
...
...
@@ -341,4 +343,3 @@ int AssetParameterModel::getParentId() const
{
return
m_parentId
;
}
src/assets/model/assetparametermodel.hpp
View file @
30bbf15f
...
...
@@ -39,7 +39,6 @@
*/
enum
class
ParamType
{
Double
,
List
,
...
...
src/assets/view/assetparameterview.cpp
View file @
30bbf15f
...
...
@@ -21,11 +21,11 @@
#include
"assetparameterview.hpp"
#include
"assets/model/assetparametermodel.hpp"
#include
"assets/model/assetcommand.hpp"
#include
"assets/model/assetparametermodel.hpp"
#include
"assets/view/widgets/abstractparamwidget.hpp"
#include
"effectstack/widgets/animationwidget.h"
#include
"core.h"
#include
"effectstack/widgets/animationwidget.h"
#include
<QDebug>
#include
<QFontDatabase>
...
...
@@ -42,7 +42,7 @@ AssetParameterView::AssetParameterView(QWidget *parent)
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
}
void
AssetParameterView
::
setModel
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QPair
<
int
,
int
>
range
,
bool
addSpacer
)
void
AssetParameterView
::
setModel
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QPair
<
int
,
int
>
range
,
bool
addSpacer
)
{
qDebug
()
<<
"set model "
<<
model
.
get
();
unsetModel
();
...
...
@@ -59,7 +59,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
}
else
{
auto
w
=
AbstractParamWidget
::
construct
(
model
,
index
,
range
,
this
);
if
(
type
==
ParamType
::
Geometry
||
type
==
ParamType
::
Animated
||
type
==
ParamType
::
RestrictedAnim
||
type
==
ParamType
::
AnimatedRect
)
{
animWidget
=
static_cast
<
AnimationWidget
*>
(
w
);
animWidget
=
static_cast
<
AnimationWidget
*>
(
w
);
}
connect
(
w
,
&
AbstractParamWidget
::
valueChanged
,
this
,
&
AssetParameterView
::
commitChanges
);
m_lay
->
addWidget
(
w
);
...
...
@@ -83,7 +83,7 @@ void AssetParameterView::resetValues()
}
}
void
AssetParameterView
::
setRange
(
QPair
<
int
,
int
>
range
)
void
AssetParameterView
::
setRange
(
QPair
<
int
,
int
>
range
)
{
QMutexLocker
lock
(
&
m_lock
);
for
(
int
i
=
0
;
i
<
m_widgets
.
size
();
++
i
)
{
...
...
@@ -140,4 +140,3 @@ int AssetParameterView::contentHeight() const
{
return
m_lay
->
sizeHint
().
height
();
}
src/assets/view/assetparameterview.hpp
View file @
30bbf15f
...
...
@@ -23,9 +23,9 @@
#define ASSETPARAMETERVIEW_H
#include
<QModelIndex>
#include
<QMutex>
#include
<QVector>
#include
<QWidget>
#include
<QMutex>
#include
<memory>
/* @brief This class is the view for a list of parameters.
...
...
@@ -44,7 +44,7 @@ public:
AssetParameterView
(
QWidget
*
parent
=
nullptr
);
/** Sets the model to be displayed by current view */
void
setModel
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QPair
<
int
,
int
>
range
,
bool
addSpacer
=
false
);
void
setModel
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QPair
<
int
,
int
>
range
,
bool
addSpacer
=
false
);
/** Set the widget to display no model (this yield ownership on the smart-ptr)*/
void
unsetModel
();
...
...
@@ -56,7 +56,7 @@ public:
void
resetValues
();
/** The parent clip in/out points changed, update effects */
void
setRange
(
QPair
<
int
,
int
>
range
);
void
setRange
(
QPair
<
int
,
int
>
range
);
protected:
/** @brief This is a handler for the dataChanged slot of the model.
...
...
src/assets/view/widgets/abstractparamwidget.cpp
View file @
30bbf15f
...
...
@@ -22,8 +22,8 @@
#include
"boolparamwidget.hpp"
#include
"doubleparamwidget.hpp"
#include
"effectstack/widgets/animationwidget.h"
#include
"effectstack/widgets/listparamwidget.h"
#include
"effectstack/widgets/keyframeedit.h"
#include
"effectstack/widgets/listparamwidget.h"
#include
<QLabel>
#include
<QVBoxLayout>
...
...
@@ -56,7 +56,8 @@ AbstractParamWidget::AbstractParamWidget(std::shared_ptr<AssetParameterModel> mo
{
}
AbstractParamWidget
*
AbstractParamWidget
::
construct
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QModelIndex
index
,
QPair
<
int
,
int
>
range
,
QWidget
*
parent
)
AbstractParamWidget
*
AbstractParamWidget
::
construct
(
const
std
::
shared_ptr
<
AssetParameterModel
>
&
model
,
QModelIndex
index
,
QPair
<
int
,
int
>
range
,
QWidget
*
parent
)
{
// We retrieve the parameter type
auto
type
=
model
->
data
(
index
,
AssetParameterModel
::
TypeRole
).
value
<
ParamType
>
();
...
...
src/assets/view/widgets/abstractparamwidget.hpp
View file @
30bbf15f
...
...
@@ -68,7 +68,7 @@ public slots:
/** @brief update the clip's in/out point
*/
virtual
void
slotSetRange
(
QPair
<
int
,
int
>
range
)
=
0
;
virtual
void
slotSetRange
(
QPair
<
int
,
int
>
range
)
=
0
;
protected:
std
::
shared_ptr
<
AssetParameterModel
>
m_model
;
...
...
src/assets/view/widgets/doubleparamwidget.cpp
View file @
30bbf15f
...
...
@@ -64,7 +64,8 @@ void DoubleParamWidget::slotRefresh()
m_lay
->
addWidget
(
m_doubleWidget
);
// Connect signal
connect
(
m_doubleWidget
,
&
DoubleWidget
::
valueChanged
,
[
this
,
locale
](
double
value
)
{
emit
valueChanged
(
m_index
,
locale
.
toString
(
value
/
m_doubleWidget
->
factor
));
});
connect
(
m_doubleWidget
,
&
DoubleWidget
::
valueChanged
,
[
this
,
locale
](
double
value
)
{
emit
valueChanged
(
m_index
,
locale
.
toString
(
value
/
m_doubleWidget
->
factor
));
});
}
void
DoubleParamWidget
::
slotShowComment
(
bool
show
)
...
...
@@ -75,4 +76,3 @@ void DoubleParamWidget::slotShowComment(bool show)
void
DoubleParamWidget
::
slotSetRange
(
QPair
<
int
,
int
>
)
{
}
src/bin/bin.cpp
View file @
30bbf15f
...
...
@@ -1386,7 +1386,7 @@ QString Bin::slotAddFolder(const QString &folderName)
std
::
shared_ptr
<
AbstractProjectItem
>
currentItem
=
m_itemModel
->
getBinItemByIndex
(
m_proxyModel
->
mapToSource
(
ix
));
parentFolder
=
std
::
static_pointer_cast
<
ProjectFolder
>
(
currentItem
->
getEnclosingFolder
());
}
qDebug
()
<<
"pranteforder id"
<<
parentFolder
->
clipId
();
qDebug
()
<<
"pranteforder id"
<<
parentFolder
->
clipId
();
QString
newId
;
Fun
undo
=
[]()
{
return
true
;
};
Fun
redo
=
[]()
{
return
true
;
};
...
...
@@ -1400,7 +1400,7 @@ QString Bin::slotAddFolder(const QString &folderName)
}
auto
folder
=
m_itemModel
->
getFolderByBinId
(
newId
);
ix
=
m_itemModel
->
getIndexFromItem
(
folder
);
qDebug
()
<<
"selecting"
<<
ix
;
qDebug
()
<<
"selecting"
<<
ix
;
if
(
ix
.
isValid
())
{
qDebug
()
<<
"ix valid"
;
m_proxyModel
->
selectionModel
()
->
clearSelection
();
...
...
@@ -2844,7 +2844,6 @@ void Bin::slotItemEdited(const QModelIndex &ix, const QModelIndex &, const QVect
}
}
void
Bin
::
renameSubClipCommand
(
const
QString
&
id
,
const
QString
&
newName
,
const
QString
&
oldName
,
int
in
,
int
out
)
{
auto
*
command
=
new
RenameBinSubClipCommand
(
this
,
id
,
newName
,
oldName
,
in
,
out
);
...
...
src/bin/bincommands.cpp
View file @
30bbf15f
...
...
@@ -96,7 +96,6 @@ void MoveBinFolderCommand::redo()
m_bin
->
doMoveFolder
(
m_clipId
,
m_newParentId
);
}
RenameBinSubClipCommand
::
RenameBinSubClipCommand
(
Bin
*
bin
,
const
QString
&
clipId
,
const
QString
&
newName
,
const
QString
&
oldName
,
int
in
,
int
out
,
QUndoCommand
*
parent
)
:
QUndoCommand
(
parent
)
...
...
src/bin/projectfolder.cpp
View file @
30bbf15f
...
...
@@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include
"projectfolder.h"
#include
"bin.h"
#include
"projectclip.h"
#include
"core.h"
#include
"projectclip.h"
#include
"projectitemmodel.h"
#include
"utils/KoIconUtils.h"
...
...
src/bin/projectitemmodel.cpp
View file @
30bbf15f
...
...
@@ -26,16 +26,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include
"doc/kdenlivedoc.h"
#include
"kdenlivesettings.h"
#include
"macros.hpp"
#include
"profiles/profilemodel.hpp"
#include
"projectclip.h"
#include
"projectfolder.h"
#include
"projectsubclip.h"
#include
"profiles/profilemodel.hpp"
#include
<KLocalizedString>
#include
<QIcon>
#include
<QMimeData>
#include
<qvarlengtharray.h>
#include
<mlt++/Mlt.h>
#include
<qvarlengtharray.h>
ProjectItemModel
::
ProjectItemModel
(
Bin
*
bin
,
QObject
*
parent
)
:
AbstractTreeModel
(
parent
)
...
...
@@ -326,11 +326,11 @@ QStringList ProjectItemModel::getEnclosingFolderInfo(const QModelIndex &index) c
void
ProjectItemModel
::
clean
()
{
std
::
vector
<
std
::
shared_ptr
<
TreeItem
>
>
toDelete
;
std
::
vector
<
std
::
shared_ptr
<
TreeItem
>>
toDelete
;
for
(
int
i
=
0
;
i
<
rootItem
->
childCount
();
++
i
)
{
toDelete
.
push_back
(
rootItem
->
child
(
i
));
}
for
(
const
auto
&
child
:
toDelete
)
{
for
(
const
auto
&
child
:
toDelete
)
{
rootItem
->
removeChild
(
child
);
}
Q_ASSERT
(
rootItem
->
childCount
()
==
0
);
...
...
@@ -410,16 +410,16 @@ void ProjectItemModel::registerItem(const std::shared_ptr<TreeItem> &item)
}
void
ProjectItemModel
::
deregisterItem
(
int
id
,
TreeItem
*
item
)
{
auto
clip
=
static_cast
<
AbstractProjectItem
*>
(
item
);
auto
clip
=
static_cast
<
AbstractProjectItem
*>
(
item
);
manageBinClipDeletion
(
clip
);
AbstractTreeModel
::
deregisterItem
(
id
,
item
);
}
void
ProjectItemModel
::
manageBinClipInsertion
(
const
std
::
shared_ptr
<
AbstractProjectItem
>
&
binElem
)
{
switch
(
binElem
->
itemType
())
{
switch
(
binElem
->
itemType
())
{
case
AbstractProjectItem
::
FolderItem
:
{
//When a folder is inserted, we have to store its path into the properties
//
When a folder is inserted, we have to store its path into the properties
if
(
binElem
->
parent
())
{
QString
propertyName
=
"kdenlive:folder."
+
binElem
->
parent
()
->
clipId
()
+
QLatin1Char
(
'.'
)
+
binElem
->
clipId
();
m_binPlaylist
->
set
(
propertyName
.
toUtf8
().
constData
(),
binElem
->
name
().
toUtf8
().
constData
());
...
...
@@ -433,9 +433,9 @@ void ProjectItemModel::manageBinClipInsertion(const std::shared_ptr<AbstractProj
void
ProjectItemModel
::
manageBinClipDeletion
(
AbstractProjectItem
*
binElem
)
{
switch
(
binElem
->
itemType
())
{
switch
(
binElem
->
itemType
())
{
case
AbstractProjectItem
::
FolderItem
:
{
//When a folder is removed, we clear the path info
//
When a folder is removed, we clear the path info
if
(
!
binElem
->
lastParentId
().
isEmpty
())
{
QString
propertyName
=
"kdenlive:folder."
+
binElem
->
lastParentId
()
+
QLatin1Char
(
'.'
)
+
binElem
->
clipId
();
m_binPlaylist
->
set
(
propertyName
.
toUtf8
().
constData
(),
(
char
*
)
nullptr
);
...
...
@@ -483,7 +483,7 @@ bool ProjectItemModel::requestAddFolder(QString &id, const QString &name, const
Fun
ProjectItemModel
::
requestRenameFolder_lambda
(
std
::
shared_ptr
<
AbstractProjectItem
>
folder
,
const
QString
&
newName
)
{
int
id
=
folder
->
getId
();
return
[
this
,
id
,
newName
](){
return
[
this
,
id
,
newName
]()
{
auto
currentFolder
=
std
::
static_pointer_cast
<
AbstractProjectItem
>
(
m_allItems
[
id
].
lock
());
if
(
!
currentFolder
)
{
return
false
;
...
...
src/bin/projectitemmodel.h
View file @
30bbf15f
...
...
@@ -131,7 +131,6 @@ public:
void
registerItem
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
)
override
;
void
deregisterItem
(
int
id
,
TreeItem
*
item
)
override
;
protected:
/* @brief This function updates the underlying binPlaylist object to reflect deletion of a bin item
@param binElem is the bin item deleted. Note that exceptionnally, this function takes a raw pointer instead of a smart one.
...
...
src/capture/mltdevicecapture.cpp
View file @
30bbf15f
...
...
@@ -51,7 +51,7 @@ MltDeviceCapture::MltDeviceCapture(QString profile, /*VideoSurface *surface, */
{
analyseAudio
=
KdenliveSettings
::
monitor_audio
();
if
(
profile
.
isEmpty
())
{
//profile = KdenliveSettings::current_profile();
//
profile = KdenliveSettings::current_profile();
}
buildConsumer
(
profile
);
connect
(
this
,
&
MltDeviceCapture
::
unblockPreview
,
this
,
&
MltDeviceCapture
::
slotPreparePreview
);
...
...
Prev
1
2
3
4
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