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 | |
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')
-rw-r--r-- | lib/koproperty/customproperty.cpp | 2 | ||||
-rw-r--r-- | lib/koproperty/editors/combobox.cpp | 6 | ||||
-rw-r--r-- | lib/koproperty/editors/cursoredit.cpp | 4 | ||||
-rw-r--r-- | lib/koproperty/editors/cursoredit.h | 2 | ||||
-rw-r--r-- | lib/koproperty/editors/sizepolicyedit.cpp | 8 | ||||
-rw-r--r-- | lib/koproperty/editors/sizepolicyedit.h | 2 | ||||
-rw-r--r-- | lib/koproperty/property.cpp | 16 | ||||
-rw-r--r-- | lib/koproperty/property.h | 4 | ||||
-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 |
15 files changed, 41 insertions, 41 deletions
diff --git a/lib/koproperty/customproperty.cpp b/lib/koproperty/customproperty.cpp index b51cc317..0cc64743 100644 --- a/lib/koproperty/customproperty.cpp +++ b/lib/koproperty/customproperty.cpp @@ -270,7 +270,7 @@ SizePolicyCustomProperty::SizePolicyCustomProperty(Property *property) : CustomProperty(property) { if(property && (property->type() == SizePolicy) ) { -// TQMap<TQString, TQVariant> spValues; +// TQStringVariantMap spValues; TQValueList<TQVariant> keys; keys << TQSizePolicy::Fixed << TQSizePolicy::Minimum diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp index 1e2a47d4..92b437e9 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -178,7 +178,7 @@ ComboBox::setReadOnlyInternal(bool readOnly) /*TQString ComboBox::keyForValue(const TQVariant &value) { - const TQMap<TQString, TQVariant> *list = property()->valueList(); + const TQStringVariantMap *list = property()->valueList(); Property::ListData *list = property()->listData(); if (!list) @@ -186,8 +186,8 @@ ComboBox::keyForValue(const TQVariant &value) int idx = listData->keys.findIndex( value ); - TQMap<TQString, TQVariant>::ConstIterator endIt = list->constEnd(); - for(TQMap<TQString, TQVariant>::ConstIterator it = list->constBegin(); it != endIt; ++it) { + TQStringVariantMap::ConstIterator endIt = list->constEnd(); + for(TQStringVariantMap::ConstIterator it = list->constBegin(); it != endIt; ++it) { if(it.data() == value) return it.key(); } diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp index a95ab91f..c0c3010e 100644 --- a/lib/koproperty/editors/cursoredit.cpp +++ b/lib/koproperty/editors/cursoredit.cpp @@ -31,7 +31,7 @@ using namespace KoProperty; -//TQMap<TQString, TQVariant> *CursorEdit::m_spValues = 0; +//TQStringVariantMap *CursorEdit::m_spValues = 0; Property::ListData *m_cursorListData = 0; @@ -40,7 +40,7 @@ CursorEdit::CursorEdit(Property *property, TQWidget *parent, const char *name) { /* if(!m_spValues) { - m_spValues = new TQMap<TQString, TQVariant>(); + m_spValues = new TQStringVariantMap(); (*m_spValues)[i18n("Arrow")] = TQt::ArrowCursor; (*m_spValues)[i18n("Up Arrow")] = TQt::UpArrowCursor; (*m_spValues)[i18n("Cross")] = TQt::CrossCursor; diff --git a/lib/koproperty/editors/cursoredit.h b/lib/koproperty/editors/cursoredit.h index ff3c565c..0748110a 100644 --- a/lib/koproperty/editors/cursoredit.h +++ b/lib/koproperty/editors/cursoredit.h @@ -43,7 +43,7 @@ class KOPROPERTY_EXPORT CursorEdit : public ComboBox virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value); private: - static TQMap<TQString, TQVariant> *m_spValues; + static TQStringVariantMap *m_spValues; }; } diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp index c027d1dd..5a63c57f 100644 --- a/lib/koproperty/editors/sizepolicyedit.cpp +++ b/lib/koproperty/editors/sizepolicyedit.cpp @@ -32,7 +32,7 @@ using namespace KoProperty; -TQMap<TQString, TQVariant> *SizePolicyEdit::m_spValues = 0; +TQStringVariantMap *SizePolicyEdit::m_spValues = 0; SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *parent, const char *name) : Widget(property, parent, name) @@ -50,7 +50,7 @@ SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *parent, const char if(!m_spValues) { - m_spValues = new TQMap<TQString, TQVariant>(); + m_spValues = new TQStringVariantMap(); (*m_spValues)[i18n("Size Policy", "Fixed")] = TQSizePolicy::Fixed; (*m_spValues)[i18n("Size Policy", "Minimum")] = TQSizePolicy::Minimum; (*m_spValues)[i18n("Size Policy", "Maximum")] = TQSizePolicy::Maximum; @@ -105,8 +105,8 @@ SizePolicyEdit::findDescription(const TQVariant &value) const if(!m_spValues) return TQString(); - TQMap<TQString, TQVariant>::ConstIterator endIt = m_spValues->constEnd(); - for (TQMap<TQString, TQVariant>::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) { + TQStringVariantMap::ConstIterator endIt = m_spValues->constEnd(); + for (TQStringVariantMap::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) { if (it.data() == value) return it.key(); } diff --git a/lib/koproperty/editors/sizepolicyedit.h b/lib/koproperty/editors/sizepolicyedit.h index f5e81e75..c8d8e7a8 100644 --- a/lib/koproperty/editors/sizepolicyedit.h +++ b/lib/koproperty/editors/sizepolicyedit.h @@ -52,7 +52,7 @@ class KOPROPERTY_EXPORT SizePolicyEdit : public Widget private: TQVariant m_value; TQLabel *m_edit; - static TQMap<TQString, TQVariant> *m_spValues; + static TQStringVariantMap *m_spValues; }; } diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 6c4fa246..d90795ca 100644 --- a/lib/koproperty/property.cpp +++ b/lib/koproperty/property.cpp @@ -78,7 +78,7 @@ class PropertyPrivate TQVariant oldValue; /*! The string-to-value correspondence list of the property.*/ Property::ListData* listData; -// TQMap<TQString, TQVariant> *valueList; +// TQStringVariantMap *valueList; TQString icon; bool changed : 1; @@ -153,10 +153,10 @@ TQStringList Property::ListData::keysAsStringList() const ///////////////////////////////////////////////////////////////// /* -KOPROPERTY_EXPORT TQMap<TQString, TQVariant> +KOPROPERTY_EXPORT TQStringVariantMap KoProperty::createValueListFromStringLists(const TQStringList &keys, const TQStringList &values) { - TQMap<TQString, TQVariant> map; + TQStringVariantMap map; if(keys.count() != values.count()) return map; @@ -423,7 +423,7 @@ Property::resetValue() } } -//const TQMap<TQString, TQVariant>* +//const TQStringVariantMap* Property::ListData* Property::listData() const { @@ -431,10 +431,10 @@ Property::listData() const } void -Property::setListData(ListData* list) //const TQMap<TQString, TQVariant> &list) +Property::setListData(ListData* list) //const TQStringVariantMap &list) { // if(!d->valueList) -// d->valueList = new TQMap<TQString, TQVariant>(); +// d->valueList = new TQStringVariantMap(); if (list == d->listData) return; delete d->listData; @@ -448,7 +448,7 @@ Property::setListData(const TQStringList &keys, const TQStringList &names) setListData(list); // if(!d->valueList) -// d->valueList = new TQMap<TQString, TQVariant>(); +// d->valueList = new TQStringVariantMap(); // *(d->valueList) = createValueListFromStringLists(keys, values); } @@ -590,7 +590,7 @@ Property::operator= (const Property &property) d->options = property.d->options; if(property.d->listData) { - d->listData = new ListData(*property.d->listData); //TQMap<TQString, TQVariant>(*(property.d->valueList)); + d->listData = new ListData(*property.d->listData); //TQStringVariantMap(*(property.d->valueList)); } if(property.d->custom) { d->custom = FactoryManager::self()->createCustomProperty(this); diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index 9f097c61..9938c5df 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -56,7 +56,7 @@ class CustomProperty; class Set; ///*! Helper function to create a value list from two string lists. */ -//KOPROPERTY_EXPORT TQMap<TQString, TQVariant> createValueListFromStringLists( +//KOPROPERTY_EXPORT TQStringVariantMap createValueListFromStringLists( // const TQStringList &keys, const TQStringList &values); /*! PropertyType. @@ -66,7 +66,7 @@ enum PropertyType { //standard supported TQVariant types Auto = TQVariant::Invalid - 1, Invalid = TQVariant::Invalid /**<invalid property type*/, - Map = TQVariant::Map /**<TQMap<TQString, TQVariant>*/, + Map = TQVariant::Map /**<TQStringVariantMap*/, List = TQVariant::List /**<TQValueList<TQVariant>*/, String = TQVariant::String /**<string*/, StringList = TQVariant::StringList /**<string list*/, 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; |