mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Fix Ldap & Carddav adding
This commit is contained in:
parent
351199d163
commit
69f6683a47
6 changed files with 24 additions and 3 deletions
|
|
@ -29,6 +29,14 @@ CarddavGui::CarddavGui(QSharedPointer<CarddavCore> core) {
|
|||
if (isInLinphoneThread()) moveToThread(App::getInstance()->thread());
|
||||
}
|
||||
|
||||
CarddavGui::CarddavGui(QObject *parent) : QObject(parent) {
|
||||
mustBeInMainThread(log().arg(Q_FUNC_INFO));
|
||||
App::postModelSync([this]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
mCore = CarddavCore::create(nullptr);
|
||||
});
|
||||
}
|
||||
|
||||
CarddavGui::~CarddavGui() {
|
||||
mustBeInMainThread("~" + getClassName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class CarddavGui : public QObject, public AbstractObject {
|
|||
|
||||
public:
|
||||
CarddavGui(QSharedPointer<CarddavCore> core);
|
||||
CarddavGui(QObject *parent = nullptr);
|
||||
~CarddavGui();
|
||||
CarddavCore *getCore() const;
|
||||
QSharedPointer<CarddavCore> mCore;
|
||||
|
|
|
|||
|
|
@ -72,12 +72,14 @@ void CarddavList::setSelf(QSharedPointer<CarddavList> me) {
|
|||
});
|
||||
});
|
||||
});
|
||||
QObject::connect(
|
||||
CoreModel::getInstance().get(), &CoreModel::friendListRemoved, this,
|
||||
|
||||
mModelConnection->makeConnectToModel(
|
||||
&CoreModel::friendListRemoved,
|
||||
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::FriendList> &friendList) {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
emit lUpdate();
|
||||
});
|
||||
|
||||
emit lUpdate();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,14 @@ LdapGui::LdapGui(QSharedPointer<LdapCore> core) {
|
|||
if (isInLinphoneThread()) moveToThread(App::getInstance()->thread());
|
||||
}
|
||||
|
||||
LdapGui::LdapGui(QObject *parent) : QObject(parent) {
|
||||
mustBeInMainThread(getClassName());
|
||||
App::postModelSync([this]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
mCore = LdapCore::create(nullptr);
|
||||
});
|
||||
}
|
||||
|
||||
LdapGui::~LdapGui() {
|
||||
mustBeInMainThread("~" + getClassName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class LdapGui : public QObject, public AbstractObject {
|
|||
|
||||
public:
|
||||
LdapGui(QSharedPointer<LdapCore> core);
|
||||
LdapGui(QObject *parent = nullptr);
|
||||
~LdapGui();
|
||||
LdapCore *getCore() const;
|
||||
QSharedPointer<LdapCore> mCore;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
onVisibleChanged: {
|
||||
proxyModel.updateView()
|
||||
if (visible)
|
||||
proxyModel.updateView()
|
||||
}
|
||||
Component.onCompleted: {
|
||||
proxyModel.updateView()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue