mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
- URI handlers when no domain are provided like tel:number.
- remove trailing new lines in smart search bar. - Update SDK to 5.3.10.
This commit is contained in:
parent
f656c02741
commit
f82be7731c
5 changed files with 34 additions and 21 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
|
||||
## 5.2.1 - undefined
|
||||
|
||||
### Fixed
|
||||
- URI handlers when no domain are provided like tel:number.
|
||||
- Update SDK to 5.3.10.
|
||||
|
||||
### Added
|
||||
- Remove trailing newlines in smart search bar.
|
||||
|
||||
## 5.2.0 - 2023-12-22
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -356,12 +356,8 @@ void Cli::Command::execute (QHash<QString, QString> &args) const {
|
|||
}
|
||||
}
|
||||
|
||||
void Cli::Command::executeUri (const shared_ptr<linphone::Address> &address) const {
|
||||
QHash<QString, QString> args;
|
||||
QString qAddress = Utils::coreStringToAppString(address->asString());
|
||||
if(address->getDomain() == "" && qAddress.back() == '@')
|
||||
qAddress.remove(qAddress.size()-1, 1);
|
||||
QUrl url(qAddress);
|
||||
void Cli::Command::executeUri (QString address, QHash<QString, QString> args) const {
|
||||
QUrl url(address);
|
||||
QString query = url.query();
|
||||
|
||||
QStringList parameters = query.split('&');
|
||||
|
|
@ -375,12 +371,7 @@ void Cli::Command::executeUri (const shared_ptr<linphone::Address> &address) con
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: check if there is too much headers.
|
||||
for (const auto &argName : mArgsScheme.keys()) {
|
||||
const string header = address->getHeader(Utils::appStringToCoreString(argName));
|
||||
args[argName] = QByteArray::fromBase64(QByteArray(header.c_str(), int(header.length())));
|
||||
}
|
||||
args["sip-address"] = qAddress;
|
||||
args["sip-address"] = address;
|
||||
execute(args);
|
||||
}
|
||||
|
||||
|
|
@ -533,10 +524,15 @@ void Cli::executeCommand (const QString &command, CommandFormat *format) {
|
|||
App::getInstance()->useFetchConfig(fetchUrl);
|
||||
}else{
|
||||
shared_ptr<linphone::Address> address;
|
||||
QString qAddress;
|
||||
std::string t;
|
||||
address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(transformedCommand));// Test if command is an address
|
||||
if(Utils::isUsername(transformedCommand)){
|
||||
address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(transformedCommand+"@to.remove"));
|
||||
if(address)
|
||||
address->setDomain("");
|
||||
address->setDomain("");
|
||||
qAddress = Utils::coreStringToAppString(address->asString());
|
||||
if(address && qAddress.isEmpty())
|
||||
qAddress = transformedCommand;
|
||||
}else
|
||||
address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(transformedCommand));// Test if command is an address
|
||||
if (format)
|
||||
|
|
@ -568,9 +564,15 @@ void Cli::executeCommand (const QString &command, CommandFormat *format) {
|
|||
qWarning() << QStringLiteral("This command doesn't exist: `%1`.").arg(functionName);
|
||||
return;
|
||||
}
|
||||
if(address)
|
||||
mCommands[functionName].executeUri(address);
|
||||
else
|
||||
if(address){
|
||||
// TODO: check if there is too much headers.
|
||||
QHash<QString, QString> headers;
|
||||
for (const auto &argName : mCommands[functionName].mArgsScheme.keys()) {
|
||||
const string header = address->getHeader(Utils::appStringToCoreString(argName));
|
||||
headers[argName] = QByteArray::fromBase64(QByteArray(header.c_str(), int(header.length())));
|
||||
}
|
||||
mCommands[functionName].executeUri(qAddress, headers);
|
||||
}else
|
||||
mCommands[functionName].executeUrl(command);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Cli : public QObject {
|
|||
);
|
||||
|
||||
void execute (QHash<QString, QString> &args) const;
|
||||
void executeUri (const std::shared_ptr<linphone::Address> &address) const;
|
||||
void executeUri (QString address, QHash<QString, QString> args) const;
|
||||
void executeUrl (const QString &url) const;
|
||||
|
||||
const char *getFunctionDescription () const {
|
||||
|
|
@ -73,11 +73,12 @@ class Cli : public QObject {
|
|||
|
||||
QString getFunctionSyntax () const ;
|
||||
|
||||
QHash<QString, Argument> mArgsScheme;
|
||||
|
||||
private:
|
||||
QString mFunctionName;
|
||||
const char *mFunctionDescription;
|
||||
Function mFunction = nullptr;
|
||||
QHash<QString, Argument> mArgsScheme;
|
||||
bool mGenericArguments=false;// Used to avoid check on arguments
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ SearchBox {
|
|||
searchBox.addContact(sipAddress)
|
||||
})
|
||||
|
||||
genSipAddress: searchBox.filter
|
||||
genSipAddress: searchBox.filter.replace(/\n+$/, "")
|
||||
|
||||
model: SearchSipAddressesProxyModel {
|
||||
id:searchModel
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit cc73b680eddd9e840b91eede2cfe9b9f20f70d06
|
||||
Subproject commit df9d81091e94488c0196fb629ce6537b919fd848
|
||||
Loading…
Add table
Reference in a new issue