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
28d64620
Commit
28d64620
authored
Aug 07, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(MessagesCountNotifier): avoid pure virtual call
parent
97c57547
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
CoreManager.cpp
src/components/core/CoreManager.cpp
+4
-1
AbstractMessagesCountNotifier.cpp
...messages-count-notifier/AbstractMessagesCountNotifier.cpp
+0
-4
AbstractMessagesCountNotifier.hpp
...messages-count-notifier/AbstractMessagesCountNotifier.hpp
+2
-1
No files found.
src/components/core/CoreManager.cpp
View file @
28d64620
...
...
@@ -62,7 +62,10 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) :
CoreHandlers
*
coreHandlers
=
mHandlers
.
get
();
QObject
::
connect
(
coreHandlers
,
&
CoreHandlers
::
coreStarted
,
this
,
[]
{
new
MessagesCountNotifier
(
mInstance
);
{
MessagesCountNotifier
*
messagesCountNotifier
=
new
MessagesCountNotifier
(
mInstance
);
messagesCountNotifier
->
updateUnreadMessagesCount
();
}
mInstance
->
mCallsListModel
=
new
CallsListModel
(
mInstance
);
mInstance
->
mContactsListModel
=
new
ContactsListModel
(
mInstance
);
...
...
src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.cpp
View file @
28d64620
...
...
@@ -38,14 +38,10 @@ AbstractMessagesCountNotifier::AbstractMessagesCountNotifier (QObject *parent) :
coreManager
->
getHandlers
().
get
(),
&
CoreHandlers
::
messageReceived
,
this
,
&
AbstractMessagesCountNotifier
::
handleMessageReceived
);
updateUnreadMessagesCount
();
}
// -----------------------------------------------------------------------------
void
AbstractMessagesCountNotifier
::
notifyUnreadMessagesCount
(
int
)
{}
void
AbstractMessagesCountNotifier
::
updateUnreadMessagesCount
()
{
mUnreadMessagesCount
=
0
;
for
(
const
auto
&
chatRoom
:
CoreManager
::
getInstance
()
->
getCore
()
->
getChatRooms
())
...
...
src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.hpp
View file @
28d64620
...
...
@@ -39,11 +39,12 @@ public:
AbstractMessagesCountNotifier
(
QObject
*
parent
=
Q_NULLPTR
);
virtual
~
AbstractMessagesCountNotifier
()
=
default
;
void
updateUnreadMessagesCount
();
protected:
virtual
void
notifyUnreadMessagesCount
(
int
n
)
=
0
;
private:
void
updateUnreadMessagesCount
();
void
internalNotifyUnreadMessagesCount
();
void
handleChatModelCreated
(
const
std
::
shared_ptr
<
ChatModel
>
&
chatModel
);
...
...
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