Simplify QOfonoDataConnectionManagerInterface::getProperty()
Make getProperties() return a reference and directly call value() on it. Almost is a tail-call now, if it wasn't inlined and if the dtor of the default argument didn't have to be called. Saves 288bytes in text size even so. Change-Id: Ie841501c1ce1379ca928f7474b90bc6487d77ab2 Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
9bee41796b
commit
3759749466
@ -272,13 +272,10 @@ bool QOfonoDataConnectionManagerInterface::roamingAllowed()
|
||||
|
||||
QVariant QOfonoDataConnectionManagerInterface::getProperty(const QString &property)
|
||||
{
|
||||
QVariant var;
|
||||
QVariantMap map = getProperties();
|
||||
var = map.value(property);
|
||||
return var;
|
||||
return getProperties().value(property);
|
||||
}
|
||||
|
||||
QVariantMap QOfonoDataConnectionManagerInterface::getProperties()
|
||||
QVariantMap &QOfonoDataConnectionManagerInterface::getProperties()
|
||||
{
|
||||
if (propertiesMap.isEmpty()) {
|
||||
QList<QVariant> argumentList;
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
Q_SIGNALS:
|
||||
void roamingAllowedChanged(bool);
|
||||
private:
|
||||
QVariantMap getProperties();
|
||||
QVariantMap &getProperties();
|
||||
QVariantMap propertiesMap;
|
||||
QVariant getProperty(const QString &);
|
||||
QStringList contextList;
|
||||
|
Loading…
Reference in New Issue
Block a user