Code review comment for lp:~paulliu/unity-mir/logout

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

144 +DBusLogout::DBusLogout(ApplicationManager *parent) : QObject(parent)
145 +{
146 + QDBusConnection connection = QDBusConnection::sessionBus();
147 + m_applicationManager = parent;
148 +
149 + QObject::connect(this, &DBusLogout::LogoutReady,
150 + parent, &ApplicationManager::onLogoutReady);

DBusLogout gets an ApplicationManager pointer just to make a signal/slot connection between the two!?

That's bad design. You're unnecessarily adding a circular dependency between DBusLogout and ApplicationManager. Just make ApplicationManager code create such connection.

Actually I'm not even sure this should be in unity-mir in the first place. As there's nothing "mir" about it.

review: Needs Fixing

« Back to merge proposal