Ignore:
Timestamp:
12/29/11 17:38:55 (18 months ago)
Author:
Micke Prag <micke.prag@…>
Branches:
('master', '668dd99ac278cfd419d67879b141678facea630a')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
Children:
05d48d1685e596e7c1ccf7eb8dfb9311f25321fd
Parents:
d86e12f1d35f6954f6f6efdd4db276c31ebbf3fd
git-author:
Micke Prag <micke.prag@telldus.se>2011-12-29 17:32:56+01:00
git-committer:
Micke Prag <micke.prag@telldus.se>2011-12-29 17:38:55+01:00
Message:

Add function LiveMessageTokenScriptWrapper::getString()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telldus-gui/Plugins/Live/LiveMessageToken.cpp

    rd86e12 r06bf1a  
    138138} 
    139139 
     140QString LiveMessageTokenScriptWrapper::getString(const QString &key, const QString &defaultValue) const { 
     141        if (p_token.valueType != LiveMessageToken::Dictionary) { 
     142                return defaultValue; 
     143        } 
     144        if (!p_token.dictVal.contains(key)) { 
     145                return defaultValue; 
     146        } 
     147        return p_token.dictVal[key].stringVal; 
     148} 
     149 
    140150int LiveMessageTokenScriptWrapper::intVal() const { 
    141151        return p_token.intVal; 
Note: See TracChangeset for help on using the changeset viewer.