~ken-vandine/libqofono/0.90-suggests

« back to all changes in this revision

Viewing changes to src/qofonolocationreporting.cpp

  • Committer: Lorn Potter
  • Date: 2013-05-24 06:31:37 UTC
  • Revision ID: git-v1:f1fb2c7210b19ba47a1ecbe83d55a7cf15218f23
[libqofono] add modemPathChanged signals

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
void QOfonoLocationReporting::setModemPath(const QString &path)
48
48
{
49
49
    if (!d_ptr->ofonoLocationReporting) {
50
 
        d_ptr->modemPath = path;
51
 
        d_ptr->ofonoLocationReporting = new OfonoLocationReporting("org.ofono", path, QDBusConnection::systemBus(),this);
52
 
 
53
 
        if (d_ptr->ofonoLocationReporting) {
54
 
 
55
 
            QDBusReply<QVariantMap> reply;
56
 
            reply = d_ptr->ofonoLocationReporting->GetProperties();
57
 
            d_ptr->properties = reply.value();
 
50
        if (path != modemPath()) {
 
51
            d_ptr->ofonoLocationReporting = new OfonoLocationReporting("org.ofono", path, QDBusConnection::systemBus(),this);
 
52
 
 
53
            if (d_ptr->ofonoLocationReporting) {
 
54
                d_ptr->modemPath = path;
 
55
                QDBusReply<QVariantMap> reply;
 
56
                reply = d_ptr->ofonoLocationReporting->GetProperties();
 
57
                d_ptr->properties = reply.value();
 
58
                Q_EMIT modemPathChanged(path);
 
59
            }
58
60
        }
59
61
    }
60
62
}