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
a8a6f5ce
Commit
a8a6f5ce
authored
Jun 15, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(App): deal correctly with single app, avoid usage of two binaries
parent
1a2e5e5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
App.cpp
src/app/App.cpp
+4
-9
CoreManager.cpp
src/components/core/CoreManager.cpp
+2
-5
main.cpp
src/main.cpp
+9
-0
No files found.
src/app/App.cpp
View file @
a8a6f5ce
...
...
@@ -29,8 +29,6 @@
#include <QtDebug>
#include <QTimer>
#include "gitversion.h"
#include "../components/Components.hpp"
#include "../utils/Utils.hpp"
...
...
@@ -57,10 +55,6 @@
#define SELF_TEST_DELAY 300000
#ifndef LINPHONE_QT_GIT_VERSION
#define LINPHONE_QT_GIT_VERSION "unknown"
#endif // ifndef LINPHONE_QT_GIT_VERSION
using
namespace
std
;
// =============================================================================
...
...
@@ -69,8 +63,7 @@ inline bool installLocale (App &app, QTranslator &translator, const QLocale &loc
return
translator
.
load
(
locale
,
LANGUAGES_PATH
)
&&
app
.
installTranslator
(
&
translator
);
}
App
::
App
(
int
&
argc
,
char
*
argv
[])
:
SingleApplication
(
argc
,
argv
,
true
)
{
setApplicationVersion
(
LINPHONE_QT_GIT_VERSION
);
App
::
App
(
int
&
argc
,
char
*
argv
[])
:
SingleApplication
(
argc
,
argv
,
true
,
Mode
::
User
|
Mode
::
ExcludeAppPath
|
Mode
::
ExcludeAppVersion
)
{
setWindowIcon
(
QIcon
(
WINDOW_ICON_PATH
));
createParser
();
...
...
@@ -264,7 +257,9 @@ void App::smartShowWindow (QQuickWindow *window) {
}
void
App
::
checkForUpdate
()
{
CoreManager
::
getInstance
()
->
getCore
()
->
checkForUpdate
(
LINPHONE_QT_GIT_VERSION
);
CoreManager
::
getInstance
()
->
getCore
()
->
checkForUpdate
(
::
Utils
::
appStringToCoreString
(
applicationVersion
())
);
}
// -----------------------------------------------------------------------------
...
...
src/components/core/CoreManager.cpp
View file @
a8a6f5ce
...
...
@@ -20,6 +20,7 @@
* Author: Ronan Abhamon
*/
#include <QCoreApplication>
#include <QDir>
#include <QtConcurrent>
#include <QTimer>
...
...
@@ -29,10 +30,6 @@
#include "CoreManager.hpp"
#ifndef LINPHONE_QT_GIT_VERSION
#define LINPHONE_QT_GIT_VERSION "unknown"
#endif // ifndef LINPHONE_QT_GIT_VERSION
#define CBS_CALL_INTERVAL 20
#define DOWNLOAD_URL "https://www.linphone.org/technical-corner/linphone/downloads"
...
...
@@ -154,7 +151,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) {
mCore
->
setVideoDisplayFilter
(
"MSOGL"
);
mCore
->
usePreviewWindow
(
true
);
mCore
->
setUserAgent
(
"Linphone Desktop"
,
LINPHONE_QT_GIT_VERSION
);
mCore
->
setUserAgent
(
"Linphone Desktop"
,
::
Utils
::
appStringToCoreString
(
QCoreApplication
::
applicationVersion
())
);
// Force capture/display.
// Useful if the app was built without video support.
...
...
src/main.cpp
View file @
a8a6f5ce
...
...
@@ -24,8 +24,14 @@
#include <QFontDatabase>
#include <QScreen>
#include "gitversion.h"
#include "app/App.hpp"
// Must be unique. Used by `SingleApplication`.
#define APPLICATION_NAME "Linphone Desktop"
#define APPLICATION_VERSION LINPHONE_QT_GIT_VERSION
#define DEFAULT_FONT "Noto Sans"
using
namespace
std
;
...
...
@@ -69,6 +75,9 @@ int main (int argc, char *argv[]) {
// App creation.
// ---------------------------------------------------------------------------
QCoreApplication
::
setApplicationName
(
APPLICATION_NAME
);
QCoreApplication
::
setApplicationVersion
(
APPLICATION_VERSION
);
App
app
(
argc
,
argv
);
if
(
app
.
isSecondary
())
{
...
...
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