fix wrong thread function call

hide recordings button while not implemented

display error message if cannot retrieve remote provisioning
This commit is contained in:
Gaelle Braud 2025-10-27 14:22:41 +01:00
parent c0a150f3e1
commit b3135ea177
6 changed files with 57 additions and 12 deletions

View file

@ -204,15 +204,15 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
});
mCallModelConnection->makeConnectToModel(
&CallModel::recordingChanged, [this](const std::shared_ptr<linphone::Call> &call, bool recording) {
mCallModelConnection->invokeToCore([this, recording]() {
auto recordFile = QString::fromStdString(mCallModel->getRecordFile());
mCallModelConnection->invokeToCore([this, recording, recordFile]() {
setRecording(recording);
if (recording == false) {
//: "Enregistrement terminé"
Utils::showInformationPopup(tr("call_record_end_message"),
//: "L'appel a été enregistré dans le fichier : %1"
tr("call_record_saved_in_file_message")
.arg(QString::fromStdString(mCallModel->getRecordFile())),
true, App::getInstance()->getCallsWindow());
tr("call_record_saved_in_file_message").arg(recordFile), true,
App::getInstance()->getCallsWindow());
}
});
});

View file

@ -773,13 +773,13 @@
<context>
<name>CallCore</name>
<message>
<location filename="../../core/call/CallCore.cpp" line="211"/>
<location filename="../../core/call/CallCore.cpp" line="212"/>
<source>call_record_end_message</source>
<extracomment>&quot;Enregistrement terminé&quot;</extracomment>
<translation>Aufnahme beendet</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="213"/>
<location filename="../../core/call/CallCore.cpp" line="214"/>
<source>call_record_saved_in_file_message</source>
<extracomment>&quot;L&apos;appel a é enregistré dans le fichier : %1&quot;</extracomment>
<translation>Die Aufnahme wurde in der folgenden Datei gespeichert: %1</translation>
@ -3445,6 +3445,20 @@ Error</extracomment>
<translation type="unfinished">Alle Nachrichten werden aus dem Chat entfernt. Möchten Sie fortfahren?</translation>
</message>
</context>
<context>
<name>CoreModel</name>
<message>
<location filename="../../model/core/CoreModel.cpp" line="220"/>
<source>info_popup_error_title</source>
<translation type="unfinished">Fehler</translation>
</message>
<message>
<location filename="../../model/core/CoreModel.cpp" line="222"/>
<source>fetching_config_failed_error_message</source>
<extracomment>&quot;Remote provisioning cannot be retrieved&quot;</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CreationFormLayout</name>
<message>

View file

@ -768,13 +768,13 @@
<context>
<name>CallCore</name>
<message>
<location filename="../../core/call/CallCore.cpp" line="211"/>
<location filename="../../core/call/CallCore.cpp" line="212"/>
<source>call_record_end_message</source>
<extracomment>&quot;Enregistrement terminé&quot;</extracomment>
<translation>Recording ended</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="213"/>
<location filename="../../core/call/CallCore.cpp" line="214"/>
<source>call_record_saved_in_file_message</source>
<extracomment>&quot;L&apos;appel a é enregistré dans le fichier : %1&quot;</extracomment>
<translation>Recording has been saved in file : %1</translation>
@ -3349,6 +3349,20 @@ Only your correspondent can decrypt them.</translation>
<translation>All the messages will be removed from the chat room. Do you want to continue ?</translation>
</message>
</context>
<context>
<name>CoreModel</name>
<message>
<location filename="../../model/core/CoreModel.cpp" line="220"/>
<source>info_popup_error_title</source>
<translation>Error</translation>
</message>
<message>
<location filename="../../model/core/CoreModel.cpp" line="222"/>
<source>fetching_config_failed_error_message</source>
<extracomment>&quot;Remote provisioning cannot be retrieved&quot;</extracomment>
<translation>Remote provisioning cannot be retrieved</translation>
</message>
</context>
<context>
<name>CreationFormLayout</name>
<message>

View file

@ -768,13 +768,13 @@
<context>
<name>CallCore</name>
<message>
<location filename="../../core/call/CallCore.cpp" line="211"/>
<location filename="../../core/call/CallCore.cpp" line="212"/>
<source>call_record_end_message</source>
<extracomment>&quot;Enregistrement terminé&quot;</extracomment>
<translation>Enregistrement terminé</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="213"/>
<location filename="../../core/call/CallCore.cpp" line="214"/>
<source>call_record_saved_in_file_message</source>
<extracomment>&quot;L&apos;appel a é enregistré dans le fichier : %1&quot;</extracomment>
<translation>L&apos;appel a é enregistré dans le fichier : %1</translation>
@ -3349,6 +3349,20 @@ en bout. Seul votre correspondant peut les déchiffrer.</translation>
<translation>Tous les messages seront supprimés. Souhaitez-vous continuer ?</translation>
</message>
</context>
<context>
<name>CoreModel</name>
<message>
<location filename="../../model/core/CoreModel.cpp" line="220"/>
<source>info_popup_error_title</source>
<translation>Erreur</translation>
</message>
<message>
<location filename="../../model/core/CoreModel.cpp" line="222"/>
<source>fetching_config_failed_error_message</source>
<extracomment>&quot;Remote provisioning cannot be retrieved&quot;</extracomment>
<translation>La configuration distante n&apos;a pas pu être récupérée</translation>
</message>
</context>
<context>
<name>CreationFormLayout</name>
<message>

View file

@ -216,7 +216,10 @@ QString CoreModel::getFetchConfig(QString filePath, bool *error) {
if (!filePath.isEmpty()) filePath = "file://" + filePath;
}
if (filePath.isEmpty()) {
qWarning() << "Remote provisionning cannot be retrieved. Command have been cleaned";
qWarning() << "Remote provisioning cannot be retrieved. Command have been cleaned";
Utils::showInformationPopup(tr("info_popup_error_title"),
//: "Remote provisioning cannot be retrieved"
tr("fetching_config_failed_error_message"), false);
*error = true;
}
}

View file

@ -494,7 +494,7 @@ Item {
IconLabelButton {
id: recordsButton
Layout.fillWidth: true
visible: !SettingsCpp.disableCallRecordings
visible: false// !SettingsCpp.disableCallRecordings
icon.width: Utils.getSizeWithScreenRatio(32)
icon.height: Utils.getSizeWithScreenRatio(32)
//: "Enregistrements"