Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
4493cbbc
Commit
4493cbbc
authored
Jan 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on new project with Qt 5.14
Related to
#494
parent
3ef3b454
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/timeline2/view/timelinewidget.cpp
src/timeline2/view/timelinewidget.cpp
+3
-2
No files found.
src/timeline2/view/timelinewidget.cpp
View file @
4493cbbc
...
...
@@ -65,6 +65,7 @@ TimelineWidget::TimelineWidget(QWidget *parent)
// Build transition model for context menu
m_transitionModel
=
TransitionTreeModel
::
construct
(
true
,
this
);
m_transitionProxyModel
=
std
::
make_unique
<
TransitionFilter
>
(
this
);
m_sortModel
=
std
::
make_unique
<
QSortFilterProxyModel
>
(
this
);
static_cast
<
TransitionFilter
*>
(
m_transitionProxyModel
.
get
())
->
setFilterType
(
true
,
TransitionType
::
Favorites
);
m_transitionProxyModel
->
setSourceModel
(
m_transitionModel
.
get
());
m_transitionProxyModel
->
setSortRole
(
AssetTreeModel
::
NameRole
);
...
...
@@ -90,6 +91,8 @@ TimelineWidget::TimelineWidget(QWidget *parent)
TimelineWidget
::~
TimelineWidget
()
{
rootContext
()
->
setContextProperty
(
"multitrack"
,
0
);
rootContext
()
->
setContextProperty
(
"timeline"
,
0
);
delete
m_proxy
;
}
...
...
@@ -114,11 +117,9 @@ const QStringList TimelineWidget::sortedItems(const QStringList &items, bool isT
void
TimelineWidget
::
setModel
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
model
,
MonitorProxy
*
proxy
)
{
m_sortModel
=
std
::
make_unique
<
QSortFilterProxyModel
>
(
this
);
m_sortModel
->
setSourceModel
(
model
.
get
());
m_sortModel
->
setSortRole
(
TimelineItemModel
::
SortRole
);
m_sortModel
->
sort
(
0
,
Qt
::
DescendingOrder
);
m_proxy
->
setModel
(
model
);
rootContext
()
->
setContextProperty
(
"multitrack"
,
m_sortModel
.
get
());
rootContext
()
->
setContextProperty
(
"controller"
,
model
.
get
());
...
...
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