Skip to content

Commit

Permalink
Enable lazy initialisation of DBusObjectRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
jacky309 committed Jun 2, 2020
1 parent f59b4b0 commit 13dc426
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/ipc/dbus/DBusManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ DBusObjectRegistry &DBusManager::objectRegistry()
{
if (m_objectRegistry == nullptr) {
m_objectRegistry = new DBusObjectRegistry(*this);
m_objectRegistry->init();
}

return *m_objectRegistry;
Expand Down
4 changes: 2 additions & 2 deletions src/ipc/dbus/DBusObjectRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ class FaceliftIPCLibDBus_EXPORT DBusObjectRegistry : public QObject

DBusObjectRegistry(DBusManager &dbusManager);

void init();

void registerObject(const QString &objectPath, facelift::AsyncAnswer<bool> answer);

void unregisterObject(const QString &objectPath);

const Registry<QString>& objects(bool blocking);

private:
void init();

static int nextVersion(const int currentVersion);

void onObjectAdded(const QString& objectPath, const QString& serviceName, int registryVersion);
Expand Down

0 comments on commit 13dc426

Please sign in to comment.