1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-04-21 21:52:03 +02:00
→
base 64 → Base64
cancelled → canceled
{cannot, can't, couldn't} → unable to
inexistent → nonexistent
informations → information
not possible → impossible
retrieven → retrieved
SIP
try → attempt
URI
WebEngine
wish → want

Can this replace https://review.jami.net/c/jami-client-qt/+/27607 ?

Change-Id: I21e1615a0c6e2979f02f913093c503c03ab32c82
This commit is contained in:
ovari123 2024-12-01 20:03:37 -04:00 committed by Adrien Béraud
parent 6fdcfc6317
commit 53a3d32114
26 changed files with 181 additions and 184 deletions

View file

@ -233,7 +233,7 @@ list(APPEND CLIENT_INCLUDE_DIRS ${VERSION_INFO_DIR})
# QML and related code files # QML and related code files
# Check files in the app's src directory and force a reconfigure if it # Check files in the app's src directory and force a reconfigure if it
# changes. # changes.
# Only include webengine resources if specified. # Only include WebEngine resources if specified.
if(WITH_WEBENGINE) if(WITH_WEBENGINE)
set(GEN_QRC_ARGS "--with-webengine") set(GEN_QRC_ARGS "--with-webengine")
endif() endif()

View file

@ -299,7 +299,7 @@ def run_dependencies(args):
print("The win32 version does not install dependencies with this script.\nPlease continue with the --install instruction.") print("The win32 version does not install dependencies with this script.\nPlease continue with the --install instruction.")
sys.exit(1) sys.exit(1)
elif args.distribution == 'guix': elif args.distribution == 'guix':
print(f"Building the profile defined in '{GUIX_MANIFEST}'...") print(f"Building the profile defined in '{GUIX_MANIFEST}'")
execute_script([f'guix shell --manifest={GUIX_MANIFEST} -- true']) execute_script([f'guix shell --manifest={GUIX_MANIFEST} -- true'])
else: else:
@ -316,7 +316,7 @@ def run_init(args):
client_hooks_dir = '.git/hooks' client_hooks_dir = '.git/hooks'
daemon_hooks_dir = '.git/modules/daemon/hooks' daemon_hooks_dir = '.git/modules/daemon/hooks'
print("Installing commit-msg hooks...") print("Installing commit-msg hooks")
# Copy the commit-msg hook to all modules in the same way. # Copy the commit-msg hook to all modules in the same way.
for hooks_dir in [client_hooks_dir, daemon_hooks_dir]: for hooks_dir in [client_hooks_dir, daemon_hooks_dir]:
if not os.path.exists(hooks_dir): if not os.path.exists(hooks_dir):
@ -324,7 +324,7 @@ def run_init(args):
copy_file("./extras/scripts/commit-msg", copy_file("./extras/scripts/commit-msg",
os.path.join(hooks_dir, "commit-msg")) os.path.join(hooks_dir, "commit-msg"))
print("Installing pre-commit hooks...") print("Installing pre-commit hooks")
format_script = "./extras/scripts/format.py" format_script = "./extras/scripts/format.py"
# Prepend with the python executable if on Windows (not WSL). # Prepend with the python executable if on Windows (not WSL).
if sys.platform == 'win32': if sys.platform == 'win32':
@ -604,7 +604,7 @@ def run_run(args):
client_process.wait() client_process.wait()
except KeyboardInterrupt: except KeyboardInterrupt:
print("\nCaught KeyboardInterrupt...") print("\nCaught KeyboardInterrupt")
finally: finally:
if args.debug: if args.debug:
@ -614,7 +614,7 @@ def run_run(args):
try: try:
# Only kill the processes if they are running, as they # Only kill the processes if they are running, as they
# could have been closed by the user. # could have been closed by the user.
print("Killing processes...") print("Killing processes")
if args.no_libwrap: if args.no_libwrap:
jamid_log.close() jamid_log.close()
if jamid_process.poll() is None: if jamid_process.poll() is None:

View file

@ -12,7 +12,7 @@ RUN apt-get update --allow-releaseinfo-change && \
nasm nasm
# As of January 2024, the default compiler on Debian testing is GCC 13.2.0, which # As of January 2024, the default compiler on Debian testing is GCC 13.2.0, which
# can't build one of Qt 6.6.1's dependencies, see: # is unable to build one of Qt 6.6.1's dependencies, see:
# https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c # https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c
# The linked commit above fixes the problem and is included in more recent versions of Qt. # The linked commit above fixes the problem and is included in more recent versions of Qt.
# For now, we use GCC 12 as a temporary workaround: # For now, we use GCC 12 as a temporary workaround:

View file

@ -12,7 +12,7 @@ RUN apt-get update && \
wget wget
# As of January 2024, the default compiler on Debian unstable is GCC 13.2.0, which # As of January 2024, the default compiler on Debian unstable is GCC 13.2.0, which
# can't build one of Qt 6.6.1's dependencies, see: # is unable to build one of Qt 6.6.1's dependencies, see:
# https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c # https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c
# The linked commit above fixes the problem and is included in more recent versions of Qt. # The linked commit above fixes the problem and is included in more recent versions of Qt.
# For now, we use GCC 12 as a temporary workaround: # For now, we use GCC 12 as a temporary workaround:

View file

@ -10,7 +10,7 @@ RUN apt-get update && \
python-is-python3 \ python-is-python3 \
wget wget
# The default compiler on Ubuntu 23.10, GCC 13.2.0, can't build one of Qt 6.6.1's # The default compiler on Ubuntu 23.10, GCC 13.2.0, is unable to build one of Qt 6.6.1's
# dependencies, see: # dependencies, see:
# https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c # https://github.com/qt/qtquick3d-assimp/commit/253f8bfa621a9fa6cd2c36291cdaa8c60c99322c
# The linked commit above fixes the problem and is included in more recent versions of Qt. # The linked commit above fixes the problem and is included in more recent versions of Qt.

View file

@ -139,14 +139,14 @@ def main():
if args.type in ["cpp", "both"]: if args.type in ["cpp", "both"]:
if command_exists("clang-format-" + CFVERSION): if command_exists("clang-format-" + CFVERSION):
CLANGFORMAT = "clang-format-" + CFVERSION CLANGFORMAT = "clang-format-" + CFVERSION
elif command_exists("clang-format"): elif command_exists("clang-format"):
CLANGFORMAT = "clang-format" CLANGFORMAT = "clang-format"
if CLANGFORMAT is not None: if CLANGFORMAT is not None:
print("Using source formatter: " + CLANGFORMAT) print("Using source formatter: " + CLANGFORMAT)
else: else:
print("clang-format not found. can't format source files") print("clang-format not found, unable to format source files")
if args.qt is not None and args.type in ["qml", "both"]: if args.qt is not None and args.type in ["qml", "both"]:
global QMLFORMAT # pylint: disable=global-statement global QMLFORMAT # pylint: disable=global-statement
@ -154,7 +154,7 @@ def main():
if QMLFORMAT is not None: if QMLFORMAT is not None:
print("Using qmlformatter: " + QMLFORMAT) print("Using qmlformatter: " + QMLFORMAT)
else: else:
print("qmlformat not found, can't format QML files") print("qmlformat not found, unable to format QML files")
if args.install: if args.install:
if CLANGFORMAT is not None or QMLFORMAT is not None: if CLANGFORMAT is not None or QMLFORMAT is not None:
@ -171,10 +171,10 @@ def main():
exit_if_no_files() exit_if_no_files()
else: else:
if src_files and args.type in ["cpp", "both"] and CLANGFORMAT: if src_files and args.type in ["cpp", "both"] and CLANGFORMAT:
print("Formatting source files...") print("Formatting source files")
clang_format_files(src_files) clang_format_files(src_files)
if qml_files and args.type in ["qml", "both"] and QMLFORMAT: if qml_files and args.type in ["qml", "both"] and QMLFORMAT:
print("Formatting QML files...") print("Formatting QML files")
qml_format_files(qml_files) qml_format_files(qml_files)

View file

@ -1,92 +1,92 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2022-2024 Savoir-faire Linux Inc. # Copyright (C) 2022-2024 Savoir-faire Linux Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA. # USA.
""" """
Generate qrc file for qml and related code files recursively within the source Generate qrc file for qml and related code files recursively within the source
directory. directory.
""" """
import os import os
# These paths should be relative to the working directory of the # These paths should be relative to the working directory of the
# script as set in the project CMakeLists, which should in turn be # script as set in the project CMakeLists, which should in turn be
# where the resources.qrc will be located (currently 'src/app'). # where the resources.qrc will be located (currently 'src/app').
app_src_dir = os.path.join('..', '..', 'src', 'app') app_src_dir = os.path.join('..', '..', 'src', 'app')
resfile = os.path.join('qml.qrc') resfile = os.path.join('qml.qrc')
def path_contains_dir(filepath, dir_str): def path_contains_dir(filepath, dir_str):
""" Return True if the given filepath contains the given directory. """ """ Return True if the given filepath contains the given directory. """
# Split the filepath into its components # Split the filepath into its components
path_components = os.path.normpath(filepath).split(os.sep) path_components = os.path.normpath(filepath).split(os.sep)
# Return True if the given directory is in the path # Return True if the given directory is in the path
return dir_str in path_components return dir_str in path_components
def posix_path(path): def posix_path(path):
""" """
Force the use of POSIX path separators for the resource prefixes Force the use of POSIX path separators for the resource prefixes
and paths (useful only if versioning the qml.qrc file). and paths (useful only if versioning the qml.qrc file).
""" """
return path.replace(os.sep, '/') return path.replace(os.sep, '/')
def gen_qml_qrc(with_webengine): def gen_qml_qrc(with_webengine):
""" Generate the qml.qrc file. """ """ Generate the qml.qrc file. """
print("Generating qml.qrc file ...") print("Generating qml.qrc file")
with open(resfile, 'w', encoding='utf-8') as qrc: with open(resfile, 'w', encoding='utf-8') as qrc:
qrc.write('<RCC>\n') qrc.write('<RCC>\n')
for root, _, files in os.walk(app_src_dir): for root, _, files in os.walk(app_src_dir):
# Skip the nowebengine directory if we can use webengine # Skip the nowebengine directory if we can use WebEngine
if with_webengine and path_contains_dir(root, 'nowebengine'): if with_webengine and path_contains_dir(root, 'nowebengine'):
continue continue
# Skip the webengine directory if we can't use webengine # Skip the webengine directory if WebEngine is unable to be used
if not with_webengine and path_contains_dir(root, 'webengine'): if not with_webengine and path_contains_dir(root, 'webengine'):
continue continue
filtered = [k for k in files if k.endswith('.qml') or filtered = [k for k in files if k.endswith('.qml') or
k.endswith('.js') or k.endswith('.html') or k.endswith('.js') or k.endswith('.html') or
k.endswith('.css') or k.endswith('.conf') or k.endswith('.css') or k.endswith('.conf') or
k == 'qmldir'] k == 'qmldir']
# if there are no files of interest in this directory, skip it # if there are no files of interest in this directory, skip it
if not filtered: if not filtered:
continue continue
# For now, get the relative resource prefix for this directory, # For now, get the relative resource prefix for this directory,
# remove the leading slash, and add it as a comment to the line. # remove the leading slash, and add it as a comment to the line.
# Ideally, we should use the actual resource prefix instead of /, # Ideally, we should use the actual resource prefix instead of /,
# but this will require some refactoring of the QML code. # but this will require some refactoring of the QML code.
prefix = root.split(app_src_dir)[-1][1:] prefix = root.split(app_src_dir)[-1][1:]
qrc.write( qrc.write(
f'\t<qresource prefix="/"> <!--{posix_path(prefix)}-->\n') f'\t<qresource prefix="/"> <!--{posix_path(prefix)}-->\n')
for file in filtered: for file in filtered:
relpath = os.path.relpath( relpath = os.path.relpath(
os.path.join(root, file), app_src_dir) os.path.join(root, file), app_src_dir)
qrc.write(f'\t\t<file>{posix_path(relpath)}</file>\n') qrc.write(f'\t\t<file>{posix_path(relpath)}</file>\n')
qrc.write('\t</qresource>\n') qrc.write('\t</qresource>\n')
qrc.write('</RCC>') qrc.write('</RCC>')
if __name__ == '__main__': if __name__ == '__main__':
# We can't use webengine if we're building for macOS app store # WebEngine is unable to be used if building for macOS App Store
import argparse import argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--with-webengine', action='store_true', parser.add_argument('--with-webengine', action='store_true',
default=False, help='Include webengine resources') default=False, help='Include WebEngine resources')
args = parser.parse_args() args = parser.parse_args()
gen_qml_qrc(args.with_webengine) gen_qml_qrc(args.with_webengine)

View file

@ -64,7 +64,7 @@ def gen_resources_qrc(with_webengine):
qrc.write('<RCC>\n') qrc.write('<RCC>\n')
qml.write('pragma Singleton\nimport QtQuick\nQtObject {\n') qml.write('pragma Singleton\nimport QtQuick\nQtObject {\n')
for root, _, files in os.walk(resdir): for root, _, files in os.walk(resdir):
# Skip the webengine directory if we can't use webengine # Skip the WebEngine directory if WebEngine is unable to used
if not with_webengine and path_contains_dir(root, 'webengine'): if not with_webengine and path_contains_dir(root, 'webengine'):
continue continue
prefix = root.rsplit(os.sep, 1)[-1] prefix = root.rsplit(os.sep, 1)[-1]
@ -90,10 +90,10 @@ def gen_resources_qrc(with_webengine):
if __name__ == '__main__': if __name__ == '__main__':
# We can't use webengine if we're building for macOS app store # WebEngine is unable to be used if building for macOS App Store
import argparse import argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--with-webengine', action='store_true', parser.add_argument('--with-webengine', action='store_true',
default=False, help='Include webengine resources') default=False, help='Include WebEngine resources')
args = parser.parse_args() args = parser.parse_args()
gen_resources_qrc(args.with_webengine) gen_resources_qrc(args.with_webengine)

View file

@ -3,9 +3,6 @@
## ##
## Copyright (C) 2016-2024 Savoir-faire Linux Inc. ## Copyright (C) 2016-2024 Savoir-faire Linux Inc.
## ##
## Author: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
## Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
##
## This program is free software; you can redistribute it and/or modify ## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or ## the Free Software Foundation; either version 3 of the License, or
@ -26,9 +23,9 @@ import shutil
print("== Updating from sources") print("== Updating from sources")
if os.system("lupdate jami.pro -no-obsolete"): if os.system("lupdate jami.pro -no-obsolete"):
print("trying with 'lupdate-qt5'") print("Attempting with 'lupdate-qt5'")
if os.system("lupdate-qt5 jami.pro -no-obsolete"): if os.system("lupdate-qt5 jami.pro -no-obsolete"):
raise RuntimeError("unable to find any suitable lupdate Qt tool on this system. Stopping") raise RuntimeError("Unable to find any suitable lupdate Qt tool on this system. Stopping")
print("== Pushing sources") print("== Pushing sources")
os.system("tx push -s") os.system("tx push -s")

View file

@ -165,7 +165,7 @@ AvAdapter::shareWayland(bool entireScreen)
int err = portal->getPipewireFd(); int err = portal->getPipewireFd();
if (err == EACCES) { if (err == EACCES) {
qInfo() << "Can't share screen: permission denied"; qInfo() << "Unable to share screen: permission denied";
return; return;
} else if (err != 0) { } else if (err != 0) {
qWarning() << "Failed to get PipeWire fd. Error code:" << err; qWarning() << "Failed to get PipeWire fd. Error code:" << err;
@ -178,7 +178,7 @@ AvAdapter::shareWayland(bool entireScreen)
.arg(portal->pipewireFd) .arg(portal->pipewireFd)
.arg(portal->pipewireNode); .arg(portal->pipewireNode);
#ifndef ENABLE_LIBWRAP #ifndef ENABLE_LIBWRAP
// If the daemon is running as a separate process, then it can't directly use the // If the daemon is running as a separate process, then it is unable to directly use the
// PipeWire file descriptor opened by the client, so it will attempt to duplicate // PipeWire file descriptor opened by the client, so it will attempt to duplicate
// it using the pidfd_getfd system call. This requires the daemon process to have // it using the pidfd_getfd system call. This requires the daemon process to have
// ptrace permission on the client process. On some systems, this will be true by // ptrace permission on the client process. On some systems, this will be true by

View file

@ -173,10 +173,10 @@ static void
logConnectionInfo(NMActiveConnection* connection) logConnectionInfo(NMActiveConnection* connection)
{ {
if (connection) { if (connection) {
C_INFO << "primary network connection:" << nm_active_connection_get_uuid(connection) C_INFO << "Primary network connection:" << nm_active_connection_get_uuid(connection)
<< "default: " << (nm_active_connection_get_default(connection) ? "yes" : "no"); << "default:" << (nm_active_connection_get_default(connection) ? "yes" : "no");
} else { } else {
C_WARN << "no primary network connection detected, check network settings"; C_WARN << "No primary network connection detected, check network settings";
} }
} }
@ -193,7 +193,7 @@ nmClientCallback(G_GNUC_UNUSED GObject* source_object, GAsyncResult* result, Con
{ {
GError* error = nullptr; GError* error = nullptr;
if (auto nm_client = nm_client_new_finish(result, &error)) { if (auto nm_client = nm_client_new_finish(result, &error)) {
C_INFO << "NetworkManager client initialized, version: " << nm_client_get_version(nm_client) C_INFO << "NetworkManager client initialized, version:" << nm_client_get_version(nm_client)
<< ", daemon running:" << (nm_client_get_nm_running(nm_client) ? "yes" : "no") << ", daemon running:" << (nm_client_get_nm_running(nm_client) ? "yes" : "no")
<< ", networking enabled:" << ", networking enabled:"
<< (nm_client_networking_get_enabled(nm_client) ? "yes" : "no"); << (nm_client_networking_get_enabled(nm_client) ? "yes" : "no");
@ -206,7 +206,7 @@ nmClientCallback(G_GNUC_UNUSED GObject* source_object, GAsyncResult* result, Con
cm); cm);
} else { } else {
C_WARN << "error initializing NetworkManager client: " << error->message; C_WARN << "Error initializing NetworkManager client:" << error->message;
g_clear_error(&error); g_clear_error(&error);
} }
} }

View file

@ -152,7 +152,7 @@ CurrentConversation::updateData()
updateProfile(convId); updateProfile(convId);
updateActiveCalls(accountId, convId); updateActiveCalls(accountId, convId);
} catch (...) { } catch (...) {
qWarning() << "An error occurred while updating current conversation data for" << convId; qWarning() << "Error while updating current conversation data for" << convId;
} }
} }
@ -227,7 +227,7 @@ CurrentConversation::updateProfile(const QString& convId)
try { try {
if (auto optConv = convModel->getConversationForUid(convId)) { if (auto optConv = convModel->getConversationForUid(convId)) {
auto& convInfo = optConv->get(); auto& convInfo = optConv->get();
// Now, update call informations (rdvAccount/device) // Now, update call information (rdvAccount/device)
if (convInfo.infos.contains("rdvAccount")) { if (convInfo.infos.contains("rdvAccount")) {
set_rdvAccount(convInfo.infos["rdvAccount"]); set_rdvAccount(convInfo.infos["rdvAccount"]);
} else { } else {
@ -270,7 +270,7 @@ CurrentConversation::connectModel()
auto currentConversationModel = lrcInstance_->getCurrentConversationModel(); auto currentConversationModel = lrcInstance_->getCurrentConversationModel();
auto currentCallModel = lrcInstance_->getCurrentCallModel(); auto currentCallModel = lrcInstance_->getCurrentCallModel();
if (!currentConversationModel || !currentCallModel) { if (!currentConversationModel || !currentCallModel) {
C_DBG << "CurrentConversation: can't connect to unavailable models"; C_DBG << "CurrentConversation: unable to connect to unavailable models";
return; return;
} }
@ -320,7 +320,7 @@ CurrentConversation::updateErrors(const QString& convId)
} else if (code == 3) { } else if (code == 3) {
newErrors.append(tr("An invalid message was detected")); newErrors.append(tr("An invalid message was detected"));
} else if (code == 4) { } else if (code == 4) {
newErrors.append(tr("Not authorized to update conversation information")); newErrors.append(tr("Insufficient permission to update conversation information"));
} else if (code == 5) { } else if (code == 5) {
newErrors.append(tr("An error occurred while committing a new message")); newErrors.append(tr("An error occurred while committing a new message"));
} else { } else {

View file

@ -189,7 +189,7 @@ bool
MainApplication::init() MainApplication::init()
{ {
// This 2-phase initialisation prevents ephemeral instances from // This 2-phase initialisation prevents ephemeral instances from
// performing unnecessary tasks, like initializing the webengine. // performing unnecessary tasks, like initializing the WebEngine.
engine_.reset(new QQmlApplicationEngine(this)); engine_.reset(new QQmlApplicationEngine(this));
QWK::registerTypes(engine_.get()); QWK::registerTypes(engine_.get());

View file

@ -210,7 +210,7 @@ PTTListener::Impl::qtKeyToVKey(Qt::Key key)
return VK_MEDIA_PLAY_PAUSE; return VK_MEDIA_PLAY_PAUSE;
case Qt::Key_MediaStop: case Qt::Key_MediaStop:
return VK_MEDIA_STOP; return VK_MEDIA_STOP;
// couldn't find those in VK_* // unable to find those in VK_*
// case Qt::Key_MediaLast: // case Qt::Key_MediaLast:
// case Qt::Key_MediaRecord: // case Qt::Key_MediaRecord:
case Qt::Key_VolumeDown: case Qt::Key_VolumeDown:

View file

@ -150,7 +150,7 @@ ScreenCastPortal::onStartResponseReceivedCallback(GDBusConnection* connection,
if (response) { if (response) {
g_variant_unref(result); g_variant_unref(result);
portal->abort(EACCES, "Failed to start screencast, denied or cancelled by user"); portal->abort(EACCES, "Failed to start screencast, denied or canceled by user");
return; return;
} }
@ -204,7 +204,7 @@ ScreenCastPortal::start()
request_token = "pipewiregrabStart"; request_token = "pipewiregrabStart";
request_path = g_strdup_printf(REQUEST_PATH, sender_name, request_token); request_path = g_strdup_printf(REQUEST_PATH, sender_name, request_token);
qInfo() << "Asking for monitor..."; qInfo() << "Asking for monitor";
ptr_dbus_call_data = subscribeToSignal(request_path, onStartResponseReceivedCallback); ptr_dbus_call_data = subscribeToSignal(request_path, onStartResponseReceivedCallback);
if (!ptr_dbus_call_data) { if (!ptr_dbus_call_data) {
@ -240,7 +240,7 @@ ScreenCastPortal::onSelectSourcesResponseReceivedCallback(GDBusConnection* conne
g_variant_get(parameters, "(u@a{sv})", &response, &ret); g_variant_get(parameters, "(u@a{sv})", &response, &ret);
g_variant_unref(ret); g_variant_unref(ret);
if (response) { if (response) {
portal->abort(EACCES, "Failed to select screencast sources, denied or cancelled by user"); portal->abort(EACCES, "Failed to select screencast sources, denied or canceled by user");
return; return;
} }
@ -308,7 +308,7 @@ ScreenCastPortal::onCreateSessionResponseReceivedCallback(GDBusConnection* conne
if (response != 0) { if (response != 0) {
g_variant_unref(result); g_variant_unref(result);
portal->abort(EACCES, "Failed to create screencast session, denied or cancelled by user"); portal->abort(EACCES, "Failed to create screencast session, denied or canceled by user");
return; return;
} }
@ -455,7 +455,7 @@ ScreenCastPortal::getPipewireFd()
g_main_loop_run(glib_main_loop); g_main_loop_run(glib_main_loop);
// The main loop will run until it's stopped by openPipewireRemote (if // The main loop will run until it's stopped by openPipewireRemote (if
// all DBus method calls were successful), abort (in case of error) or // all DBus method calls were successful), abort (in case of error) or
// on_cancelled_callback (if a DBus request is cancelled). // on_cancelled_callback (if a DBus request is canceled).
// In the latter two cases, pw_ctx->portal_error gets set to a nonzero value. // In the latter two cases, pw_ctx->portal_error gets set to a nonzero value.
if (portal_error) if (portal_error)
ret = portal_error; ret = portal_error;
@ -506,13 +506,13 @@ ScreenCastPortal::~ScreenCastPortal()
g_clear_pointer(&sender_name, g_free); g_clear_pointer(&sender_name, g_free);
#ifndef ENABLE_LIBWRAP #ifndef ENABLE_LIBWRAP
// If the daemon is running as a separate process, then it can't directly use the // If the daemon is running as a separate process, then it is unable to directly use the
// PipeWire file descriptor opened by the client, so it will have to duplicate it. // PipeWire file descriptor opened by the client, so it will have to duplicate it.
// The duplicated file descriptor will be closed by the daemon, but the original // The duplicated file descriptor will be closed by the daemon, but the original
// file descriptor needs to be closed by the client. // file descriptor needs to be closed by the client.
if (close(pipewireFd) != 0) { if (close(pipewireFd) != 0) {
int err = errno; int err = errno;
qWarning() << "An error occurred while attempting to close PipeWire file descriptor: errno =" qWarning() << "Error while attempting to close PipeWire file descriptor: errno ="
<< err; << err;
} else { } else {
qInfo() << "PipeWire file descriptor closed successfully."; qInfo() << "PipeWire file descriptor closed successfully.";

View file

@ -76,7 +76,7 @@ Utils::remove_argument(char** argv,
} }
}); });
// If any occurrences were removed... // If any occurrences were removed
if (new_end != argv + argc) { if (new_end != argv + argc) {
// Adjust the argument count. // Adjust the argument count.
argc = std::distance(argv, new_end); argc = std::distance(argv, new_end);
@ -87,7 +87,7 @@ void
Utils::testVulkanSupport() Utils::testVulkanSupport()
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
// Checks Vulkan support using the vulkan functions loaded directly // Checks Vulkan support using the Vulkan functions loaded directly
// from vulkan-1.dll. // from vulkan-1.dll.
struct DllLoader struct DllLoader
{ {
@ -95,7 +95,7 @@ Utils::testVulkanSupport()
: module(LoadLibraryA(filename.c_str())) : module(LoadLibraryA(filename.c_str()))
{ {
if (module == nullptr) { if (module == nullptr) {
throw std::runtime_error("Can't load module."); throw std::runtime_error("Unable to load module.");
} }
} }
~DllLoader() ~DllLoader()
@ -123,7 +123,7 @@ Utils::testVulkanSupport()
int VkInstanceCreateInfo[16] = {1}; int VkInstanceCreateInfo[16] = {1};
auto result = vkCreateInstance(VkInstanceCreateInfo, 0, &instance); auto result = vkCreateInstance(VkInstanceCreateInfo, 0, &instance);
if (!instance || result != 0) { if (!instance || result != 0) {
throw std::runtime_error("Can't create Vulkan instance."); throw std::runtime_error("Unable to create Vulkan instance.");
} }
#endif #endif
} }
@ -170,7 +170,7 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName)
#endif #endif
if (desktopPath.isEmpty() || !(QFile::exists(desktopPath))) { if (desktopPath.isEmpty() || !(QFile::exists(desktopPath))) {
qDebug() << "An error occurred while attempting to locate .desktop file at" qDebug() << "Error while attempting to locate .desktop file at"
<< desktopPath; << desktopPath;
return false; return false;
} }
@ -198,7 +198,7 @@ Utils::CreateStartupLink(const std::wstring& wstrAppName)
if (QDir().mkdir(autoStartDir)) { if (QDir().mkdir(autoStartDir)) {
qDebug() << "Created autostart directory:" << autoStartDir; qDebug() << "Created autostart directory:" << autoStartDir;
} else { } else {
qWarning() << "An error occurred while creating autostart directory:" qWarning() << "Error while creating autostart directory:"
<< autoStartDir; << autoStartDir;
return false; return false;
} }
@ -302,7 +302,7 @@ Utils::removeOldVersions()
* remove 1. the configuration reg keys for Ring-x64, 2. the startup links for Ring, * remove 1. the configuration reg keys for Ring-x64, 2. the startup links for Ring,
* 3. the winsparkle reg keys. The NSIS uninstall reg keys for Jami-x64 are removed * 3. the winsparkle reg keys. The NSIS uninstall reg keys for Jami-x64 are removed
* by the MSI installer. * by the MSI installer.
* Uninstallation of Ring, either 32 or 64 bit, is left to the user. * Uninstallation of Ring, either 32-bit or 64-bit, is left to the user.
* The current version of Jami will attempt to kill Ring.exe upon start if a startup * The current version of Jami will attempt to kill Ring.exe upon start if a startup
* link is found. * link is found.
*/ */
@ -467,7 +467,7 @@ Utils::conversationAvatar(LRCInstance* instance,
if (!photo.isNull()) { if (!photo.isNull()) {
return scaleAndFrame(photo, size); return scaleAndFrame(photo, size);
} }
qWarning() << "Couldn't load image from base 64 data for conversation " << convId; qWarning() << "Unable to load image from Base64 data for conversation " << convId;
} }
// Else, generate an avatar // Else, generate an avatar
auto members = convModel->peersForConversation(convId); auto members = convModel->peersForConversation(convId);
@ -625,7 +625,7 @@ Utils::getProjectCredits()
QObject::tr("We would like to thank our contributors, whose efforts over many years have made this software what it is."), QObject::tr("We would like to thank our contributors, whose efforts over many years have made this software what it is."),
QObject::tr("Developers"), QObject::tr("Media"), QObject::tr("Community Management"), QObject::tr("Special thanks to"), QObject::tr("Developers"), QObject::tr("Media"), QObject::tr("Community Management"), QObject::tr("Special thanks to"),
QObject::tr("This is a list of people who have made a significant investment of time,\ QObject::tr("This is a list of people who have made a significant investment of time,\
with useful results, into Jami. Any such contributors who wish to be added to the list \ with useful results, into Jami. Any such contributors who want to be added to the list \
should contact us.")); should contact us."));
} }
@ -866,7 +866,7 @@ Utils::QByteArrayFromFile(const QString& filename)
if (file.open(QIODevice::ReadOnly)) { if (file.open(QIODevice::ReadOnly)) {
return file.readAll(); return file.readAll();
} }
qDebug() << "QByteArrayFromFile: can't open file" << filename; qDebug() << "QByteArrayFromFile: unable to open file" << filename;
return {}; return {};
} }

View file

@ -105,7 +105,7 @@ public:
void updateAccountDetails(account::Info& account); void updateAccountDetails(account::Info& account);
/** /**
* get a modifiable account informations associated to an accountId. * get a modifiable account information associated to an accountId.
* @param accountId. * @param accountId.
* @return a account::Info& structure. * @return a account::Info& structure.
*/ */
@ -357,7 +357,7 @@ AccountModel::getAccountInfo(const QString& accountId) const
{ {
auto accountInfo = pimpl_->accounts.find(accountId); auto accountInfo = pimpl_->accounts.find(accountId);
if (accountInfo == pimpl_->accounts.end()) if (accountInfo == pimpl_->accounts.end())
throw std::out_of_range("AccountModel::getAccountInfo, can't find account " throw std::out_of_range("AccountModel::getAccountInfo, unable to find account "
+ accountId.toStdString()); + accountId.toStdString());
return accountInfo->second.first; return accountInfo->second.first;
@ -506,7 +506,7 @@ AccountModelPimpl::getAccountInfo(const QString& accountId)
{ {
auto account = accounts.find(accountId); auto account = accounts.find(accountId);
if (account == accounts.end()) { if (account == accounts.end()) {
throw std::out_of_range("AccountModelPimpl::getAccountInfo, can't find " throw std::out_of_range("AccountModelPimpl::getAccountInfo, unable to find "
+ accountId.toStdString()); + accountId.toStdString());
} }
return account->second.first; return account->second.first;
@ -557,7 +557,7 @@ AccountModelPimpl::slotAccountDetailsChanged(const QString& accountId,
{ {
auto account = accounts.find(accountId); auto account = accounts.find(accountId);
if (account == accounts.end()) { if (account == accounts.end()) {
qWarning() << Q_FUNC_INFO << ": can't find " << accountId; qWarning() << Q_FUNC_INFO << ": unable to find " << accountId;
return; return;
} }
auto& accountInfo = account->second.first; auto& accountInfo = account->second.first;
@ -578,7 +578,7 @@ AccountModelPimpl::slotVolatileAccountDetailsChanged(const QString& accountId,
{ {
auto account = accounts.find(accountId); auto account = accounts.find(accountId);
if (account == accounts.end()) { if (account == accounts.end()) {
LC_DBG << Q_FUNC_INFO << ": can't find " << accountId; LC_DBG << Q_FUNC_INFO << ": unable to find " << accountId;
return; return;
} }
auto& accountInfo = account->second.first; auto& accountInfo = account->second.first;
@ -713,7 +713,7 @@ AccountModelPimpl::slotAccountProfileReceived(const QString& accountId,
if (account == accounts.end() || userPhoto.isEmpty()) if (account == accounts.end() || userPhoto.isEmpty())
return; return;
// NOTE: This signal is still used for JAMS account where the avatar is // NOTE: This signal is still used for JAMS account where the avatar is
// retrieven from the server. In this case we MUST save it. // retrieved from the server. In this case we MUST save it.
auto& accountInfo = account->second.first; auto& accountInfo = account->second.first;
accountInfo.profileInfo.avatar = userPhoto; accountInfo.profileInfo.avatar = userPhoto;
accountInfo.profileInfo.alias = displayName; accountInfo.profileInfo.alias = displayName;
@ -744,7 +744,7 @@ AccountModelPimpl::addToAccounts(const QString& accountId)
auto it = accounts.emplace(accountId, std::make_pair(account::Info(), db)); auto it = accounts.emplace(accountId, std::make_pair(account::Info(), db));
if (!it.second) { if (!it.second) {
LC_WARN << "failed to add new account: id already present in map"; LC_WARN << "Failed to add new account: id already present in map";
return; return;
} }
@ -1123,7 +1123,7 @@ AccountModel::accountVCard(const QString& accountId, bool compressImage) const
const QString const QString
AccountModel::bestNameForAccount(const QString& accountID) AccountModel::bestNameForAccount(const QString& accountID)
{ {
// Order: Alias, registeredName, uri // Order: alias, registeredName, uri
auto& accountInfo = getAccountInfo(accountID); auto& accountInfo = getAccountInfo(accountID);
auto alias = accountInfo.profileInfo.alias.simplified(); auto alias = accountInfo.profileInfo.alias.simplified();
@ -1142,7 +1142,7 @@ AccountModel::bestNameForAccount(const QString& accountID)
const QString const QString
AccountModel::bestIdForAccount(const QString& accountID) AccountModel::bestIdForAccount(const QString& accountID)
{ {
// Order: RegisteredName, uri after best name // Order: registeredName, uri after best name
// return empty string if duplicated with best name // return empty string if duplicated with best name
auto& accountInfo = getAccountInfo(accountID); auto& accountInfo = getAccountInfo(accountID);

View file

@ -66,7 +66,7 @@ public:
Q_INVOKABLE size_t getAccountCount() const; Q_INVOKABLE size_t getAccountCount() const;
/** /**
* get account informations associated to an accountId. * get account information associated to an accountId.
* @param accountId. * @param accountId.
* @return a const account::Info& structure. * @return a const account::Info& structure.
*/ */

View file

@ -53,7 +53,7 @@ class AccountModel;
class CallParticipants; class CallParticipants;
/** /**
* @brief Class that manages call informations. * @brief Class that manages call information.
*/ */
class LIB_EXPORT CallModel : public QObject class LIB_EXPORT CallModel : public QObject
{ {
@ -78,7 +78,7 @@ public:
* Create a new call with a contact * Create a new call with a contact
* @param uri of the contact to call * @param uri of the contact to call
* @param isAudioOnly, set to false by default * @param isAudioOnly, set to false by default
* @return the call uid created. Empty string is returned if call couldn't be created. * @return the call uid created. Empty string is returned if call is unable to be created.
*/ */
QString createCall(const QString& uri, QString createCall(const QString& uri,
bool isAudioOnly = false, bool isAudioOnly = false,
@ -387,7 +387,7 @@ public:
const QList<call::PendingConferenceeInfo>& getPendingConferencees(); const QList<call::PendingConferenceeInfo>& getPendingConferencees();
/** /**
* Get informations on the rendered device * Get information on the rendered device
* @param call_id linked call to the renderer * @param call_id linked call to the renderer
* @return the device rendered * @return the device rendered
*/ */

View file

@ -168,7 +168,7 @@ public:
/** /**
* @param index participant index * @param index participant index
* @return informations of the participant in index * @return information of the participant in index
*/ */
QJsonObject toQJsonObject(uint index) const; QJsonObject toQJsonObject(uint index) const;

View file

@ -79,7 +79,7 @@ public:
* get contact information. * get contact information.
* @param contactUri * @param contactUri
* @return the contact::Info structure for a contact * @return the contact::Info structure for a contact
* @throws out_of_range exception if can't find the contact * @throws out_of_range exception if it is unable to find the contact
*/ */
const contact::Info getContact(const QString& contactUri) const; const contact::Info getContact(const QString& contactUri) const;
ContactInfoMap getSearchResults() const; ContactInfoMap getSearchResults() const;

View file

@ -73,7 +73,7 @@ struct AccountConversation
typedef QVector<QVector<AccountConversation>> ConferenceableValue; typedef QVector<QVector<AccountConversation>> ConferenceableValue;
/** /**
* @brief Class that manages conversation informations. * @brief Class that manages conversation information.
*/ */
class LIB_EXPORT ConversationModel : public QObject class LIB_EXPORT ConversationModel : public QObject
{ {

View file

@ -86,7 +86,7 @@ public:
* Change the name of the current device * Change the name of the current device
* @param newName * @param newName
* @note will emit deviceUpdated when finished * @note will emit deviceUpdated when finished
* @note ring can't change the name of another device * @note ring is unable to change the name of another device
*/ */
void setCurrentDeviceName(const QString& newName); void setCurrentDeviceName(const QString& newName);

View file

@ -355,7 +355,7 @@ AVModel::getDeviceIdFromName(const QString& deviceName) const
return settings.name == deviceName; return settings.name == deviceName;
}); });
if (iter == devices.end()) { if (iter == devices.end()) {
LC_WARN << "Couldn't find device: " << deviceName; LC_WARN << "Unable to find device: " << deviceName;
return {}; return {};
} }
return *iter; return *iter;
@ -489,7 +489,7 @@ void
AVModel::stopLocalRecorder(const QString& path) const AVModel::stopLocalRecorder(const QString& path) const
{ {
if (path.isEmpty()) { if (path.isEmpty()) {
LC_WARN << "stopLocalRecorder: can't stop non existing recording"; LC_WARN << "stopLocalRecorder: unable to stop non existing recording";
return; return;
} }
@ -1058,7 +1058,7 @@ AVModelPimpl::removeRenderer(const QString& id)
QWriteLocker lk(&renderersMutex_); QWriteLocker lk(&renderersMutex_);
auto it = renderers_.find(id); auto it = renderers_.find(id);
if (it == renderers_.end()) { if (it == renderers_.end()) {
LC_DBG << "Cannot remove renderer. " << id << " not found"; LC_DBG << "Unable to remove renderer. " << id << " not found";
return {}; return {};
} }
auto removed = std::move(it->second); auto removed = std::move(it->second);

View file

@ -280,7 +280,7 @@ CallModel::~CallModel() {}
const call::Info& const call::Info&
CallModel::getCallFromURI(const QString& uri, bool notOver) const CallModel::getCallFromURI(const QString& uri, bool notOver) const
{ {
// For a NON SIP account the scheme can be ring:. Sometimes it can miss, and will be certainly // For a non-SIP account the scheme can be ring:. Sometimes it can miss, and will be certainly
// replaced by jami://. // replaced by jami://.
// Just make the comparaison ignoring the scheme and check the rest. // Just make the comparaison ignoring the scheme and check the rest.
auto uriObj = URI(uri); auto uriObj = URI(uri);
@ -402,7 +402,7 @@ CallModel::createCall(const QString& uri, bool isAudioOnly, VectorMapStringStrin
pimpl_->waitForConference_ = uri; pimpl_->waitForConference_ = uri;
return {}; return {};
} }
qWarning() << "no call placed between (account: " << owner.id << ", contact: " << uri qWarning() << "No call placed between (account: " << owner.id << ", contact: " << uri
<< ")"; << ")";
return ""; return "";
} }
@ -805,7 +805,7 @@ CallModel::transferToCall(const QString& callId, const QString& callIdDest) cons
void void
CallModel::joinCalls(const QString& callIdA, const QString& callIdB) const CallModel::joinCalls(const QString& callIdA, const QString& callIdB) const
{ {
// Get call informations // Get call information
call::Info call1, call2; call::Info call1, call2;
QString accountIdCall1 = {}, accountIdCall2 = {}; QString accountIdCall1 = {}, accountIdCall2 = {};
for (const auto& account_id : owner.accountModel->getAccountList()) { for (const auto& account_id : owner.accountModel->getAccountList()) {
@ -825,7 +825,7 @@ CallModel::joinCalls(const QString& callIdA, const QString& callIdB) const
} }
} }
if (accountIdCall1.isEmpty() || accountIdCall2.isEmpty()) { if (accountIdCall1.isEmpty() || accountIdCall2.isEmpty()) {
qWarning() << "Can't join inexistent calls."; qWarning() << "Unable to join nonexistent calls.";
return; return;
} }
@ -836,7 +836,7 @@ CallModel::joinCalls(const QString& callIdA, const QString& callIdB) const
callIdB); callIdB);
if (!joined) { if (!joined) {
qWarning() << "Conference: " << callIdA << " couldn't join conference " << callIdB; qWarning() << "Conference: " << callIdA << " is unable to join conference " << callIdB;
return; return;
} }
if (accountIdCall1 != owner.id) { if (accountIdCall1 != owner.id) {
@ -860,7 +860,7 @@ CallModel::joinCalls(const QString& callIdA, const QString& callIdB) const
bool joined = CallManager::instance().addParticipant(accountCall, call, accountCall, conf); bool joined = CallManager::instance().addParticipant(accountCall, call, accountCall, conf);
if (!joined) { if (!joined) {
qWarning() << "Call: " << call << " couldn't join conference " << conf; qWarning() << "Call: " << call << " is unable to join conference " << conf;
return; return;
} }
if (accountCall != owner.id) { if (accountCall != owner.id) {
@ -1067,7 +1067,7 @@ CallModelPimpl::CallModelPimpl(const CallModel& linked,
&CallModelPimpl::onRecordingStateChanged); &CallModelPimpl::onRecordingStateChanged);
#ifndef ENABLE_LIBWRAP #ifndef ENABLE_LIBWRAP
// Only necessary with dbus since the daemon runs separately // Only necessary with D-Bus since the daemon runs separately
initCallFromDaemon(); initCallFromDaemon();
initConferencesFromDaemon(); initConferencesFromDaemon();
#endif #endif
@ -1139,8 +1139,8 @@ CallModelPimpl::initCallFromDaemon()
callInfo->layout = participantsPtr->getLayout(); callInfo->layout = participantsPtr->getLayout();
participantsModel.emplace(callId, std::move(participantsPtr)); participantsModel.emplace(callId, std::move(participantsPtr));
calls.emplace(callId, std::move(callInfo)); calls.emplace(callId, std::move(callInfo));
// NOTE/BUG: the videorenderer can't know that the client has restarted // NOTE/BUG: the videorenderer is unable to know that the client has restarted
// So, for now, a user will have to manually restart the medias until // So, for now, a user will have to manually restart the media until
// this renderer is not redesigned. // this renderer is not redesigned.
} }
} }

View file

@ -95,12 +95,12 @@ public:
void searchSipContact(const URI& query); void searchSipContact(const URI& query);
/** /**
* Update temporary item to display a given message about a given uri. * Update temporary item to display a given message about a given URI.
*/ */
void updateTemporaryMessage(const QString& mes); void updateTemporaryMessage(const QString& mes);
/** /**
* Check if equivalent uri exist in contact * Check if equivalent URI exist in contact
*/ */
QString sipUriReceivedFilter(const QString& uri); QString sipUriReceivedFilter(const QString& uri);
@ -446,7 +446,7 @@ ContactModel::searchContact(const QString& query)
auto uriScheme = uri.schemeType(); auto uriScheme = uri.schemeType();
if (static_cast<int>(uriScheme) > 2 && owner.profileInfo.type == profile::Type::SIP) { if (static_cast<int>(uriScheme) > 2 && owner.profileInfo.type == profile::Type::SIP) {
// sip account do not care if schemeType is NONE, or UNRECOGNIZED (enum value > 2) // SIP account do not care if schemeType is NONE, or UNRECOGNIZED (enum value > 2)
uriScheme = URI::SchemeType::SIP; uriScheme = URI::SchemeType::SIP;
} else if (uriScheme == URI::SchemeType::NONE && owner.profileInfo.type == profile::Type::JAMI) { } else if (uriScheme == URI::SchemeType::NONE && owner.profileInfo.type == profile::Type::JAMI) {
uriScheme = URI::SchemeType::RING; uriScheme = URI::SchemeType::RING;
@ -485,7 +485,7 @@ ContactModelPimpl::searchContact(const URI& query)
if (query.protocolHint() == URI::ProtocolHint::RING) { if (query.protocolHint() == URI::ProtocolHint::RING) {
updateTemporaryMessage(""); updateTemporaryMessage("");
// no lookup, this is a ring infoHash // No lookup, this is a ring infoHash
for (auto& i : contacts) for (auto& i : contacts)
if (i.profileInfo.uri == uriId) if (i.profileInfo.uri == uriId)
return; return;
@ -991,7 +991,7 @@ ContactModelPimpl::slotRegisteredNameFound(const QString& accountId,
updateTemporaryMessage(tr("Username not found")); updateTemporaryMessage(tr("Username not found"));
break; break;
case 3 /* ERROR */: case 3 /* ERROR */:
updateTemporaryMessage(tr("Couldn't lookup…")); updateTemporaryMessage(tr("Unable to lookup…"));
break; break;
} }
return; return;
@ -1069,7 +1069,7 @@ ContactModelPimpl::slotNewAccountMessage(const QString& accountId,
if (potentialContact.isEmpty()) { if (potentialContact.isEmpty()) {
addToContacts(peerId, profile::Type::SIP, "", false); addToContacts(peerId, profile::Type::SIP, "", false);
} else { } else {
// equivalent uri exist, use that uri // equivalent URI exist, use that URI
peerId2 = potentialContact; peerId2 = potentialContact;
} }
} else { } else {
@ -1084,8 +1084,8 @@ ContactModelPimpl::slotNewAccountMessage(const QString& accountId,
QString QString
ContactModelPimpl::sipUriReceivedFilter(const QString& uri) ContactModelPimpl::sipUriReceivedFilter(const QString& uri)
{ {
// this function serves when the uri is not found in the contact list // this function serves when the URI is not found in the contact list
// return "" means need to add new contact, else means equivalent uri exist // return "" means need to add new contact, else means equivalent URI exist
std::string uriCopy = uri.toStdString(); std::string uriCopy = uri.toStdString();
auto pos = uriCopy.find("@"); auto pos = uriCopy.find("@");
@ -1132,7 +1132,7 @@ ContactModelPimpl::sipUriReceivedFilter(const QString& uri)
// no need to check country dial-in codes // no need to check country dial-in codes
return ""; return "";
} }
// "@" is not found -> not possible since all response uri has one // "@" is not found → impossible since all response URI has one
return ""; return "";
} }
@ -1189,7 +1189,7 @@ ContactModelPimpl::slotProfileReceived(const QString& accountId,
return; return;
if (linked.owner.profileInfo.uri == peer || peer == "") { if (linked.owner.profileInfo.uri == peer || peer == "") {
// as SIP account doesn't have a uri, we emit a signal with the accountId in the peer parameter // as SIP account doesn't have a URI, we emit a signal with the accountId in the peer parameter
const auto newProfileInfo = storage::getProfileData(accountId, ""); const auto newProfileInfo = storage::getProfileData(accountId, "");
linked.owner.accountModel->setAlias(accountId, newProfileInfo["alias"], false); linked.owner.accountModel->setAlias(accountId, newProfileInfo["alias"], false);
linked.owner.accountModel->setAvatar(accountId, newProfileInfo["avatar"], false); linked.owner.accountModel->setAvatar(accountId, newProfileInfo["avatar"], false);