feat(src/components/core/CoreManager): log database paths

This commit is contained in:
Ronan Abhamon 2017-06-15 10:26:01 +02:00
parent a17c4ad1ef
commit 5695e8ac6d

View file

@ -100,12 +100,24 @@ void CoreManager::forceRefreshRegisters () {
// -----------------------------------------------------------------------------
#define SET_DATABASE_PATH(DATABASE, PATH) \
do { \
qInfo() << QStringLiteral("Set `%1` path: `%2`") \
.arg( # DATABASE) \
.arg(::Utils::coreStringToAppString(PATH)); \
mCore->set ## DATABASE ## DatabasePath(PATH); \
} while (0);
void CoreManager::setDatabasesPaths () {
mCore->setFriendsDatabasePath(Paths::getFriendsListFilePath());
mCore->setCallLogsDatabasePath(Paths::getCallHistoryFilePath());
mCore->setChatDatabasePath(Paths::getMessageHistoryFilePath());
SET_DATABASE_PATH(Friends, Paths::getFriendsListFilePath());
SET_DATABASE_PATH(CallLogs, Paths::getCallHistoryFilePath());
SET_DATABASE_PATH(Chat, Paths::getMessageHistoryFilePath());
}
#undef SET_DATABASE_PATH
// -----------------------------------------------------------------------------
void CoreManager::setOtherPaths () {
if (mCore->getZrtpSecretsFile().empty() || !Paths::filePathExists(mCore->getZrtpSecretsFile())) {
mCore->setZrtpSecretsFile(Paths::getZrtpSecretsFilePath());