diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-01 15:22:21 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-01 15:22:21 +0900 |
commit | 728b7db2846d191399122c440671fd007cdbd0ae (patch) | |
tree | cd5e6f3b5ae67ec464b2c05ce0d41016bd9e30c3 /lib/kross | |
parent | 04a12485219f38e113932e8aa20b6bc12d8fa715 (diff) | |
download | koffice-728b7db2846d191399122c440671fd007cdbd0ae.tar.gz koffice-728b7db2846d191399122c440671fd007cdbd0ae.zip |
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'lib/kross')
-rw-r--r-- | lib/kross/main/scriptcontainer.cpp | 4 | ||||
-rw-r--r-- | lib/kross/main/scriptcontainer.h | 2 | ||||
-rw-r--r-- | lib/kross/python/pythonextension.cpp | 6 | ||||
-rw-r--r-- | lib/kross/python/pythonextension.h | 2 | ||||
-rw-r--r-- | lib/kross/ruby/rubyextension.cpp | 4 | ||||
-rw-r--r-- | lib/kross/ruby/rubyextension.h | 2 | ||||
-rw-r--r-- | lib/kross/ruby/rubyvariant.h | 18 |
7 files changed, 19 insertions, 19 deletions
diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp index 809d3b83..c0e2fe32 100644 --- a/lib/kross/main/scriptcontainer.cpp +++ b/lib/kross/main/scriptcontainer.cpp @@ -77,7 +77,7 @@ namespace Kross { namespace Api { * Map of options that overwritte the \a InterpreterInfo::Option::Map * standard options. */ - TQMap<TQString, TQVariant> options; + TQStringVariantMap options; }; @@ -144,7 +144,7 @@ void ScriptContainer::setFile(const TQString& scriptfile) d->scriptfile = scriptfile; } -TQMap<TQString, TQVariant>& ScriptContainer::getOptions() +TQStringVariantMap& ScriptContainer::getOptions() { return d->options; } diff --git a/lib/kross/main/scriptcontainer.h b/lib/kross/main/scriptcontainer.h index e838317d..838388f7 100644 --- a/lib/kross/main/scriptcontainer.h +++ b/lib/kross/main/scriptcontainer.h @@ -132,7 +132,7 @@ namespace Kross { namespace Api { * The options are returned call-by-ref, so you are able to * manipulate them. */ - TQMap<TQString, TQVariant>& getOptions(); + TQStringVariantMap& getOptions(); /** * \return the value of the option defined with \p name . diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp index efa13bd7..7a2dac45 100644 --- a/lib/kross/python/pythonextension.cpp +++ b/lib/kross/python/pythonextension.cpp @@ -262,13 +262,13 @@ const Py::List PythonExtension::toPyObject(const TQStringList& list) return l; } -const Py::Dict PythonExtension::toPyObject(const TQMap<TQString, TQVariant>& map) +const Py::Dict PythonExtension::toPyObject(const TQStringVariantMap& map) { #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQMap<TQString,TQVariant>)") ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQStringVariantMap)") ); #endif Py::Dict d; - for(TQMap<TQString, TQVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it) + for(TQStringVariantMap::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it) d.setItem(it.key().latin1(), toPyObject(it.data())); return d; } diff --git a/lib/kross/python/pythonextension.h b/lib/kross/python/pythonextension.h index b19a11a1..d906638b 100644 --- a/lib/kross/python/pythonextension.h +++ b/lib/kross/python/pythonextension.h @@ -158,7 +158,7 @@ namespace Kross { namespace Python { * \param map The TQMap to convert. * \return The to a Py::Dict converted TQMap. */ - static const Py::Dict toPyObject(const TQMap<TQString, TQVariant>& map); + static const Py::Dict toPyObject(const TQStringVariantMap& map); /** * Converts a TQValueList to a Py::List. diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp index 589a0b27..9b9969f7 100644 --- a/lib/kross/ruby/rubyextension.cpp +++ b/lib/kross/ruby/rubyextension.cpp @@ -286,10 +286,10 @@ VALUE RubyExtension::toVALUE(TQStringList list) } -VALUE RubyExtension::toVALUE(TQMap<TQString, TQVariant> map) +VALUE RubyExtension::toVALUE(TQStringVariantMap map) { VALUE h = rb_hash_new(); - for(TQMap<TQString, TQVariant>::Iterator it = map.begin(); it != map.end(); ++it) + for(TQStringVariantMap::Iterator it = map.begin(); it != map.end(); ++it) rb_hash_aset(h, toVALUE(it.key()), toVALUE(it.data()) ); return h; diff --git a/lib/kross/ruby/rubyextension.h b/lib/kross/ruby/rubyextension.h index f6287961..3c79fe22 100644 --- a/lib/kross/ruby/rubyextension.h +++ b/lib/kross/ruby/rubyextension.h @@ -122,7 +122,7 @@ class RubyExtension{ * \param map The TQMap to convert. * \return The converted TQMap. */ - static VALUE toVALUE(TQMap<TQString, TQVariant> map); + static VALUE toVALUE(TQStringVariantMap map); /** * Converts a TQValueList to a VALUE. diff --git a/lib/kross/ruby/rubyvariant.h b/lib/kross/ruby/rubyvariant.h index f36d943c..cba4a2c3 100644 --- a/lib/kross/ruby/rubyvariant.h +++ b/lib/kross/ruby/rubyvariant.h @@ -496,28 +496,28 @@ namespace Kross { #if 0 /// \internal template<> - struct RubyType<TQVariantMap> + struct RubyType<TQStringVariantMap> { - inline static VALUE toVALUE(const TQVariantMap& map) { + inline static VALUE toVALUE(const TQStringVariantMap& map) { VALUE h = rb_hash_new(); - TQMap<TQString, TQVariant>::ConstIterator it(map.constBegin()), end(map.end()); + TQStringVariantMap::ConstIterator it(map.constBegin()), end(map.end()); for(; it != end; ++it) rb_hash_aset(h, RubyType<TQString>::toVALUE(it.key()), RubyType<TQVariant>::toVALUE(it.value()) ); return h; } inline static int convertHash(VALUE key, VALUE value, VALUE vmap) { - TQVariantMap* map; - Data_Get_Struct(vmap, TQVariantMap, map); + TQStringVariantMap* map; + Data_Get_Struct(vmap, TQStringVariantMap, map); if (key != TQundef) map->insert(STR2CSTR(key), RubyType<TQVariant>::toVariant(value)); return ST_CONTINUE; } - inline static TQVariantMap toVariant(VALUE value) { + inline static TQStringVariantMap toVariant(VALUE value) { if( TYPE(value) != T_HASH ) { - rb_raise(rb_eTypeError, "TQVariantMap must be a hash"); - return TQVariantMap(); + rb_raise(rb_eTypeError, "TQStringVariantMap must be a hash"); + return TQStringVariantMap(); } - TQVariantMap map; + TQStringVariantMap map; VALUE vmap = Data_Wrap_Struct(rb_cObject, 0,0, &map); rb_hash_foreach(value, (int (*)(...))convertHash, vmap); return map; |