mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 05:38:12 +00:00
feat(src/app/object-builders/AsyncObjectBuilder): add assertions
This commit is contained in:
parent
e63f9708f5
commit
0fb12cf952
1 changed files with 5 additions and 1 deletions
|
|
@ -33,11 +33,12 @@ using namespace std;
|
|||
class AsyncObjectBuilder::ObjectIncubator : public QQmlIncubator {
|
||||
public:
|
||||
// FIXME: At this moment, asynchronous loading is unstable.
|
||||
// Use `IncubationMode::Synchronous` instead in Qt 5.9.
|
||||
// In the future, use `IncubationMode::Asynchronous` instead in Qt 5.9.
|
||||
//
|
||||
// See: https://bugreports.qt.io/browse/QTBUG-49416 and
|
||||
// https://bugreports.qt.io/browse/QTBUG-50992
|
||||
ObjectIncubator (AsyncObjectBuilder *builder) : QQmlIncubator(IncubationMode::Synchronous) {
|
||||
Q_ASSERT(builder != nullptr);
|
||||
m_builder = builder;
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +64,9 @@ protected:
|
|||
m_builder->m_object = object;
|
||||
emit m_builder->objectCreated(object);
|
||||
|
||||
Q_ASSERT(m_builder->m_component != nullptr);
|
||||
Q_ASSERT(m_builder->m_incubator != nullptr);
|
||||
|
||||
// Optimization: Delete unused component now.
|
||||
m_builder->m_component->deleteLater();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue