b1e66b33 | 2019-06-01 06:56:13 | Michele Calgaro |
Adjusted to use new TQStringVariantMap type. Signed-off-by: Michele Calgaro <michele.calgaro@...> |
||
M kdevdesigner/designer/metadatabase.cpp M kdevdesigner/designer/metadatabase.h M kdevdesigner/designer/resource.cpp M lib/widgets/propeditor/childproperty.cpp M lib/widgets/propeditor/childproperty.h M lib/widgets/propeditor/multiproperty.cpp M lib/widgets/propeditor/multiproperty.h M lib/widgets/propeditor/pcombobox.cpp M lib/widgets/propeditor/pcombobox.h M lib/widgets/propeditor/pcursoredit.cpp M lib/widgets/propeditor/pcursoredit.h M lib/widgets/propeditor/property.cpp M lib/widgets/propeditor/property.h M lib/widgets/propeditor/propertyeditor.cpp M lib/widgets/propeditor/propertymachinefactory.cpp M lib/widgets/propeditor/propertywidget.cpp M lib/widgets/propeditor/propertywidget.h M lib/widgets/propeditor/psizepolicyedit.cpp M lib/widgets/propeditor/psizepolicyedit.h M parts/astyle/astyle_adaptor.cpp M parts/astyle/astyle_adaptor.h M parts/astyle/astyle_part.cpp M parts/astyle/astyle_part.h M parts/astyle/astyle_widget.cpp |
||
kdevdesigner/designer/metadatabase.cppdiff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 7aa004d..74d8ef3 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -63,7 +63,7 @@ public: TQObject *object; TQStringList changedProperties; - TQMap<TQString,TQVariant> fakeProperties; + TQStringVariantMap fakeProperties; TQMap<TQString, TQString> propertyComments; int spacing, margin; TQString resizeMode; @@ -271,14 +271,14 @@ o, o->name(), o->className() ); return TQVariant(); } - TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property ); + TQStringVariantMap::Iterator it = r->fakeProperties.find( property ); if ( it != r->fakeProperties.end() ) return r->fakeProperties[property]; return WidgetFactory::defaultValue( o, property ); } -TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o ) +TQStringVariantMap* MetaDataBase::fakeProperties( TQObject* o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); kdevdesigner/designer/metadatabase.hdiff --git a/kdevdesigner/designer/metadatabase.h b/kdevdesigner/designer/metadatabase.h index 352e10d..e953594 100644 --- a/kdevdesigner/designer/metadatabase.h +++ b/kdevdesigner/designer/metadatabase.h @@ -155,7 +155,7 @@ static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ); static TQVariant fakeProperty( TQObject * o, const TQString &property ); - static TQMap<TQString,TQVariant>* fakeProperties( TQObject* o ); + static TQStringVariantMap* fakeProperties( TQObject* o ); static void setSpacing( TQObject *o, int spacing ); static int spacing( TQObject *o ); kdevdesigner/designer/resource.cppdiff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index a6285db..f86490c 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -1474,8 +1474,8 @@ } if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { - TQMap<TQString, TQVariant>* fakeProperties = MetaDataBase::fakeProperties( w ); - for ( TQMap<TQString, TQVariant>::Iterator fake = fakeProperties->begin(); + TQStringVariantMap* fakeProperties = MetaDataBase::fakeProperties( w ); + for ( TQStringVariantMap::Iterator fake = fakeProperties->begin(); fake != fakeProperties->end(); ++fake ) { if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { if ( w->inherits("CustomWidget") ) { ldiff --git a/lib/widgets/propeditor/childproperty.cpp b/lib/widgets/propeditor/childproperty.cpp index beebad5..3f4ea5c 100644 --- a/lib/widgets/propeditor/childproperty.cpp +++ b/lib/widgets/propeditor/childproperty.cpp @@ -35,7 +35,7 @@ } ChildProperty::ChildProperty(MultiProperty *parent, const TQString & name, ChildPropertyType childType, - const TQMap<TQString, TQVariant> &v_valueList, const TQString &description, + const TQStringVariantMap &v_valueList, const TQString &description, const TQVariant &value, bool save, bool readOnly) :Property(name, v_valueList, description, value, save, readOnly), m_parent(parent), m_childType(childType) { ldiff --git a/lib/widgets/propeditor/childproperty.h b/lib/widgets/propeditor/childproperty.h index 6e247fd..d2e5e70 100644 --- a/lib/widgets/propeditor/childproperty.h +++ b/lib/widgets/propeditor/childproperty.h @@ -65,7 +65,7 @@ bool save = true, bool readOnly = false); /**Constructs property with @ref ValueFromList type.*/ ChildProperty(MultiProperty *parent, const TQString &name, ChildPropertyType childType, - const TQMap<TQString, TQVariant> &v_valueList, const TQString &description, + const TQStringVariantMap &v_valueList, const TQString &description, const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false); /**@return the value of the property.*/ ldiff --git a/lib/widgets/propeditor/multiproperty.cpp b/lib/widgets/propeditor/multiproperty.cpp index eae14e9..7f8b193 100644 --- a/lib/widgets/propeditor/multiproperty.cpp +++ b/lib/widgets/propeditor/multiproperty.cpp @@ -129,11 +129,11 @@ return v; } -TQMap<TQString, TQVariant> MultiProperty::valueList() const +TQStringVariantMap MultiProperty::valueList() const { if (list.count() >= 1) return list.getFirst()->valueList; - return TQMap<TQString, TQVariant>(); + return TQStringVariantMap(); } void MultiProperty::setDescription(const TQString &description) @@ -176,7 +176,7 @@ } } -void MultiProperty::setValueList(const TQMap<TQString, TQVariant> &valueList) +void MultiProperty::setValueList(const TQStringVariantMap &valueList) { Property *property; for (property = list.first(); property; property = list.next()) @@ -232,8 +232,8 @@ TQVariant val = value(); if (type() != Property::ValueFromList) return val; - TQMap<TQString, TQVariant> vl = valueList(); - for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it) + TQStringVariantMap vl = valueList(); + for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it) { if (it.data() == val) return it.key(); @@ -245,8 +245,8 @@ { if (type() != Property::ValueFromList) return val; - TQMap<TQString, TQVariant> vl = valueList(); - for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it) + TQStringVariantMap vl = valueList(); + for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it) { if (it.data() == val) return it.key(); ldiff --git a/lib/widgets/propeditor/multiproperty.h b/lib/widgets/propeditor/multiproperty.h index 49410a0..61c04e7 100644 --- a/lib/widgets/propeditor/multiproperty.h +++ b/lib/widgets/propeditor/multiproperty.h @@ -84,7 +84,7 @@ /**Returns the visibility attribute of a %property.*/ bool visible() const; /**The string-to-value correspondence list of the %property.*/ - TQMap<TQString, TQVariant> valueList() const; + TQStringVariantMap valueList() const; /**Sets the value of a %property.*/ void setValue(const TQVariant& value); ldiff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp index 7f0d242..a074974 100644 --- a/lib/widgets/propeditor/pcombobox.cpp +++ b/lib/widgets/propeditor/pcombobox.cpp @@ -24,13 +24,13 @@ namespace PropertyLib{ -PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name) +PComboBox::PComboBox(MultiProperty *property, const TQStringVariantMap &list, TQWidget *parent, const char *name) :PropertyWidget(property, parent, name), m_valueList(list) { init(false); } -PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name) +PComboBox::PComboBox(MultiProperty *property, const TQStringVariantMap &list, bool rw, TQWidget *parent, const char *name) :PropertyWidget(property, parent, name), m_valueList(list) { init(rw); @@ -50,7 +50,7 @@ void PComboBox::fillBox() { - for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++) + for (TQStringVariantMap::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++) { m_edit->insertItem(it.key()); } @@ -58,7 +58,7 @@ TQVariant PComboBox::value() const { - TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText()); + TQStringVariantMap::const_iterator it = m_valueList.find(m_edit->currentText()); if (it == m_valueList.end()) return TQVariant(""); return TQVariant(it.data()); @@ -83,7 +83,7 @@ TQString PComboBox::findDescription(const TQVariant &value) { - for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it) + for (TQStringVariantMap::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it) { if (it.data() == value) return it.key(); @@ -91,7 +91,7 @@ return ""; } -void PComboBox::setValueList(const TQMap<TQString, TQVariant> &valueList) +void PComboBox::setValueList(const TQStringVariantMap &valueList) { m_valueList = valueList; m_edit->clear(); ldiff --git a/lib/widgets/propeditor/pcombobox.h b/lib/widgets/propeditor/pcombobox.h index 98937ea..c9da1ad 100644 --- a/lib/widgets/propeditor/pcombobox.h +++ b/lib/widgets/propeditor/pcombobox.h @@ -38,9 +38,9 @@ public: /**This constructor is used for read-only selection combo. It provides a value from valueList*/ - PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent = 0, const char *name = 0); + PComboBox(MultiProperty *property, const TQStringVariantMap &list, TQWidget *parent = 0, const char *name = 0); /**This constructor is used for read-write selection combo. It provides a value from valueList*/ - PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent = 0, const char *name = 0); + PComboBox(MultiProperty *property, const TQStringVariantMap &list, bool rw, TQWidget *parent = 0, const char *name = 0); /**@return the value currently entered in the editor widget.*/ virtual TQVariant value() const; @@ -50,7 +50,7 @@ /**Sets the list of possible values shown in the editor widget. This method does not emit propertyChanged signal. Reimplemented because combobox is used to display possible values from valueList.*/ - virtual void setValueList(const TQMap<TQString, TQVariant> &valueList); + virtual void setValueList(const TQStringVariantMap &valueList); protected: TQString findDescription(const TQVariant &value); @@ -63,7 +63,7 @@ void init(bool rw = false); /** map<description, value>*/ - TQMap<TQString, TQVariant> m_valueList; + TQStringVariantMap m_valueList; TQComboBox *m_edit; }; ldiff --git a/lib/widgets/propeditor/pcursoredit.cpp b/lib/widgets/propeditor/pcursoredit.cpp index 85aefd5..43cba71 100644 --- a/lib/widgets/propeditor/pcursoredit.cpp +++ b/lib/widgets/propeditor/pcursoredit.cpp @@ -23,7 +23,7 @@ namespace PropertyLib{ -PCursorEdit::PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, +PCursorEdit::PCursorEdit(MultiProperty* property, const TQStringVariantMap &spValues, TQWidget* parent, const char* name) :PComboBox(property, spValues, parent, name) { ldiff --git a/lib/widgets/propeditor/pcursoredit.h b/lib/widgets/propeditor/pcursoredit.h** Diff limit reached (max: 250 lines) ** |