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
2069e990
Commit
2069e990
authored
Mar 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Main/MainWindow): add a hidden button to refresh registers
parent
dd09e6d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+10
-0
CoreManager.hpp
linphone-desktop/src/components/core/CoreManager.hpp
+2
-0
MainWindow.qml
linphone-desktop/ui/views/App/Main/MainWindow.qml
+22
-0
No files found.
linphone-desktop/src/components/core/CoreManager.cpp
View file @
2069e990
...
...
@@ -26,6 +26,7 @@
#include "CoreManager.hpp"
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QTimer>
...
...
@@ -77,10 +78,19 @@ void CoreManager::init (QObject *parent, const QString &config_path) {
);
}
// -----------------------------------------------------------------------------
VcardModel
*
CoreManager
::
createDetachedVcardModel
()
{
return
new
VcardModel
(
linphone
::
Factory
::
get
()
->
createVcard
());
}
void
CoreManager
::
forceRefreshRegisters
()
{
qInfo
()
<<
QStringLiteral
(
"Refresh registers."
);
m_instance
->
m_core
->
refreshRegisters
();
}
// -----------------------------------------------------------------------------
void
CoreManager
::
setDatabasesPaths
()
{
m_core
->
setFriendsDatabasePath
(
Paths
::
getFriendsListFilepath
());
m_core
->
setCallLogsDatabasePath
(
Paths
::
getCallHistoryFilepath
());
...
...
linphone-desktop/src/components/core/CoreManager.hpp
View file @
2069e990
...
...
@@ -100,6 +100,8 @@ public:
// Warning: The ownership of `VcardModel` is `QQmlEngine::JavaScriptOwnership` by default.
Q_INVOKABLE
VcardModel
*
createDetachedVcardModel
();
Q_INVOKABLE
void
forceRefreshRegisters
();
private:
CoreManager
(
QObject
*
parent
,
const
QString
&
config_path
);
...
...
linphone-desktop/ui/views/App/Main/MainWindow.qml
View file @
2069e990
...
...
@@ -272,4 +272,26 @@ Controls1.ApplicationWindow {
}
}
}
// ---------------------------------------------------------------------------
// Hiden button to force registration.
// ---------------------------------------------------------------------------
Button
{
anchors
{
top
:
parent
.
top
left
:
parent
.
left
}
background
:
Rectangle
{
color
:
'
transparent
'
// Not a style.
}
flat
:
true
height
:
accountStatus
.
height
width
:
MainWindowStyle
.
toolBar
.
leftMargin
onClicked
:
CoreManager
.
forceRefreshRegisters
()
}
}
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