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
e80ba181
Commit
e80ba181
authored
Aug 26, 2020
by
Jean-Baptiste Mardelle
Browse files
Sort insertion order using int instead of string.
Related to
#583
parent
1e00ab87
Pipeline
#31839
passed with stage
in 10 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/abstractprojectitem.cpp
View file @
e80ba181
...
...
@@ -132,7 +132,7 @@ QVariant AbstractProjectItem::getData(DataType type) const
data
=
QVariant
(
m_thumbnail
);
break
;
case
DataId
:
data
=
QVariant
(
m_binId
);
data
=
QVariant
(
m_binId
.
toInt
()
);
break
;
case
DataDuration
:
data
=
QVariant
(
m_duration
);
...
...
src/bin/projectsortproxymodel.cpp
View file @
e80ba181
...
...
@@ -124,6 +124,9 @@ bool ProjectSortProxyModel::lessThan(const QModelIndex &left, const QModelIndex
if
(
leftData
.
type
()
==
QVariant
::
DateTime
)
{
return
leftData
.
toDateTime
()
<
rightData
.
toDateTime
();
}
if
(
leftData
.
type
()
==
QVariant
::
Int
)
{
return
leftData
.
toInt
()
<
rightData
.
toInt
();
}
return
m_collator
.
compare
(
leftData
.
toString
(),
rightData
.
toString
())
<
0
;
}
if
(
sortOrder
()
==
Qt
::
AscendingOrder
)
{
...
...
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