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
ae7f10ca
Commit
ae7f10ca
authored
May 10, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/app/App): display app only when core is started (so after creation)
parent
a1066c36
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
10 deletions
+21
-10
App.cpp
linphone-desktop/src/app/App.cpp
+3
-4
CoreHandlers.cpp
linphone-desktop/src/components/core/CoreHandlers.cpp
+9
-0
CoreHandlers.hpp
linphone-desktop/src/components/core/CoreHandlers.hpp
+7
-0
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+2
-4
CoreManager.hpp
linphone-desktop/src/components/core/CoreManager.hpp
+0
-2
No files found.
linphone-desktop/src/app/App.cpp
View file @
ae7f10ca
...
...
@@ -114,7 +114,7 @@ inline QQuickWindow *createSubWindow (App *app, const char *path) {
inline
void
activeSplashScreen
(
App
*
app
)
{
QQuickWindow
*
splashScreen
=
createSubWindow
(
app
,
QML_VIEW_SPLASH_SCREEN
);
QObject
::
connect
(
CoreManager
::
getInstance
()
,
&
CoreManager
::
linphoneCoreCrea
ted
,
splashScreen
,
[
splashScreen
]
{
QObject
::
connect
(
CoreManager
::
getInstance
()
->
getHandlers
().
get
(),
&
CoreHandlers
::
coreStar
ted
,
splashScreen
,
[
splashScreen
]
{
splashScreen
->
close
();
splashScreen
->
deleteLater
();
});
...
...
@@ -179,8 +179,8 @@ void App::initContentApp () {
activeSplashScreen
(
this
);
QObject
::
connect
(
CoreManager
::
getInstance
(),
&
Core
Manager
::
linphoneCoreCrea
ted
,
CoreManager
::
getInstance
()
->
getHandlers
().
get
()
,
&
Core
Handlers
::
coreStar
ted
,
this
,
mParser
.
isSet
(
"selftest"
)
?
&
App
::
quit
:
&
App
::
openAppAfterInit
);
}
...
...
@@ -441,7 +441,6 @@ void App::openAppAfterInit () {
tryToUsePreferredLocale
();
qInfo
()
<<
QStringLiteral
(
"Linphone core created."
);
CoreManager
::
getInstance
()
->
enableHandlers
();
#ifndef __APPLE__
// Enable TrayIconSystem.
...
...
linphone-desktop/src/components/core/CoreHandlers.cpp
View file @
ae7f10ca
...
...
@@ -52,6 +52,15 @@ void CoreHandlers::onCallStateChanged (
App
::
getInstance
()
->
getNotifier
()
->
notifyReceivedCall
(
call
);
}
void
CoreHandlers
::
onGlobalStateChanged
(
const
shared_ptr
<
linphone
::
Core
>
&
,
linphone
::
GlobalState
gstate
,
const
string
&
)
{
if
(
gstate
==
linphone
::
GlobalStateOn
)
emit
coreStarted
();
}
void
CoreHandlers
::
onCallStatsUpdated
(
const
shared_ptr
<
linphone
::
Core
>
&
,
const
shared_ptr
<
linphone
::
Call
>
&
call
,
...
...
linphone-desktop/src/components/core/CoreHandlers.hpp
View file @
ae7f10ca
...
...
@@ -36,6 +36,7 @@ class CoreHandlers :
signals:
void
authenticationRequested
(
const
std
::
shared_ptr
<
linphone
::
AuthInfo
>
&
authInfo
);
void
callStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
void
coreStarted
();
void
messageReceived
(
const
std
::
shared_ptr
<
linphone
::
ChatMessage
>
&
message
);
void
presenceReceived
(
const
QString
&
sipAddress
,
const
std
::
shared_ptr
<
const
linphone
::
PresenceModel
>
&
presenceModel
);
void
registrationStateChanged
(
const
std
::
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxyConfig
,
linphone
::
RegistrationState
state
);
...
...
@@ -54,6 +55,12 @@ private:
const
std
::
string
&
message
)
override
;
void
onGlobalStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Core
>
&
core
,
linphone
::
GlobalState
gstate
,
const
std
::
string
&
message
)
override
;
void
onCallStatsUpdated
(
const
std
::
shared_ptr
<
linphone
::
Core
>
&
core
,
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
...
...
linphone-desktop/src/components/core/CoreManager.cpp
View file @
ae7f10ca
...
...
@@ -48,6 +48,8 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(
mInstance
->
mSettingsModel
=
new
SettingsModel
(
mInstance
);
mInstance
->
mAccountSettingsModel
=
new
AccountSettingsModel
(
mInstance
);
mInstance
->
mCbsTimer
->
start
();
emit
mInstance
->
linphoneCoreCreated
();
}
);
...
...
@@ -55,10 +57,6 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(
mPromiseWatcher
.
setFuture
(
mPromiseBuild
);
}
void
CoreManager
::
enableHandlers
()
{
mCbsTimer
->
start
();
}
// -----------------------------------------------------------------------------
void
CoreManager
::
init
(
QObject
*
parent
,
const
QString
&
configPath
)
{
...
...
linphone-desktop/src/components/core/CoreManager.hpp
View file @
ae7f10ca
...
...
@@ -47,8 +47,6 @@ class CoreManager : public QObject {
public:
~
CoreManager
()
=
default
;
void
enableHandlers
();
std
::
shared_ptr
<
linphone
::
Core
>
getCore
()
{
return
mCore
;
}
...
...
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