mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 01:09:19 +00:00
feat(SettingsAdvanced): send logs in progress
This commit is contained in:
parent
3a0dbaf967
commit
d84149ef2c
10 changed files with 68 additions and 9 deletions
|
|
@ -977,6 +977,14 @@ your friend's SIP address or username.</translation>
|
|||
<source>logsFolderLabel</source>
|
||||
<translation>Logs folder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>sendLogs</source>
|
||||
<translation>SEND LOGS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>logsUploadUrlLabel</source>
|
||||
<translation>Logs upload server url</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsAudio</name>
|
||||
|
|
|
|||
|
|
@ -975,6 +975,14 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<source>logsFolderLabel</source>
|
||||
<translation>Dossier des logs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>sendLogs</source>
|
||||
<translation>ENVOYER LOGS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>logsUploadUrlLabel</source>
|
||||
<translation>Url du serveur de logs</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsAudio</name>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[misc]
|
||||
version_check_url_root=https://linphone.org/releases
|
||||
log_collection_upload_server_url=https://www.linphone.org:444/lft.php
|
||||
|
||||
[sound]
|
||||
ec_filter=MSWebRTCAEC
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#define QT_DOMAIN "qt"
|
||||
|
||||
#define MAX_LOGS_COLLECTION_SIZE 104857600 /* 100MB. */
|
||||
#define MAX_LOGS_COLLECTION_SIZE 10485760 /* 10MB. */
|
||||
|
||||
#define SRC_PATTERN "/linphone-desktop/src/"
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ void CoreManager::forceRefreshRegisters () {
|
|||
|
||||
void CoreManager::sendLogs () const {
|
||||
Q_CHECK_PTR(mCore);
|
||||
// TODO.
|
||||
|
||||
qInfo() << QStringLiteral("Send logs to: `%1`.")
|
||||
.arg(::Utils::coreStringToAppString(mCore->getLogCollectionUploadServerUrl()));
|
||||
mCore->uploadLogCollection();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -730,6 +730,22 @@ void SettingsModel::setLogsFolder (const QString &folder) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString SettingsModel::getLogsUploadUrl () const {
|
||||
return ::Utils::coreStringToAppString(
|
||||
CoreManager::getInstance()->getCore()->getLogCollectionUploadServerUrl()
|
||||
);
|
||||
}
|
||||
|
||||
void SettingsModel::setLogsUploadUrl (const QString &url) {
|
||||
CoreManager::getInstance()->getCore()->setLogCollectionUploadServerUrl(
|
||||
::Utils::appStringToCoreString(url)
|
||||
);
|
||||
|
||||
emit logsUploadUrlChanged(getLogsUploadUrl());
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString SettingsModel::getLogsFolder (const shared_ptr<linphone::Config> &config) {
|
||||
return ::Utils::coreStringToAppString(
|
||||
config->getString(UI_SECTION, "logs_folder", Paths::getLogsDirPath())
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ class SettingsModel : public QObject {
|
|||
// Advanced. -----------------------------------------------------------------
|
||||
|
||||
Q_PROPERTY(QString logsFolder READ getLogsFolder WRITE setLogsFolder NOTIFY logsFolderChanged);
|
||||
Q_PROPERTY(QString logsUploadUrl READ getLogsUploadUrl WRITE setLogsUploadUrl NOTIFY logsUploadUrlChanged);
|
||||
|
||||
public:
|
||||
enum MediaEncryption {
|
||||
|
|
@ -287,6 +288,9 @@ public:
|
|||
QString getLogsFolder () const;
|
||||
void setLogsFolder (const QString &folder);
|
||||
|
||||
QString getLogsUploadUrl () const;
|
||||
void setLogsUploadUrl (const QString &url);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static QString getLogsFolder (const std::shared_ptr<linphone::Config> &config);
|
||||
|
|
@ -371,6 +375,7 @@ signals:
|
|||
// Advanced. -----------------------------------------------------------------
|
||||
|
||||
void logsFolderChanged (const QString &folder);
|
||||
void logsUploadUrlChanged (const QString &url);
|
||||
|
||||
private:
|
||||
std::shared_ptr<linphone::Config> mConfig;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ ApplicationWindow {
|
|||
|
||||
minimumHeight: MainWindowStyle.minimumHeight
|
||||
minimumWidth: MainWindowStyle.minimumWidth
|
||||
width: MainWindowStyle.width
|
||||
|
||||
title: MainWindowStyle.title
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,33 @@ TabContainer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormLine {
|
||||
FormGroup {
|
||||
label: qsTr('logsUploadUrlLabel')
|
||||
|
||||
TextField {
|
||||
text: SettingsModel.logsUploadUrl
|
||||
|
||||
onEditingFinished: SettingsModel.logsUploadUrl = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormEmptyLine {}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Internal features.
|
||||
// -------------------------------------------------------------------------
|
||||
TextButtonB {
|
||||
anchors.right: parent.right
|
||||
text: qsTr('sendLogs')
|
||||
|
||||
// Nothing for the moment.
|
||||
onClicked: CoreManager.sendLogs()
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Internal settings.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// Nothing for the moment.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import App.Styles 1.0
|
|||
ApplicationWindow {
|
||||
id: window
|
||||
|
||||
height: SettingsWindowStyle.height
|
||||
width: SettingsWindowStyle.width
|
||||
|
||||
minimumHeight: SettingsWindowStyle.height
|
||||
minimumWidth: SettingsWindowStyle.width
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue