Fix forcing log_collection_upload_server_url

This commit is contained in:
Julien Wadel 2024-12-03 18:53:38 +01:00
parent 6f3cd83981
commit a3221e9d8e
4 changed files with 18 additions and 1 deletions

View file

@ -22,7 +22,6 @@ username_regex=^[a-z0-9+_.\-]*$
lime_update_threshold=86400
[misc]
log_collection_upload_server_url=https://www.linphone.org:444/lft.php
aggregate_imdn=1
enable_basic_to_client_group_chat_room_migration=0
enable_simple_group_chat_message_state=0

View file

@ -102,6 +102,8 @@ void CoreModel::start() {
videoPolicy->setAutomaticallyAccept(true);
videoPolicy->setAutomaticallyInitiate(false);
mCore->setVideoActivationPolicy(videoPolicy);
if (mCore->getLogCollectionUploadServerUrl().empty())
mCore->setLogCollectionUploadServerUrl(Constants::DefaultUploadLogsServer);
mIterateTimer->start();
}
// -----------------------------------------------------------------------------

View file

@ -457,6 +457,21 @@ QString SettingsModel::getLogsFolder(const shared_ptr<linphone::Config> &config)
: Paths::getLogsDirPath();
}
QString SettingsModel::getLogsUploadUrl() const {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
auto core = CoreModel::getInstance()->getCore();
return Utils::coreStringToAppString(core->getLogCollectionUploadServerUrl());
}
void SettingsModel::setLogsUploadUrl(const QString &serverUrl) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
if (serverUrl != getLogsUploadUrl()) {
auto core = CoreModel::getInstance()->getCore();
core->setLogCollectionUploadServerUrl(Utils::appStringToCoreString(serverUrl));
emit logsUploadUrlChanged();
}
}
void SettingsModel::cleanLogs() const {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
CoreModel::getInstance()->getCore()->resetLogCollection();

View file

@ -159,6 +159,7 @@ public:
DECLARE_GETSET(QString, downloadFolder, DownloadFolder)
signals:
void logsUploadUrlChanged();
// VFS. --------------------------------------------------------------------
void vfsEnabledChanged(bool enabled);