diff options
Diffstat (limited to 'src/profileengine')
-rw-r--r-- | src/profileengine/editor/addprofilewidget.ui | 24 | ||||
-rw-r--r-- | src/profileengine/editor/profileeditor.cpp | 44 | ||||
-rw-r--r-- | src/profileengine/editor/profileeditor.h | 3 | ||||
-rw-r--r-- | src/profileengine/editor/profileeditorbase.ui | 86 | ||||
-rw-r--r-- | src/profileengine/lib/profile.cpp | 26 | ||||
-rw-r--r-- | src/profileengine/lib/profile.h | 10 | ||||
-rw-r--r-- | src/profileengine/lib/profileengine.cpp | 36 | ||||
-rw-r--r-- | src/profileengine/lib/profileengine.h | 24 |
8 files changed, 127 insertions, 126 deletions
diff --git a/src/profileengine/editor/addprofilewidget.ui b/src/profileengine/editor/addprofilewidget.ui index 56a46f1d..dccb234e 100644 --- a/src/profileengine/editor/addprofilewidget.ui +++ b/src/profileengine/editor/addprofilewidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>AddProfileWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AddProfileWidget</cstring> </property> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -33,7 +33,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -51,9 +51,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> @@ -65,7 +65,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -83,9 +83,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> @@ -97,7 +97,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -108,7 +108,7 @@ <cstring>descriptionEdit</cstring> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>descriptionEdit</cstring> </property> @@ -117,5 +117,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp index 903403de..0e3fb5d4 100644 --- a/src/profileengine/editor/profileeditor.cpp +++ b/src/profileengine/editor/profileeditor.cpp @@ -40,15 +40,15 @@ class ProfileItem: public KListViewItem { public: - ProfileItem(KListView *parent, Profile *profile) - :KListViewItem(parent), m_profile(profile) + ProfileItem(KListView *tqparent, Profile *profile) + :KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); } - ProfileItem(KListViewItem *parent, Profile *profile) - : KListViewItem(parent), m_profile(profile) + ProfileItem(KListViewItem *tqparent, Profile *profile) + : KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); @@ -62,19 +62,19 @@ private: class EDListItem: public KListViewItem{ public: - EDListItem(KListView *parent, const TQString &text, bool derived) - : KListViewItem(parent, text), m_derived(derived) + EDListItem(KListView *tqparent, const TQString &text, bool derived) + : KListViewItem(tqparent, text), m_derived(derived) { } bool isDerived() const { return m_derived; } - virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { TQColorGroup cgNew = cg; if (m_derived) cgNew.setColor(TQColorGroup::Text, KGlobalSettings::inactiveTextColor()); - KListViewItem::paintCell(p, cgNew, column, width, alignment); + KListViewItem::paintCell(p, cgNew, column, width, tqalignment); } private: @@ -84,16 +84,16 @@ private: class ProfileListBuilding { public: - ProfileItem * operator() (ProfileItem *parent, Profile *profile) + ProfileItem * operator() (ProfileItem *tqparent, Profile *profile) { - parent->setOpen(true); - return new ProfileItem(parent, profile); + tqparent->setOpen(true); + return new ProfileItem(tqparent, profile); } }; -ProfileEditor::ProfileEditor(TQWidget *parent, const char *name) - :ProfileEditorBase(parent, name) +ProfileEditor::ProfileEditor(TQWidget *tqparent, const char *name) + :ProfileEditorBase(tqparent, name) { refresh(); } @@ -115,14 +115,14 @@ void ProfileEditor::refresh() void ProfileEditor::refreshPropertyCombo() { - KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin")); + KTrader::OfferList list = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin")); TQStringList props; for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) { TQStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); for (TQStringList::const_iterator p = currProps.constBegin(); p != currProps.constEnd(); ++p) - if (!props.contains(*p)) + if (!props.tqcontains(*p)) props.append(*p); } props.sort(); @@ -258,7 +258,7 @@ void ProfileEditor::removeProfile() if (profile->remove()) { TQListViewItem *item = profilesList->currentItem(); - profilesList->setCurrentItem(item->parent()); + profilesList->setCurrentItem(item->tqparent()); profile->detachFromParent(); delete profile; delete item; @@ -271,8 +271,8 @@ void ProfileEditor::removeProfile() void ProfileEditor::addProperty() { if ( (!propertyCombo->currentText().isEmpty()) && - (ownPropertiesBox->findItem(propertyCombo->currentText()) == 0) && - (derivedPropertiesBox->findItem(propertyCombo->currentText()) == 0) ) + (ownPropertiesBox->tqfindItem(propertyCombo->currentText()) == 0) && + (derivedPropertiesBox->tqfindItem(propertyCombo->currentText()) == 0) ) { ownPropertiesBox->insertItem(propertyCombo->currentText()); @@ -322,9 +322,9 @@ void ProfileEditor::addEnabled() text = allList->currentItem()->text(0); } - if (enabledList->findItem(text, 0) != 0) + if (enabledList->tqfindItem(text, 0) != 0) return; - if (disabledList->findItem(text, 0) != 0) + if (disabledList->tqfindItem(text, 0) != 0) { KMessageBox::error(this, i18n("This plugin is already contained in the list of disabled plugins."), i18n("Enable Plugin")); @@ -368,9 +368,9 @@ void ProfileEditor::addDisabled() text = allList->currentItem()->text(0); } - if (disabledList->findItem(text, 0) != 0) + if (disabledList->tqfindItem(text, 0) != 0) return; - if (enabledList->findItem(text, 0) != 0) + if (enabledList->tqfindItem(text, 0) != 0) { KMessageBox::error(this, i18n("This plugin is already contained in the list of enabled plugins."), i18n("Disable Plugin")); diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h index 182195f4..aae785b1 100644 --- a/src/profileengine/editor/profileeditor.h +++ b/src/profileengine/editor/profileeditor.h @@ -29,8 +29,9 @@ class KListViewItem; class ProfileEditor : public ProfileEditorBase { Q_OBJECT + TQ_OBJECT public: - ProfileEditor(TQWidget *parent = 0, const char *name = 0); + ProfileEditor(TQWidget *tqparent = 0, const char *name = 0); public slots: virtual void removeProperty(); diff --git a/src/profileengine/editor/profileeditorbase.ui b/src/profileengine/editor/profileeditorbase.ui index e91fd13d..094eeffd 100644 --- a/src/profileengine/editor/profileeditorbase.ui +++ b/src/profileengine/editor/profileeditorbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ProfileEditorBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ProfileEditorBase</cstring> </property> @@ -19,18 +19,18 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter" row="0" column="0"> + <widget class="TQSplitter" row="0" column="0"> <property name="name"> <cstring>splitter2</cstring> </property> <property name="orientation"> <enum>Vertical</enum> </property> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>widgetStack1</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -47,9 +47,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> @@ -73,7 +73,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>142</height> @@ -137,11 +137,11 @@ </vbox> </widget> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -190,9 +190,9 @@ <string>Remove</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> @@ -204,7 +204,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -219,9 +219,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> @@ -233,7 +233,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -250,7 +250,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -261,9 +261,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="2" rowspan="4" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="2" rowspan="4" colspan="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -275,7 +275,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -301,9 +301,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="4" column="2" rowspan="4" colspan="1"> + <widget class="TQLayoutWidget" row="4" column="2" rowspan="4" colspan="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -315,7 +315,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -359,7 +359,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -376,7 +376,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -401,16 +401,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="0" rowspan="8" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="8" colspan="1"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> @@ -422,7 +422,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -474,7 +474,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -499,7 +499,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -560,15 +560,15 @@ <connections> <connection> <sender>profilesList</sender> - <signal>currentChanged(QListViewItem*)</signal> + <signal>currentChanged(TQListViewItem*)</signal> <receiver>ProfileEditorBase</receiver> - <slot>profileExecuted(QListViewItem*)</slot> + <slot>profileExecuted(TQListViewItem*)</slot> </connection> <connection> <sender>ownPropertiesBox</sender> - <signal>currentChanged(QListBoxItem*)</signal> + <signal>currentChanged(TQListBoxItem*)</signal> <receiver>ProfileEditorBase</receiver> - <slot>propertyExecuted(QListBoxItem*)</slot> + <slot>propertyExecuted(TQListBoxItem*)</slot> </connection> <connection> <sender>addProfileButton</sender> @@ -596,15 +596,15 @@ </connection> <connection> <sender>profilesList</sender> - <signal>executed(QListViewItem*)</signal> + <signal>executed(TQListViewItem*)</signal> <receiver>ProfileEditorBase</receiver> - <slot>profileExecuted(QListViewItem*)</slot> + <slot>profileExecuted(TQListViewItem*)</slot> </connection> <connection> <sender>profilesList</sender> - <signal>selectionChanged(QListViewItem*)</signal> + <signal>selectionChanged(TQListViewItem*)</signal> <receiver>ProfileEditorBase</receiver> - <slot>profileExecuted(QListViewItem*)</slot> + <slot>profileExecuted(TQListViewItem*)</slot> </connection> <connection> <sender>addEnabledButton</sender> @@ -645,9 +645,9 @@ <tabstop>disabledList</tabstop> <tabstop>pluginsView</tabstop> </tabstops> -<slots> - <slot>profileExecuted(QListViewItem *item)</slot> - <slot>propertyExecuted(QListBoxItem *item)</slot> +<Q_SLOTS> + <slot>profileExecuted(TQListViewItem *item)</slot> + <slot>propertyExecuted(TQListBoxItem *item)</slot> <slot>addProfile()</slot> <slot>removeProfile()</slot> <slot>addProperty()</slot> @@ -656,8 +656,8 @@ <slot>delEnabled()</slot> <slot>addDisabled()</slot> <slot>delDisabled()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>klistview.h</includehint> diff --git a/src/profileengine/lib/profile.cpp b/src/profileengine/lib/profile.cpp index f07c6376..39d247bf 100644 --- a/src/profileengine/lib/profile.cpp +++ b/src/profileengine/lib/profile.cpp @@ -26,8 +26,8 @@ #include <kconfig.h> #include <kio/netaccess.h> -Profile::Profile(Profile *parent, const TQString &name) - :m_parent(parent), m_name(name) +Profile::Profile(Profile *tqparent, const TQString &name) + :m_parent(tqparent), m_name(name) { if (m_parent) m_parent->addChildProfile(this); @@ -49,8 +49,8 @@ Profile::Profile(Profile *parent, const TQString &name) m_explicitDisable = config.readListEntry("List"); } -Profile::Profile(Profile *parent, const TQString &name, const TQString &genericName, const TQString &description) - :m_parent(parent), m_name(name), m_genericName(genericName), m_description(description) +Profile::Profile(Profile *tqparent, const TQString &name, const TQString &genericName, const TQString &description) + :m_parent(tqparent), m_name(name), m_genericName(genericName), m_description(description) { if (m_parent) m_parent->addChildProfile(this); @@ -59,18 +59,18 @@ Profile::Profile(Profile *parent, const TQString &name, const TQString &genericN Profile::~Profile() { - for (TQValueList<Profile*>::iterator it = m_children.begin(); it != m_children.end(); ++it) + for (TQValueList<Profile*>::iterator it = m_tqchildren.begin(); it != m_tqchildren.end(); ++it) delete *it; } void Profile::addChildProfile(Profile *profile) { - m_children.append(profile); + m_tqchildren.append(profile); } void Profile::removeChildProfile(Profile *profile) { - m_children.remove(profile); + m_tqchildren.remove(profile); } TQString Profile::dirName() const @@ -104,10 +104,10 @@ void Profile::save() Profile::EntryList Profile::list(List type) { - EntryList parentList; + EntryList tqparentList; if (m_parent) - parentList = m_parent->list(type); - EntryList list = parentList; + tqparentList = m_parent->list(type); + EntryList list = tqparentList; for (EntryList::iterator it = list.begin(); it != list.end(); ++it) (*it).derived = true; TQStringList &personalList = listByType(type); @@ -119,7 +119,7 @@ Profile::EntryList Profile::list(List type) void Profile::addEntry(List type, const TQString &value) { TQStringList &list = listByType(type); - if (!list.contains(value)) + if (!list.tqcontains(value)) list.append(value); } @@ -187,10 +187,10 @@ KURL::List Profile::resources(const TQString &nameFilter) dir = dir + "kdevelop/profiles" + dirName(); TQDir d(dir); - const QFileInfoList *infoList = d.entryInfoList(nameFilter, TQDir::Files); + const TQFileInfoList *infoList = d.entryInfoList(nameFilter, TQDir::Files); if (!infoList) continue; - for (QFileInfoList::const_iterator infoIt = infoList->constBegin(); + for (TQFileInfoList::const_iterator infoIt = infoList->constBegin(); infoIt != infoList->constEnd(); ++ infoIt) resources.append((*infoIt)->absFilePath()); } diff --git a/src/profileengine/lib/profile.h b/src/profileengine/lib/profile.h index c81db7e3..30e00517 100644 --- a/src/profileengine/lib/profile.h +++ b/src/profileengine/lib/profile.h @@ -45,12 +45,12 @@ public: ExplicitDisable /**<A list of explicitly disabled plugins (names).*/ }; - Profile(Profile *parent, const TQString &name); - Profile(Profile *parent, const TQString &name, const TQString &genericName, const TQString &description); + Profile(Profile *tqparent, const TQString &name); + Profile(Profile *tqparent, const TQString &name, const TQString &genericName, const TQString &description); ~Profile(); - TQValueList<Profile*> children() const { return m_children; } - Profile *parent() const { return m_parent; } + TQValueList<Profile*> tqchildren() const { return m_tqchildren; } + Profile *tqparent() const { return m_parent; } void save(); bool remove(); @@ -81,7 +81,7 @@ protected: private: Profile *m_parent; - TQValueList<Profile*> m_children; + TQValueList<Profile*> m_tqchildren; TQString m_name; diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp index af8f2afe..7a6d65d8 100644 --- a/src/profileengine/lib/profileengine.cpp +++ b/src/profileengine/lib/profileengine.cpp @@ -57,7 +57,7 @@ void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQ { TQString dirName = *eit; Profile *profile = 0; - if (passedPaths.contains(currPath + dirName)) + if (passedPaths.tqcontains(currPath + dirName)) profile = passedPaths[currPath + dirName]; else { @@ -78,24 +78,24 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType if (!profile) return KTrader::OfferList(); - TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } TQString constraint_add = ""; Profile::EntryList properties = profile->list(Profile::Properties); int i = 0; for (Profile::EntryList::const_iterator it = properties.begin(); it != properties.end(); ++it) - constraint_add += TQString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). - arg((i++)==0?"":"or").arg((*it).name); + constraint_add += TQString::tqfromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). + tqarg((i++)==0?"":"or").tqarg((*it).name); if (!constraint_add.isEmpty()) constraint += " and ( " + constraint_add + " ) "; @@ -106,7 +106,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType << " " << constraint << endl << endl << endl;*/ //END debug - KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); + KTrader::OfferList list = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint); TQStringList names; /* Wrong, this is not what we want to do. @@ -127,11 +127,11 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType Profile::EntryList enableList = profile->list(Profile::ExplicitEnable); for (Profile::EntryList::const_iterator it = enableList.begin(); it != enableList.end(); ++it) { - if (names.contains((*it).name)) + if (names.tqcontains((*it).name)) continue; - TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); - constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name); - KTrader::OfferList enable = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); + TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION); + constraint += TQString::tqfromLatin1("and [Name] == '%1'").tqarg((*it).name); + KTrader::OfferList enable = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint); list += enable; } @@ -149,19 +149,19 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType KTrader::OfferList ProfileEngine::allOffers(OfferType offerType) { - TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::tqfromLatin1("[X-KDevelop-Version] == %1").tqarg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::tqfromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } - return KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); + return KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin"), constraint); } void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile, @@ -229,7 +229,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1, it != offers1List.constEnd(); ++it) { // kdDebug() << "checking: " << *it << endl; - if (offers2List.contains(*it)) + if (offers2List.tqcontains(*it)) { // kdDebug() << " keep" << endl; offers2.remove(offers2List[*it]); diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index e790dece..9184df62 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -177,8 +177,8 @@ public: template<class Operation> void walkProfiles(Operation &op, Profile *root) { - TQValueList<Profile*> children = root->children(); - for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> tqchildren = root->tqchildren(); + for (TQValueList<Profile*>::iterator it = tqchildren.begin(); it != tqchildren.end(); ++it) { op(*it); walkProfiles<Operation>(op, *it); @@ -189,7 +189,7 @@ public: but the operation in this case returns a result of type defined by "Result" template parameter. - When iterating the tree, the result of operation applied to the parent profile + When iterating the tree, the result of operation applied to the tqparent profile is passed as @p result parameter to the recursive call for child profiles. For example, this function can be used to build another hierarcy of profiles @@ -199,24 +199,24 @@ public: @code class ProfileListBuilding { public: - ProfileItem * operator() (ProfileItem *parent, Profile *profile) + ProfileItem * operator() (ProfileItem *tqparent, Profile *profile) { - parent->setOpen(true); - return new ProfileItem(parent, profile); + tqparent->setOpen(true); + return new ProfileItem(tqparent, profile); } }; class ProfileItem: public KListViewItem { public: - ProfileItem(KListView *parent, Profile *profile) - :KListViewItem(parent), m_profile(profile) + ProfileItem(KListView *tqparent, Profile *profile) + :KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); } - ProfileItem(KListViewItem *parent, Profile *profile) - : KListViewItem(parent), m_profile(profile) + ProfileItem(KListViewItem *tqparent, Profile *profile) + : KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); @@ -244,8 +244,8 @@ public: template<class Operation, class Result> void walkProfiles(Operation &op, Result *result, Profile *root) { - TQValueList<Profile*> children = root->children(); - for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> tqchildren = root->tqchildren(); + for (TQValueList<Profile*>::iterator it = tqchildren.begin(); it != tqchildren.end(); ++it) { Result *newResult = op(result, *it); walkProfiles<Operation>(op, newResult, *it); |