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
31f57b7c
Commit
31f57b7c
authored
Nov 24, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): improve compilation performance
parent
b28d9f8e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
86 additions
and
31 deletions
+86
-31
App.cpp
tests/src/app/App.cpp
+3
-0
App.hpp
tests/src/app/App.hpp
+1
-1
ChatModel.cpp
tests/src/components/chat/ChatModel.cpp
+32
-1
ChatModel.hpp
tests/src/components/chat/ChatModel.hpp
+20
-15
ContactModel.cpp
tests/src/components/contacts/ContactModel.cpp
+14
-0
ContactModel.hpp
tests/src/components/contacts/ContactModel.hpp
+2
-11
ContactsListModel.cpp
tests/src/components/contacts/ContactsListModel.cpp
+1
-0
ContactsListModel.hpp
tests/src/components/contacts/ContactsListModel.hpp
+2
-1
ContactsListProxyModel.cpp
tests/src/components/contacts/ContactsListProxyModel.cpp
+4
-0
ContactsListProxyModel.hpp
tests/src/components/contacts/ContactsListProxyModel.hpp
+2
-1
Notifier.cpp
tests/src/components/notifier/Notifier.cpp
+1
-0
TimelineModel.cpp
tests/src/components/timeline/TimelineModel.cpp
+1
-0
TimelineModel.hpp
tests/src/components/timeline/TimelineModel.hpp
+3
-1
No files found.
tests/src/app/App.cpp
View file @
31f57b7c
...
@@ -5,8 +5,11 @@
...
@@ -5,8 +5,11 @@
#include <QtDebug>
#include <QtDebug>
#include "../components/chat/ChatModel.hpp"
#include "../components/chat/ChatModel.hpp"
#include "../components/contacts/ContactModel.hpp"
#include "../components/contacts/ContactsListModel.hpp"
#include "../components/contacts/ContactsListProxyModel.hpp"
#include "../components/contacts/ContactsListProxyModel.hpp"
#include "../components/core/CoreManager.hpp"
#include "../components/core/CoreManager.hpp"
#include "../components/notifier/Notifier.hpp"
#include "../components/settings/AccountSettingsModel.hpp"
#include "../components/settings/AccountSettingsModel.hpp"
#include "../components/timeline/TimelineModel.hpp"
#include "../components/timeline/TimelineModel.hpp"
...
...
tests/src/app/App.hpp
View file @
31f57b7c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include <QSystemTrayIcon>
#include <QSystemTrayIcon>
#include <QTranslator>
#include <QTranslator>
#include "../components/notifier/Notifier.hpp"
class
Notifier
;
// ===================================================================
// ===================================================================
...
...
tests/src/components/chat/ChatModel.cpp
View file @
31f57b7c
#include "../../utils.hpp"
#include "ChatModel.hpp"
#include "ChatModel.hpp"
// ===================================================================
// ===================================================================
ChatModel
::
ChatModel
(
QObject
*
parent
)
:
QObject
(
parent
)
{
QHash
<
int
,
QByteArray
>
ChatModel
::
roleNames
()
const
{
QHash
<
int
,
QByteArray
>
roles
;
roles
[
Qt
::
DisplayRole
]
=
"$chatEntry"
;
return
roles
;
}
QVariant
ChatModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
{
int
row
=
index
.
row
();
if
(
row
<
0
||
row
>=
m_entries
.
count
())
return
QVariant
();
if
(
role
==
Qt
::
DisplayRole
)
return
QVariant
::
fromValue
(
m_entries
[
row
]);
return
QVariant
();
}
// -------------------------------------------------------------------
QString
ChatModel
::
getSipAddress
()
const
{
if
(
!
m_chat_room
)
return
""
;
return
Utils
::
linphoneStringToQString
(
m_chat_room
->
getPeerAddress
()
->
asString
()
);
}
void
ChatModel
::
setSipAddress
(
const
QString
&
sip_address
)
{
emit
sipAddressChanged
(
sip_address
);
}
}
tests/src/components/chat/ChatModel.hpp
View file @
31f57b7c
#ifndef CHAT_MODEL_H_
#ifndef CHAT_MODEL_H_
#define CHAT_MODEL_H_
#define CHAT_MODEL_H_
#include <QObject>
#include <QAbstractListModel>
#include <linphone++/linphone.hh>
// ===================================================================
// ===================================================================
class
ChatModel
:
public
Q
Object
{
class
ChatModel
:
public
Q
AbstractListModel
{
Q_OBJECT
;
Q_OBJECT
;
Q_PROPERTY
(
Q_PROPERTY
(
QString
remoteS
ipAddress
QString
s
ipAddress
READ
get
Remote
SipAddress
READ
getSipAddress
WRITE
set
Remote
SipAddress
WRITE
setSipAddress
NOTIFY
remoteS
ipAddressChanged
NOTIFY
s
ipAddressChanged
);
);
public:
public:
ChatModel
(
QObject
*
parent
=
Q_NULLPTR
);
ChatModel
(
QObject
*
parent
=
Q_NULLPTR
)
:
QAbstractListModel
(
parent
)
{}
int
rowCount
(
const
QModelIndex
&
index
=
QModelIndex
())
const
{
return
m_entries
.
count
();
}
QHash
<
int
,
QByteArray
>
roleNames
()
const
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
signals:
signals:
void
remoteSipAddressChanged
(
QString
remote_sip_a
ddress
);
void
sipAddressChanged
(
const
QString
&
sipA
ddress
);
private:
private:
QString
getRemoteSipAddress
()
const
{
QString
getSipAddress
()
const
;
return
m_remote_sip_address
;
void
setSipAddress
(
const
QString
&
sip_address
);
}
void
setRemoteSipAddress
(
QString
&
remote_sip_address
)
{
m_remote_sip_address
=
remote_sip_address
;
}
QString
m_remote_sip_address
;
QList
<
QVariantMap
>
m_entries
;
std
::
shared_ptr
<
linphone
::
ChatRoom
>
m_chat_room
;
};
};
#endif // CHAT_MODEL_H_
#endif // CHAT_MODEL_H_
tests/src/components/contacts/ContactModel.cpp
View file @
31f57b7c
#include "../../utils.hpp"
#include "ContactModel.hpp"
#include "ContactModel.hpp"
// ===================================================================
// ===================================================================
...
@@ -9,3 +11,15 @@ Presence::PresenceStatus ContactModel::getPresenceStatus () const {
...
@@ -9,3 +11,15 @@ Presence::PresenceStatus ContactModel::getPresenceStatus () const {
Presence
::
PresenceLevel
ContactModel
::
getPresenceLevel
()
const
{
Presence
::
PresenceLevel
ContactModel
::
getPresenceLevel
()
const
{
return
Presence
::
getPresenceLevel
(
m_presence_status
);
return
Presence
::
getPresenceLevel
(
m_presence_status
);
}
}
QString
ContactModel
::
getUsername
()
const
{
return
Utils
::
linphoneStringToQString
(
m_linphone_friend
->
getName
()
);
}
QString
ContactModel
::
getSipAddress
()
const
{
return
Utils
::
linphoneStringToQString
(
m_linphone_friend
->
getAddress
()
->
asString
()
);
}
tests/src/components/contacts/ContactModel.hpp
View file @
31f57b7c
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include <QObject>
#include <QObject>
#include <linphone++/linphone.hh>
#include <linphone++/linphone.hh>
#include "../../utils.hpp"
#include "../presence/Presence.hpp"
#include "../presence/Presence.hpp"
// ===================================================================
// ===================================================================
...
@@ -54,11 +53,7 @@ signals:
...
@@ -54,11 +53,7 @@ signals:
void
contactUpdated
();
void
contactUpdated
();
private:
private:
QString
getUsername
()
const
{
QString
getUsername
()
const
;
return
Utils
::
linphoneStringToQString
(
m_linphone_friend
->
getName
()
);
}
QString
getAvatar
()
const
{
QString
getAvatar
()
const
{
return
""
;
return
""
;
...
@@ -67,11 +62,7 @@ private:
...
@@ -67,11 +62,7 @@ private:
Presence
::
PresenceStatus
getPresenceStatus
()
const
;
Presence
::
PresenceStatus
getPresenceStatus
()
const
;
Presence
::
PresenceLevel
getPresenceLevel
()
const
;
Presence
::
PresenceLevel
getPresenceLevel
()
const
;
QString
getSipAddress
()
const
{
QString
getSipAddress
()
const
;
return
Utils
::
linphoneStringToQString
(
m_linphone_friend
->
getAddress
()
->
asString
()
);
}
Presence
::
PresenceStatus
m_presence_status
=
Presence
::
Offline
;
Presence
::
PresenceStatus
m_presence_status
=
Presence
::
Offline
;
...
...
tests/src/components/contacts/ContactsListModel.cpp
View file @
31f57b7c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include "../../app/App.hpp"
#include "../../app/App.hpp"
#include "../core/CoreManager.hpp"
#include "../core/CoreManager.hpp"
#include "ContactModel.hpp"
#include "ContactsListProxyModel.hpp"
#include "ContactsListProxyModel.hpp"
#include "ContactsListModel.hpp"
#include "ContactsListModel.hpp"
...
...
tests/src/components/contacts/ContactsListModel.hpp
View file @
31f57b7c
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
#define CONTACTS_LIST_MODEL_H_
#define CONTACTS_LIST_MODEL_H_
#include <QAbstractListModel>
#include <QAbstractListModel>
#include <linphone++/linphone.hh>
#include "ContactModel.hpp"
class
ContactModel
;
// ===================================================================
// ===================================================================
...
...
tests/src/components/contacts/ContactsListProxyModel.cpp
View file @
31f57b7c
#include <QDebug>
#include <QDebug>
#include "../../utils.hpp"
#include "ContactModel.hpp"
#include "ContactsListModel.hpp"
#include "ContactsListProxyModel.hpp"
#include "ContactsListProxyModel.hpp"
#define USERNAME_WEIGHT 50.0
#define USERNAME_WEIGHT 50.0
...
...
tests/src/components/contacts/ContactsListProxyModel.hpp
View file @
31f57b7c
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
#include <QSortFilterProxyModel>
#include <QSortFilterProxyModel>
#include "ContactsListModel.hpp"
class
ContactModel
;
class
ContactsListModel
;
// ===================================================================
// ===================================================================
...
...
tests/src/components/notifier/Notifier.cpp
View file @
31f57b7c
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include <QtDebug>
#include <QtDebug>
#include "../../app/App.hpp"
#include "../../app/App.hpp"
#include "Notifier.hpp"
#include "Notifier.hpp"
// Notifications QML properties/methods.
// Notifications QML properties/methods.
...
...
tests/src/components/timeline/TimelineModel.cpp
View file @
31f57b7c
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <linphone++/linphone.hh>
#include <linphone++/linphone.hh>
#include "../../utils.hpp"
#include "../../utils.hpp"
#include "../contacts/ContactsListModel.hpp"
#include "../core/CoreManager.hpp"
#include "../core/CoreManager.hpp"
#include "TimelineModel.hpp"
#include "TimelineModel.hpp"
...
...
tests/src/components/timeline/TimelineModel.hpp
View file @
31f57b7c
#ifndef TIMELINE_MODEL_H_
#ifndef TIMELINE_MODEL_H_
#define TIMELINE_MODEL_H_
#define TIMELINE_MODEL_H_
#include "../contacts/ContactsListModel.hpp"
#include <QAbstractListModel>
class
ContactsListModel
;
// ===================================================================
// ===================================================================
...
...
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