diff options
author | Chris Craig <ext-chris.craig@nokia.com> | 2012-02-29 16:57:53 +0100 |
---|---|---|
committer | Lasse Holmstedt <lasse.holmstedt@nokia.com> | 2012-02-29 17:07:06 +0100 |
commit | 6e0bfc734f3aeadfc68b455c6054161e75c98bd7 (patch) | |
tree | b71f8aeca32b65ac7232f54a711603e8b4d38b4f /src | |
parent | d29cb6d26e1fd42bd6bf837b78eed4890c399415 (diff) |
add ProcessInfoTemplate::contains
Change-Id: Ieebba581070fe1996e872e32bf9a7e6783376606
Reviewed-by: Lasse Holmstedt <lasse.holmstedt@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/processinfotemplate.cpp | 8 | ||||
-rw-r--r-- | src/declarative/processinfotemplate.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/processinfotemplate.cpp b/src/declarative/processinfotemplate.cpp index 4cc024b..9a57efb 100644 --- a/src/declarative/processinfotemplate.cpp +++ b/src/declarative/processinfotemplate.cpp @@ -457,6 +457,14 @@ QString ProcessInfoTemplate::absoluteFilePath(const QString &url, const QString } /*! + Returns true if a value for \a tag hs been set in the dictionary, or false otherwise. +*/ +bool ProcessInfoTemplate::contains(const QString &tag) +{ + return m_dict.contains(tag); +} + +/*! Returns the boundData from binding \a dict. */ diff --git a/src/declarative/processinfotemplate.h b/src/declarative/processinfotemplate.h index 3fdb838..8c88d10 100644 --- a/src/declarative/processinfotemplate.h +++ b/src/declarative/processinfotemplate.h @@ -86,6 +86,8 @@ public: Q_INVOKABLE QVariant bind(const QString &tag, const QVariant &defaultValue = QVariant()); Q_INVOKABLE QString absoluteFilePath(const QString &url, const QString &filename = QString()) const; + Q_INVOKABLE bool contains(const QString &tag); + public slots: void setIdentifier(const QString &identifier); void setProgramName(const QDeclarativeScriptString &programName); |