Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Mark QOfonoModem and other objects invalid if modem goes away #85
Conversation
amccarthy
reviewed
Sep 16, 2015
src/qofonomodem.cpp
| { | ||
| + QOfonoManager* mgr = privateData()->mgr.data(); | ||
| + connect(mgr, SIGNAL(availableChanged(bool)), SLOT(onManagerAvailableChanged(bool))); | ||
| + connect(mgr, SIGNAL(modemsChanged(QStringList)), SLOT(onModemsChanged(QStringList))); |
amccarthy
Sep 16, 2015
Member
There is no need to define these two private slots which just call checkModemPathValidity(). The slots can have fewer parameters than the signal. Make checkModemPathValidity() a slot and connect to the signals directy.
|
Short circuited signals to |
|
Any more objections or comments? |
|
LGTM |
added a commit
that referenced
this pull request
Sep 17, 2015
monich
merged commit 98b5e4c
into
nemomobile:master
Sep 17, 2015
monich
deleted the
monich:modempath
branch
Sep 17, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
monich commentedSep 15, 2015
This allows UI to behave reasonably when the modems get added/removed dynamically (or ofono crashes).
Similarly, connection context is marked invalid when SIM is removed.
The ValidTracker mechanism eliminates unnecessary
validChanged()signals.