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());
|
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() {
|
CarddavGui::~CarddavGui() {
|
||||||
mustBeInMainThread("~" + getClassName());
|
mustBeInMainThread("~" + getClassName());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ class CarddavGui : public QObject, public AbstractObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CarddavGui(QSharedPointer<CarddavCore> core);
|
CarddavGui(QSharedPointer<CarddavCore> core);
|
||||||
|
CarddavGui(QObject *parent = nullptr);
|
||||||
~CarddavGui();
|
~CarddavGui();
|
||||||
CarddavCore *getCore() const;
|
CarddavCore *getCore() const;
|
||||||
QSharedPointer<CarddavCore> mCore;
|
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) {
|
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::FriendList> &friendList) {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
emit lUpdate();
|
emit lUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
emit lUpdate();
|
emit lUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,14 @@ LdapGui::LdapGui(QSharedPointer<LdapCore> core) {
|
||||||
if (isInLinphoneThread()) moveToThread(App::getInstance()->thread());
|
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() {
|
LdapGui::~LdapGui() {
|
||||||
mustBeInMainThread("~" + getClassName());
|
mustBeInMainThread("~" + getClassName());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ class LdapGui : public QObject, public AbstractObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LdapGui(QSharedPointer<LdapCore> core);
|
LdapGui(QSharedPointer<LdapCore> core);
|
||||||
|
LdapGui(QObject *parent = nullptr);
|
||||||
~LdapGui();
|
~LdapGui();
|
||||||
LdapCore *getCore() const;
|
LdapCore *getCore() const;
|
||||||
QSharedPointer<LdapCore> mCore;
|
QSharedPointer<LdapCore> mCore;
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
proxyModel.updateView()
|
if (visible)
|
||||||
|
proxyModel.updateView()
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
proxyModel.updateView()
|
proxyModel.updateView()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue