mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Unset URL handlers on exit( as specified by Qt).
Fix uppercase avatar initials.
This commit is contained in:
parent
073f159485
commit
21965cc9a2
4 changed files with 11 additions and 4 deletions
|
|
@ -84,6 +84,8 @@ public:
|
|||
return mImageListModel;
|
||||
}
|
||||
|
||||
QLocale getLocale () const;
|
||||
|
||||
//static ColorListModel *getColorListModel () const {
|
||||
//return App::getInstance()-getColorListModel();
|
||||
//}
|
||||
|
|
@ -142,8 +144,6 @@ private:
|
|||
QString getConfigLocale () const;
|
||||
void setConfigLocale (const QString &locale);
|
||||
|
||||
QLocale getLocale () const;
|
||||
|
||||
QVariantList getAvailableLocales () const {
|
||||
return mAvailableLocales;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ UrlHandlers::UrlHandlers (QObject *parent) : QObject(parent) {
|
|||
QDesktopServices::setUrlHandler("sips", this, "handleSip");
|
||||
}
|
||||
|
||||
UrlHandlers::~UrlHandlers(){
|
||||
QDesktopServices::unsetUrlHandler("sips");
|
||||
QDesktopServices::unsetUrlHandler("sip");
|
||||
}
|
||||
|
||||
void UrlHandlers::handleSip (const QUrl &url) {
|
||||
emit sip(SipAddressesModel::interpretSipAddress(url));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,11 @@
|
|||
// =============================================================================
|
||||
|
||||
class UrlHandlers : public QObject {
|
||||
Q_OBJECT;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UrlHandlers (QObject *parent = Q_NULLPTR);
|
||||
~UrlHandlers();
|
||||
|
||||
public slots:
|
||||
void handleSip (const QUrl &url);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "config.h"
|
||||
#include "Utils.hpp"
|
||||
#include "UriTools.hpp"
|
||||
#include "app/App.hpp"
|
||||
#include "components/core/CoreManager.hpp"
|
||||
#include "components/contacts/ContactsListModel.hpp"
|
||||
#include "components/contact/ContactModel.hpp"
|
||||
|
|
@ -138,7 +139,7 @@ QString Utils::getInitials(const QString& username){
|
|||
initials << QString::fromStdU32String(char32);
|
||||
}
|
||||
}
|
||||
return initials.join("");
|
||||
return App::getInstance()->getLocale().toUpper(initials.join(""));
|
||||
}
|
||||
|
||||
QString Utils::toString(const LinphoneEnums::TunnelMode& mode){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue