Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
98dc54e3
Commit
98dc54e3
authored
13 years ago
by
Emmanuel Lepage
Browse files
Options
Downloads
Patches
Plain Diff
[ #10222 ] Fix contact sorting
parent
71e593f8
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/CallModel.h
+9
-9
9 additions, 9 deletions
src/CallModel.h
src/CallModel.hpp
+4
-3
4 additions, 3 deletions
src/CallModel.hpp
src/Contact.cpp
+23
-0
23 additions, 0 deletions
src/Contact.cpp
src/Contact.h
+15
-9
15 additions, 9 deletions
src/Contact.h
with
51 additions
and
21 deletions
src/CallModel.h
+
9
−
9
View file @
98dc54e3
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include
<QObject>
#include
<QObject>
#include
<QVector>
#include
<QVector>
#include
<Q
Hash
>
#include
<Q
Map
>
#include
"typedefs.h"
#include
"typedefs.h"
//Qt
//Qt
...
@@ -37,7 +37,7 @@ class AccountList;
...
@@ -37,7 +37,7 @@ class AccountList;
class
Account
;
class
Account
;
class
ContactBackend
;
class
ContactBackend
;
typedef
Q
Hash
<
QString
,
Call
*>
Call
Hash
;
typedef
Q
Map
<
QString
,
Call
*>
Call
Map
;
typedef
QList
<
Call
*>
CallList
;
typedef
QList
<
Call
*>
CallList
;
///@class CallModelBase Base class for the central model/frontend
///@class CallModelBase Base class for the central model/frontend
...
@@ -126,11 +126,11 @@ class LIB_EXPORT CallModel : public CallModelBase {
...
@@ -126,11 +126,11 @@ class LIB_EXPORT CallModel : public CallModelBase {
void
removeConference
(
Call
*
call
);
void
removeConference
(
Call
*
call
);
//Getters
//Getters
int
size
();
int
size
();
CallList
getCallList
();
CallList
getCallList
();
static
const
Call
Hash
&
getHistory
();
static
const
Call
Map
&
getHistory
();
static
const
QStringList
getNumbersByPopularity
();
static
const
QStringList
getNumbersByPopularity
();
static
const
QStringList
getHistoryCallId
();
static
const
QStringList
getHistoryCallId
();
//Account related
//Account related
static
Account
*
getCurrentAccount
(
);
static
Account
*
getCurrentAccount
(
);
...
@@ -191,8 +191,8 @@ class LIB_EXPORT CallModel : public CallModelBase {
...
@@ -191,8 +191,8 @@ class LIB_EXPORT CallModel : public CallModelBase {
typedef
QHash
<
Index
,
InternalStruct
*
>
InternalIndex
;
typedef
QHash
<
Index
,
InternalStruct
*
>
InternalIndex
;
//Static attributes
//Static attributes
static
Call
Hash
m_sActiveCalls
;
static
Call
Map
m_sActiveCalls
;
static
Call
Hash
m_sHistoryCalls
;
static
Call
Map
m_sHistoryCalls
;
static
InternalCall
m_sPrivateCallList_call
;
static
InternalCall
m_sPrivateCallList_call
;
static
InternalCallId
m_sPrivateCallList_callId
;
static
InternalCallId
m_sPrivateCallList_callId
;
...
...
This diff is collapsed.
Click to expand it.
src/CallModel.hpp
+
4
−
3
View file @
98dc54e3
...
@@ -45,8 +45,8 @@ template <typename CallWidget, typename Index> bool CallModel<CallWidget,Index>
...
@@ -45,8 +45,8 @@ template <typename CallWidget, typename Index> bool CallModel<CallWidget,Index>
template
<
typename
CallWidget
,
typename
Index
>
bool
CallModel
<
CallWidget
,
Index
>::
m_sCallInit
=
false
;
template
<
typename
CallWidget
,
typename
Index
>
bool
CallModel
<
CallWidget
,
Index
>::
m_sCallInit
=
false
;
template
<
typename
CallWidget
,
typename
Index
>
bool
CallModel
<
CallWidget
,
Index
>::
m_sHistoryInit
=
false
;
template
<
typename
CallWidget
,
typename
Index
>
bool
CallModel
<
CallWidget
,
Index
>::
m_sHistoryInit
=
false
;
template
<
typename
CallWidget
,
typename
Index
>
QHash
<
QString
,
Call
*>
CallModel
<
CallWidget
,
Index
>::
m_sActiveCalls
;
template
<
typename
CallWidget
,
typename
Index
>
Call
Map
CallModel
<
CallWidget
,
Index
>::
m_sActiveCalls
;
template
<
typename
CallWidget
,
typename
Index
>
QHash
<
QString
,
Call
*>
CallModel
<
CallWidget
,
Index
>::
m_sHistoryCalls
;
template
<
typename
CallWidget
,
typename
Index
>
Call
Map
CallModel
<
CallWidget
,
Index
>::
m_sHistoryCalls
;
template
<
typename
CallWidget
,
typename
Index
>
typename
CallModel
<
CallWidget
,
Index
>::
InternalCall
CallModel
<
CallWidget
,
Index
>::
m_sPrivateCallList_call
;
template
<
typename
CallWidget
,
typename
Index
>
typename
CallModel
<
CallWidget
,
Index
>::
InternalCall
CallModel
<
CallWidget
,
Index
>::
m_sPrivateCallList_call
;
template
<
typename
CallWidget
,
typename
Index
>
typename
CallModel
<
CallWidget
,
Index
>::
InternalCallId
CallModel
<
CallWidget
,
Index
>::
m_sPrivateCallList_callId
;
template
<
typename
CallWidget
,
typename
Index
>
typename
CallModel
<
CallWidget
,
Index
>::
InternalCallId
CallModel
<
CallWidget
,
Index
>::
m_sPrivateCallList_callId
;
...
@@ -434,7 +434,7 @@ template<typename CallWidget, typename Index> const QStringList CallModel<CallWi
...
@@ -434,7 +434,7 @@ template<typename CallWidget, typename Index> const QStringList CallModel<CallWi
}
}
///Return the history list
///Return the history list
template
<
typename
CallWidget
,
typename
Index
>
const
Call
Hash
&
CallModel
<
CallWidget
,
Index
>::
getHistory
()
template
<
typename
CallWidget
,
typename
Index
>
const
Call
Map
&
CallModel
<
CallWidget
,
Index
>::
getHistory
()
{
{
qDebug
()
<<
"Getting history"
<<
m_sHistoryCalls
.
count
();
qDebug
()
<<
"Getting history"
<<
m_sHistoryCalls
.
count
();
return
m_sHistoryCalls
;
return
m_sHistoryCalls
;
...
@@ -474,6 +474,7 @@ template<typename CallWidget, typename Index> const QStringList CallModel<CallWi
...
@@ -474,6 +474,7 @@ template<typename CallWidget, typename Index> const QStringList CallModel<CallWi
return
cl
;
return
cl
;
}
}
/*****************************************************************************
/*****************************************************************************
* *
* *
* Account related code *
* Account related code *
...
...
This diff is collapsed.
Click to expand it.
src/Contact.cpp
+
23
−
0
View file @
98dc54e3
...
@@ -106,6 +106,17 @@ const QString& Contact::getUid() const
...
@@ -106,6 +106,17 @@ const QString& Contact::getUid() const
return
m_Uid
;
return
m_Uid
;
}
}
///Get the group
const
QString
&
Contact
::
getGroup
()
const
{
return
m_Group
;
}
const
QString
&
Contact
::
getDepartment
()
const
{
return
m_Department
;
}
///Get the contact type
///Get the contact type
const
QString
&
Contact
::
getType
()
const
const
QString
&
Contact
::
getType
()
const
{
{
...
@@ -164,4 +175,16 @@ void Contact::setPreferredEmail(const QString& name)
...
@@ -164,4 +175,16 @@ void Contact::setPreferredEmail(const QString& name)
void
Contact
::
setUid
(
const
QString
&
id
)
void
Contact
::
setUid
(
const
QString
&
id
)
{
{
m_Uid
=
id
;
m_Uid
=
id
;
}
///Set Group
void
Contact
::
setGroup
(
const
QString
&
name
)
{
m_Group
=
name
;
}
///Set department
void
Contact
::
setDepartment
(
const
QString
&
name
)
{
m_Department
=
name
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/Contact.h
+
15
−
9
View file @
98dc54e3
...
@@ -69,6 +69,8 @@ private:
...
@@ -69,6 +69,8 @@ private:
QString
m_PreferredEmail
;
QString
m_PreferredEmail
;
QString
m_Organization
;
QString
m_Organization
;
QString
m_Uid
;
QString
m_Uid
;
QString
m_Group
;
QString
m_Department
;
bool
m_DisplayPhoto
;
bool
m_DisplayPhoto
;
PhoneNumbers
m_Numbers
;
PhoneNumbers
m_Numbers
;
...
@@ -89,17 +91,21 @@ public:
...
@@ -89,17 +91,21 @@ public:
virtual
const
QString
&
getPreferredEmail
()
const
;
virtual
const
QString
&
getPreferredEmail
()
const
;
virtual
const
QPixmap
*
getPhoto
()
const
;
virtual
const
QPixmap
*
getPhoto
()
const
;
virtual
const
QString
&
getType
()
const
;
virtual
const
QString
&
getType
()
const
;
virtual
const
QString
&
getGroup
()
const
;
virtual
const
QString
&
getDepartment
()
const
;
//Setters
//Setters
virtual
void
setPhoneNumbers
(
PhoneNumbers
);
virtual
void
setPhoneNumbers
(
PhoneNumbers
);
virtual
void
setFormattedName
(
const
QString
&
name
);
virtual
void
setFormattedName
(
const
QString
&
name
);
virtual
void
setNickName
(
const
QString
&
name
);
virtual
void
setNickName
(
const
QString
&
name
);
virtual
void
setFirstName
(
const
QString
&
name
);
virtual
void
setFirstName
(
const
QString
&
name
);
virtual
void
setFamilyName
(
const
QString
&
name
);
virtual
void
setFamilyName
(
const
QString
&
name
);
virtual
void
setOrganization
(
const
QString
&
name
);
virtual
void
setOrganization
(
const
QString
&
name
);
virtual
void
setPreferredEmail
(
const
QString
&
name
);
virtual
void
setPreferredEmail
(
const
QString
&
name
);
virtual
void
setUid
(
const
QString
&
id
);
virtual
void
setGroup
(
const
QString
&
name
);
virtual
void
setPhoto
(
QPixmap
*
photo
);
virtual
void
setDepartment
(
const
QString
&
name
);
virtual
void
setUid
(
const
QString
&
id
);
virtual
void
setPhoto
(
QPixmap
*
photo
);
protected
:
protected
:
virtual
void
initItemWidget
();
virtual
void
initItemWidget
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment