From 38ca7d519881f0096793a51643c2f352b814005e Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 10 Apr 2017 14:38:20 +0200 Subject: [PATCH] fix(app): coding style --- linphone-desktop/src/app/paths/Paths.cpp | 10 +++++----- linphone-desktop/src/app/paths/Paths.hpp | 2 +- linphone-desktop/src/components/core/CoreManager.cpp | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/linphone-desktop/src/app/paths/Paths.cpp b/linphone-desktop/src/app/paths/Paths.cpp index 8893d1532..f0f964795 100644 --- a/linphone-desktop/src/app/paths/Paths.cpp +++ b/linphone-desktop/src/app/paths/Paths.cpp @@ -42,8 +42,8 @@ #define PATH_FACTORY_CONFIG "/linphonerc-factory" #define PATH_FRIENDS_LIST "/friends.db" #define PATH_MESSAGE_HISTORY_LIST "/message-history.db" -#define PATH_ZRTP_SECRETS "/zidcache" #define PATH_ZRTP_DATA "/zrtp-lime.db" +#define PATH_ZRTP_SECRETS "/zidcache" using namespace std; @@ -196,14 +196,14 @@ string Paths::getCapturesDirpath () { return getWritableDirectoryPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_CAPTURES); } -string Paths::getZrtpSecretsFilepath () { - return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + PATH_ZRTP_SECRETS); -} - string Paths::getZrtpDataFilepath () { return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_ZRTP_DATA); } +string Paths::getZrtpSecretsFilepath () { + return getWritableFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + PATH_ZRTP_SECRETS); +} + string Paths::getUserCertificatesDirpath () { return getWritableDirectoryPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_USER_CERTIFICATES); } diff --git a/linphone-desktop/src/app/paths/Paths.hpp b/linphone-desktop/src/app/paths/Paths.hpp index 6ae13ef2b..d6df9f495 100644 --- a/linphone-desktop/src/app/paths/Paths.hpp +++ b/linphone-desktop/src/app/paths/Paths.hpp @@ -44,8 +44,8 @@ namespace Paths { std::string getFactoryConfigFilepath (); std::string getFriendsListFilepath (); std::string getMessageHistoryFilepath (); - std::string getZrtpSecretsFilepath (); std::string getZrtpDataFilepath (); + std::string getZrtpSecretsFilepath (); void migrate (); } diff --git a/linphone-desktop/src/components/core/CoreManager.cpp b/linphone-desktop/src/components/core/CoreManager.cpp index 01853afce..ac7b40634 100644 --- a/linphone-desktop/src/components/core/CoreManager.cpp +++ b/linphone-desktop/src/components/core/CoreManager.cpp @@ -92,8 +92,11 @@ void CoreManager::setDatabasesPaths () { void CoreManager::setOtherPaths () { m_core->setZrtpSecretsFile(Paths::getZrtpSecretsFilepath()); - /* this one is actually a database but it MUST be set after the zrtp secrets as it allows automatic migration from old version(secrets, xml) to new version (data, sqlite)*/ + + // This one is actually a database but it MUST be set after the zrtp secrets + // as it allows automatic migration from old version(secrets, xml) to new version (data, sqlite). m_core->setZrtpCacheDatabasePath(Paths::getZrtpDataFilepath()); + m_core->setUserCertificatesPath(Paths::getUserCertificatesDirpath()); }