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
25b69259
Commit
25b69259
authored
Dec 29, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(app): little fixes & coding style
parent
a7f626e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
20 deletions
+10
-20
ChatProxyModel.hpp
tests/src/components/chat/ChatProxyModel.hpp
+0
-2
ContactModel.cpp
tests/src/components/contact/ContactModel.cpp
+1
-1
CoreManager.hpp
tests/src/components/core/CoreManager.hpp
+0
-1
SmartSearchBarModel.cpp
...s/src/components/smart-search-bar/SmartSearchBarModel.cpp
+6
-8
TimelineModel.cpp
tests/src/components/timeline/TimelineModel.cpp
+3
-8
No files found.
tests/src/components/chat/ChatProxyModel.hpp
View file @
25b69259
...
...
@@ -45,9 +45,7 @@ public:
public
slots
:
void
loadMoreEntries
();
void
setEntryTypeFilter
(
ChatModel
::
EntryType
type
);
void
removeEntry
(
int
id
);
void
removeAllEntries
()
{
...
...
tests/src/components/contact/ContactModel.cpp
View file @
25b69259
...
...
@@ -17,7 +17,7 @@ ContactModel::ContactModel (shared_ptr<linphone::Friend> linphone_friend) {
ContactModel
::
ContactModel
(
VcardModel
*
vcard
)
{
QQmlEngine
*
engine
=
App
::
getInstance
()
->
getEngine
();
if
(
engine
->
objectOwnership
(
vcard
)
==
QQmlEngine
::
CppOwnership
)
throw
std
::
invalid_argument
(
"A contact is already linked to this vcard."
);
throw
invalid_argument
(
"A contact is already linked to this vcard."
);
m_linphone_friend
=
linphone
::
Friend
::
newFromVcard
(
vcard
->
m_vcard
);
m_vcard
.
reset
(
vcard
);
...
...
tests/src/components/core/CoreManager.hpp
View file @
25b69259
#ifndef CORE_MANAGER_H_
#define CORE_MANAGER_H_
#include "../contact/VcardModel.hpp"
#include "../contacts/ContactsListModel.hpp"
#include "../sip-addresses/SipAddressesModel.hpp"
...
...
tests/src/components/smart-search-bar/SmartSearchBarModel.cpp
View file @
25b69259
...
...
@@ -35,18 +35,16 @@ void SmartSearchBarModel::setFilter (const QString &pattern) {
// -----------------------------------------------------------------------------
bool
SmartSearchBarModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
const
QModelIndex
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QVariantMap
map
=
index
.
data
().
toMap
();
return
computeStringWeight
(
map
[
"sipAddress"
].
toString
())
>
0
;
const
QModelIndex
&
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
return
computeStringWeight
(
index
.
data
().
toMap
()[
"sipAddress"
].
toString
())
>
0
;
}
bool
SmartSearchBarModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
const
QVariantMap
map_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
map_b
=
sourceModel
()
->
data
(
right
).
toMap
();
const
QVariantMap
&
map_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
&
map_b
=
sourceModel
()
->
data
(
right
).
toMap
();
const
QString
sip_address_a
=
map_a
[
"sipAddress"
].
toString
();
const
QString
sip_address_b
=
map_b
[
"sipAddress"
].
toString
();
const
QString
&
sip_address_a
=
map_a
[
"sipAddress"
].
toString
();
const
QString
&
sip_address_b
=
map_b
[
"sipAddress"
].
toString
();
int
weight_a
=
computeStringWeight
(
sip_address_a
);
int
weight_b
=
computeStringWeight
(
sip_address_b
);
...
...
tests/src/components/timeline/TimelineModel.cpp
View file @
25b69259
...
...
@@ -18,15 +18,10 @@ QHash<int, QByteArray> TimelineModel::roleNames () const {
// -----------------------------------------------------------------------------
bool
TimelineModel
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
const
QModelIndex
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
const
QVariantMap
map
=
index
.
data
().
toMap
();
return
map
.
contains
(
"timestamp"
);
const
QModelIndex
&
index
=
sourceModel
()
->
index
(
source_row
,
0
,
source_parent
);
return
index
.
data
().
toMap
().
contains
(
"timestamp"
);
}
bool
TimelineModel
::
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
{
const
QVariantMap
sip_address_a
=
sourceModel
()
->
data
(
left
).
toMap
();
const
QVariantMap
sip_address_b
=
sourceModel
()
->
data
(
right
).
toMap
();
return
sip_address_a
[
"timestamp"
]
>
sip_address_b
[
"timestamp"
];
return
sourceModel
()
->
data
(
left
).
toMap
()[
"timestamp"
]
>
sourceModel
()
->
data
(
right
).
toMap
()[
"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