diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-01 18:17:20 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-01 18:17:20 +0900 |
commit | 245d13f9d1ecf2d4ab6ab321709e10c8c261f7a7 (patch) | |
tree | c0e496204cda4a895921ccd48320719d0041aa23 /kjsembed/docs | |
parent | 9055b21d6a4e7da5a959336eec39471b63490ee3 (diff) | |
download | tdebindings-245d13f9d1ecf2d4ab6ab321709e10c8c261f7a7.tar.gz tdebindings-245d13f9d1ecf2d4ab6ab321709e10c8c261f7a7.zip |
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kjsembed/docs')
-rw-r--r-- | kjsembed/docs/ChangeLog | 6 | ||||
-rw-r--r-- | kjsembed/docs/embedding/simple-embed/embedviewimp.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/kjsembed/docs/ChangeLog b/kjsembed/docs/ChangeLog index 49c861ea..c8e11eb3 100644 --- a/kjsembed/docs/ChangeLog +++ b/kjsembed/docs/ChangeLog @@ -78,7 +78,7 @@ in C++. Conversions break down as follows: TQStringList -> Array of javascript strings. TQValueList<TQVariant> -> Array of Javascript values. - TQMap<TQString,TQVariant> -> Object/Array that has each TQString key as + TQStringVariantMap -> Object/Array that has each TQString key as a property, and the TQVariant is mapped to a Javascript value. From Javascript the conversions are a little different. @@ -91,10 +91,10 @@ = convertToVariant( exec, someArrayValue).toList(); Now if the Javascript value is a Javascript object or a map then - the conversion will go to a TQMap<TQString,TQVariant>. An example of + the conversion will go to a TQStringVariantMap. An example of this would be like: KJS::Value someJSObject; - TQMap<TQString,TQVariant> map = convertToVariant(exec,someJSObject) + TQStringVariantMap map = convertToVariant(exec,someJSObject) .toMap(); TQString someVal = map["someProp"].toString(); diff --git a/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp b/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp index b71521d5..fd645ca5 100644 --- a/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp +++ b/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp @@ -30,7 +30,7 @@ void EmbedViewImp::okClicked() { KJS::List args; KJS::Value val = m_part->callMethod("handleOk", args); - TQMap<TQString, TQVariant> personalData = KJSEmbed::convertToVariant(m_part->globalExec(), val).toMap(); + TQStringVariantMap personalData = KJSEmbed::convertToVariant(m_part->globalExec(), val).toMap(); TQDate birthday = personalData["birthday"].toDate(); TQColor eyecolor = personalData["eyeColor"].toColor(); TQString notes = personalData["notes"].toString(); @@ -60,7 +60,7 @@ bool EmbedViewImp::runScript( const TQString &file ) TQVariant EmbedViewImp::someValue() const { - TQMap<TQString,TQVariant> returnMap; + TQStringVariantMap returnMap; returnMap["name"] = m_name->text(); returnMap["title"] = m_title->text(); returnMap["dept"] = m_dept->text(); @@ -69,7 +69,7 @@ TQVariant EmbedViewImp::someValue() const void EmbedViewImp::setSomeValue( const TQVariant &val ) { - TQMap<TQString,TQVariant> map = val.toMap(); + TQStringVariantMap map = val.toMap(); m_name->setText(map["name"].toString()); m_title->setText(map["title"].toString()); m_dept->setText(map["dept"].toString()); |