Skip to content

Commit

Permalink
[connman-qt] Fixes MER#1142 Let defaultRoute properties get updated too
Browse files Browse the repository at this point in the history
and partially revert 4e1ee1b
  • Loading branch information
Lorn Potter committed Jul 2, 2015
1 parent 79a8d10 commit 1872b4e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions libconnman-qt/networkservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ void NetworkService::reconnectServiceInterface()
connect(m_service, SIGNAL(PropertyChanged(QString,QDBusVariant)),
this, SLOT(updateProperty(QString,QDBusVariant)));

if (state().isEmpty()) //saved services have an empty state and cached properties
if (state().isEmpty() || m_path == QStringLiteral("/")) //saved services have an empty state and cached properties
QTimer::singleShot(500,this,SIGNAL(propertiesReady()));
else if (m_path != QStringLiteral("/") && m_service->isValid()) {
else {
QDBusPendingReply<QVariantMap> reply = m_service->GetProperties();
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);

Expand Down Expand Up @@ -594,6 +594,15 @@ void NetworkService::setPath(const QString &path)
resetProperties();

reconnectServiceInterface();

if (!m_service || !m_service->isValid())
return;

QDBusPendingReply<QVariantMap> reply = m_service->GetProperties();
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);

connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
this, SLOT(getPropertiesFinished(QDBusPendingCallWatcher*)));
}

bool NetworkService::connected()
Expand Down

0 comments on commit 1872b4e

Please sign in to comment.