Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
a7f626e3
Commit
a7f626e3
authored
Dec 29, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src/components/sip-addresses/SipAddressesModel): ignore aborted calls
parent
2c100ab0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
SipAddressesModel.cpp
tests/src/components/sip-addresses/SipAddressesModel.cpp
+4
-0
SmartSearchBarModel.cpp
...s/src/components/smart-search-bar/SmartSearchBarModel.cpp
+6
-6
TimelineModel.cpp
tests/src/components/timeline/TimelineModel.cpp
+4
-4
No files found.
tests/src/components/sip-addresses/SipAddressesModel.cpp
View file @
a7f626e3
...
@@ -191,6 +191,10 @@ void SipAddressesModel::fetchSipAddresses () {
...
@@ -191,6 +191,10 @@ void SipAddressesModel::fetchSipAddresses () {
if
(
address_done
.
contains
(
sip_address
))
if
(
address_done
.
contains
(
sip_address
))
continue
;
// Already used.
continue
;
// Already used.
if
(
call_log
->
getStatus
()
==
linphone
::
CallStatusAborted
)
continue
;
// Ignore aborted calls.
address_done
<<
sip_address
;
address_done
<<
sip_address
;
QVariantMap
map
;
QVariantMap
map
;
...
...
tests/src/components/smart-search-bar/SmartSearchBarModel.cpp
View file @
a7f626e3
...
@@ -35,18 +35,18 @@ void SmartSearchBarModel::setFilter (const QString &pattern) {
...
@@ -35,18 +35,18 @@ void SmartSearchBarModel::setFilter (const QString &pattern) {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
bool
SmartSearchBarModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
bool
SmartSearchBarModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
const
QModelIndex
&
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QModelIndex
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QVariantMap
&
map
=
index
.
data
().
toMap
();
const
QVariantMap
map
=
index
.
data
().
toMap
();
return
computeStringWeight
(
map
[
"sipAddress"
].
toString
())
>
0
;
return
computeStringWeight
(
map
[
"sipAddress"
].
toString
())
>
0
;
}
}
bool
SmartSearchBarModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
bool
SmartSearchBarModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
const
QVariantMap
&
map_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
map_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
&
map_b
=
sourceModel
()
->
data
(
right
).
toMap
();
const
QVariantMap
map_b
=
sourceModel
()
->
data
(
right
).
toMap
();
const
QString
&
sip_address_a
=
map_a
[
"sipAddress"
].
toString
();
const
QString
sip_address_a
=
map_a
[
"sipAddress"
].
toString
();
const
QString
&
sip_address_b
=
map_b
[
"sipAddress"
].
toString
();
const
QString
sip_address_b
=
map_b
[
"sipAddress"
].
toString
();
int
weight_a
=
computeStringWeight
(
sip_address_a
);
int
weight_a
=
computeStringWeight
(
sip_address_a
);
int
weight_b
=
computeStringWeight
(
sip_address_b
);
int
weight_b
=
computeStringWeight
(
sip_address_b
);
...
...
tests/src/components/timeline/TimelineModel.cpp
View file @
a7f626e3
...
@@ -18,15 +18,15 @@ QHash<int, QByteArray> TimelineModel::roleNames () const {
...
@@ -18,15 +18,15 @@ QHash<int, QByteArray> TimelineModel::roleNames () const {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
bool
TimelineModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
bool
TimelineModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
const
QModelIndex
&
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QModelIndex
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QVariantMap
&
map
=
index
.
data
().
toMap
();
const
QVariantMap
map
=
index
.
data
().
toMap
();
return
map
.
contains
(
"timestamp"
);
return
map
.
contains
(
"timestamp"
);
}
}
bool
TimelineModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
bool
TimelineModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
const
QVariantMap
&
sip_address_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
sip_address_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
&
sip_address_b
=
sourceModel
()
->
data
(
right
).
toMap
();
const
QVariantMap
sip_address_b
=
sourceModel
()
->
data
(
right
).
toMap
();
return
sip_address_a
[
"timestamp"
]
>
sip_address_b
[
"timestamp"
];
return
sip_address_a
[
"timestamp"
]
>
sip_address_b
[
"timestamp"
];
}
}
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