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
ceef883d
Commit
ceef883d
authored
Nov 30, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/views/App/MainWindow/Contacts): $contact was undefined in some cases
parent
31321a4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
19 deletions
+11
-19
ContactsListProxyModel.cpp
tests/src/components/contacts/ContactsListProxyModel.cpp
+3
-2
ContactsListProxyModel.hpp
tests/src/components/contacts/ContactsListProxyModel.hpp
+6
-0
Contacts.qml
tests/ui/views/App/MainWindow/Contacts.qml
+2
-17
No files found.
tests/src/components/contacts/ContactsListProxyModel.cpp
View file @
ceef883d
...
...
@@ -7,8 +7,8 @@
#include "ContactsListProxyModel.hpp"
#define USERNAME_WEIGHT 50.0
#define MAIN_SIP_ADDRESS_WEIGHT
30
.0
#define OTHER_SIP_ADDRESSES_WEIGHT 2
0
.0
#define MAIN_SIP_ADDRESS_WEIGHT
25
.0
#define OTHER_SIP_ADDRESSES_WEIGHT 2
5
.0
#define FACTOR_POS_1 0.90
#define FACTOR_POS_2 0.80
...
...
@@ -44,6 +44,7 @@ ContactsListProxyModel::ContactsListProxyModel (QObject *parent) : QSortFilterPr
for
(
const
ContactModel
*
contact
:
m_list
->
m_list
)
m_weights
[
contact
]
=
0
;
setDynamicSortFilter
(
false
);
sort
(
0
);
}
...
...
tests/src/components/contacts/ContactsListProxyModel.hpp
View file @
ceef883d
...
...
@@ -24,6 +24,12 @@ public:
return
m_list
;
}
public
slots
:
void
setFilter
(
const
QString
&
pattern
)
{
setFilterFixedString
(
pattern
);
sort
(
0
);
}
protected:
bool
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
;
bool
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
;
...
...
tests/ui/views/App/MainWindow/Contacts.qml
View file @
ceef883d
...
...
@@ -10,21 +10,6 @@ import App.Styles 1.0
// ===================================================================
ColumnLayout
{
function
_filter
(
text
)
{
Utils
.
assert
(
contacts
.
setFilterFixedString
!=
null
,
'
`contacts.setFilterFixedString` must be defined.
'
)
Utils
.
assert
(
contacts
.
invalidate
!=
null
,
'
`contacts.invalidate` must be defined.
'
)
contacts
.
setFilterFixedString
(
text
)
contacts
.
invalidate
()
}
function
_removeContact
(
contact
)
{
Utils
.
openConfirmDialog
(
window
,
{
descriptionText
:
qsTr
(
'
removeContactDescription
'
),
...
...
@@ -62,7 +47,7 @@ ColumnLayout {
icon
:
'
filter
'
placeholderText
:
qsTr
(
'
searchContactPlaceholder
'
)
onTextChanged
:
_f
ilter
(
text
)
onTextChanged
:
contacts
.
setF
ilter
(
text
)
}
ExclusiveButtons
{
...
...
@@ -71,7 +56,7 @@ ColumnLayout {
qsTr
(
'
selectConnectedContacts
'
)
]
onClicked
:
contacts
.
useConnectedFilter
=
(
button
===
1
)
onClicked
:
contacts
.
useConnectedFilter
=
!!
button
}
TextButtonB
{
...
...
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