- Fix undefined signals/functions that comes from bad visibility scope.

- Fix binding loop on cacheBuffer and wrong variables on call statistics.
- Remove apostrophe from user-agent.
- Add RemoteCardDAV into contact list.
- Fix crash on starting a call while a conferenceInfo is loading. 
- Contact details redirection after creating one.
This commit is contained in:
Julien Wadel 2024-12-09 14:10:13 +00:00
parent 9ebdefe24a
commit ef18622793
14 changed files with 26 additions and 18 deletions

View file

@ -31,6 +31,7 @@
class AccountCore : public QObject, public AbstractObject {
Q_OBJECT
public:
Q_PROPERTY(QString contactAddress READ getContactAddress CONSTANT)
Q_PROPERTY(QString identityAddress READ getIdentityAddress CONSTANT)
Q_PROPERTY(QString pictureUri READ getPictureUri WRITE lSetPictureUri NOTIFY pictureUriChanged)
@ -71,10 +72,9 @@ class AccountCore : public QObject, public AbstractObject {
Q_PROPERTY(QString audioVideoConferenceFactoryAddress READ getAudioVideoConferenceFactoryAddress WRITE
lSetAudioVideoConferenceFactoryAddress NOTIFY audioVideoConferenceFactoryAddressChanged)
Q_PROPERTY(QString limeServerUrl READ getLimeServerUrl WRITE lSetLimeServerUrl NOTIFY limeServerUrlChanged)
DECLARE_CORE_GET(int, voicemailCount, VoicemailCount)
DECLARE_CORE_GETSET_MEMBER(QString, voicemailAddress, VoicemailAddress)
public:
static QSharedPointer<AccountCore> create(const std::shared_ptr<linphone::Account> &account);
// Should be call from model Thread. Will be automatically in App thread after initialization
AccountCore(const std::shared_ptr<linphone::Account> &account);
@ -170,6 +170,7 @@ signals:
void audioVideoConferenceFactoryAddressChanged();
void limeServerUrlChanged();
void removed();
// void voicemailAddressChanged();
// Account requests
void lSetPictureUri(QString pictureUri);

View file

@ -96,6 +96,7 @@ public:
class CallCore : public QObject, public AbstractObject {
Q_OBJECT
public:
Q_PROPERTY(LinphoneEnums::CallStatus status READ getStatus NOTIFY statusChanged)
Q_PROPERTY(LinphoneEnums::CallDir dir READ getDir NOTIFY dirChanged)
Q_PROPERTY(LinphoneEnums::CallState state READ getState NOTIFY stateChanged)
@ -140,7 +141,6 @@ class CallCore : public QObject, public AbstractObject {
DECLARE_GUI_GETSET(bool, isStarted, IsStarted)
public:
// Should be call from model Thread. Will be automatically in App thread after initialization
static QSharedPointer<CallCore> create(const std::shared_ptr<linphone::Call> &call);
CallCore(const std::shared_ptr<linphone::Call> &call);

View file

@ -97,14 +97,15 @@ ConferenceInfoCore::ConferenceInfoCore(std::shared_ptr<linphone::ConferenceInfo>
mIsScheduled = true;
mDuration = 60;
mEndDateTime = mDateTime.addSecs(mDuration * 60);
App::postModelSync([this]() {
App::postModelAsync([this]() {
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
if (defaultAccount) {
auto accountAddress = defaultAccount->getContactAddress();
if (accountAddress) {
auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean();
mOrganizerAddress = Utils::coreStringToAppString(cleanedClonedAddress->asStringUriOnly());
auto address = Utils::coreStringToAppString(cleanedClonedAddress->asStringUriOnly());
App::postCoreAsync([this, address]() { setOrganizerAddress(address); });
}
}
});

View file

@ -31,19 +31,19 @@
class PayloadTypeCore : public QObject, public AbstractObject {
Q_OBJECT
public:
Q_ENUMS(Family)
Q_PROPERTY(Family family MEMBER mFamily CONSTANT)
DECLARE_CORE_MEMBER(int, clockRate, ClockRate)
DECLARE_CORE_MEMBER(QString, recvFmtp, RecvFmtp)
public:
enum Family { Audio, Video, Text };
static QSharedPointer<PayloadTypeCore> create(Family family,
const std::shared_ptr<linphone::PayloadType> &payloadType);
PayloadTypeCore(Family family, const std::shared_ptr<linphone::PayloadType> &payloadType);
PayloadTypeCore() {};
PayloadTypeCore(){};
~PayloadTypeCore();
void setSelf(QSharedPointer<PayloadTypeCore> me);

View file

@ -32,6 +32,7 @@
class SettingsCore : public QObject, public AbstractObject {
Q_OBJECT
public:
// Security
Q_PROPERTY(bool vfsEnabled READ getVfsEnabled WRITE setVfsEnabled NOTIFY vfsEnabledChanged)
@ -69,7 +70,6 @@ class SettingsCore : public QObject, public AbstractObject {
Q_PROPERTY(QString logsFolder READ getLogsFolder)
Q_PROPERTY(bool dnd READ dndEnabled WRITE lEnableDnd NOTIFY dndChanged)
public:
static QSharedPointer<SettingsCore> create();
SettingsCore(QObject *parent = Q_NULLPTR);
virtual ~SettingsCore();

View file

@ -365,5 +365,6 @@ QString ToolModel::computeUserAgent(const std::shared_ptr<linphone::Config> &con
.arg(Utils::getApplicationProduct())
.arg(SettingsModel::getDeviceName(config).replace('\\', "\\\\").replace('(', "\\(").replace(')', "\\)"))
.arg(Utils::getOsProduct())
.arg(qVersion());
.arg(qVersion())
.remove("'");
}

View file

@ -272,6 +272,7 @@ enum class MagicSearchSource {
Request = int(linphone::MagicSearch::Source::Request),
FavoriteFriends = int(linphone::MagicSearch::Source::FavoriteFriends),
ConferencesInfo = int(linphone::MagicSearch::Source::ConferencesInfo),
RemoteCardDAV = int(linphone::MagicSearch::Source::RemoteCardDAV),
All = int(linphone::MagicSearch::Source::All)
};
Q_ENUM_NS(MagicSearchSource);

View file

@ -38,14 +38,14 @@ RowLayout {
Switch {
id: switchButton
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
checked: propertyOwner[mainItem.propertyName]
checked: propertyOwner ? propertyOwner[mainItem.propertyName] : false
enabled: mainItem.enabled
onCheckedChanged: mainItem.checkedChanged(checked)
onToggled: binding.when = true
}
Binding {
id: binding
target: propertyOwner
target: propertyOwner ? propertyOwner : null
property: mainItem.propertyName
value: switchButton.checked
when: false

View file

@ -67,7 +67,7 @@ ColumnLayout {
}
Item {
id: verticalLayoutSecondLine
visible: contactDetail.useVerticalLayout
visible: mainItem.useVerticalLayout
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: childrenRect.width
Layout.preferredHeight: childrenRect.height

View file

@ -80,7 +80,7 @@ ColumnLayout {
Layout.leftMargin: 16 * DefaultStyle.dp
Layout.rightMargin: 16 * DefaultStyle.dp
visible: mainItem.localVideoEnabled || mainItem.remoteVideoEnabled
visible: mainItem.call?.core.localVideoEnabled || mainItem.call?.core.remoteVideoEnabled || false
contentItem: ColumnLayout {
spacing: 12 * DefaultStyle.dp
@ -140,4 +140,4 @@ ColumnLayout {
}
}
Item{Layout.fillHeight: true}
}
}

View file

@ -18,7 +18,7 @@ MainRightPanel {
if (contact.core.isSaved) {
var mainWin = UtilsCpp.getMainWindow()
UtilsCpp.smartShowWindow(mainWin)
mainWin.goToContactDetail(contact)
mainWin.displayContactPage(contact)
}
}
}

View file

@ -302,8 +302,8 @@ Item {
delegate: Item {
Connections {
target: modelData.core
onShowMwiChanged: voicemail.updateCumulatedMwi()
onVoicemailAddressChanged: voicemail.updateCumulatedMwi()
function onShowMwiChanged() {voicemail.updateCumulatedMwi()}
function onVoicemailAddressChanged(){voicemail.updateCumulatedMwi()}
}
}
}

View file

@ -267,6 +267,10 @@ AbstractMainPage {
event.accepted = true
}
}
// remove binding loop
onContentHeightChanged: Qt.callLater(function(){
historyListView.cacheBuffer = Math.max(contentHeight,0)
})
onActiveFocusChanged: if(activeFocus && currentIndex <0) currentIndex = 0
Connections {

View file

@ -237,7 +237,7 @@ AbstractMainPage {
searchBarText: searchBar.text
hideSuggestions: true
showDefaultAddress: false
sourceFlags: LinphoneEnums.MagicSearchSource.Friends | LinphoneEnums.MagicSearchSource.FavoriteFriends | LinphoneEnums.MagicSearchSource.LdapServers
sourceFlags: LinphoneEnums.MagicSearchSource.Friends | LinphoneEnums.MagicSearchSource.FavoriteFriends | LinphoneEnums.MagicSearchSource.LdapServers | LinphoneEnums.MagicSearchSource.RemoteCardDAV
onHighlightedContactChanged: mainItem.selectedContact = highlightedContact
onContactDeletionRequested: (contact) => {
mainItem.deleteContact(contact)