diff options
Diffstat (limited to 'src/profileengine')
-rw-r--r-- | src/profileengine/editor/profileeditor.cpp | 38 | ||||
-rw-r--r-- | src/profileengine/editor/profileeditor.h | 6 | ||||
-rw-r--r-- | src/profileengine/lib/profile.cpp | 52 | ||||
-rw-r--r-- | src/profileengine/lib/profile.h | 46 | ||||
-rw-r--r-- | src/profileengine/lib/profileengine.cpp | 78 | ||||
-rw-r--r-- | src/profileengine/lib/profileengine.h | 46 |
6 files changed, 133 insertions, 133 deletions
diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp index 4e0a33ab..903403de 100644 --- a/src/profileengine/editor/profileeditor.cpp +++ b/src/profileengine/editor/profileeditor.cpp @@ -18,10 +18,10 @@ ***************************************************************************/ #include "profileeditor.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qtextedit.h> -#include <qpalette.h> +#include <tqtextedit.h> +#include <tqpalette.h> #include <kdebug.h> #include <kpushbutton.h> @@ -62,18 +62,18 @@ private: class EDListItem: public KListViewItem{ public: - EDListItem(KListView *parent, const QString &text, bool derived) + EDListItem(KListView *parent, const TQString &text, bool derived) : KListViewItem(parent, text), m_derived(derived) { } bool isDerived() const { return m_derived; } - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { - QColorGroup cgNew = cg; + TQColorGroup cgNew = cg; if (m_derived) - cgNew.setColor(QColorGroup::Text, KGlobalSettings::inactiveTextColor()); + cgNew.setColor(TQColorGroup::Text, KGlobalSettings::inactiveTextColor()); KListViewItem::paintCell(p, cgNew, column, width, alignment); } @@ -92,7 +92,7 @@ public: }; -ProfileEditor::ProfileEditor(QWidget *parent, const char *name) +ProfileEditor::ProfileEditor(TQWidget *parent, const char *name) :ProfileEditorBase(parent, name) { refresh(); @@ -115,12 +115,12 @@ void ProfileEditor::refresh() void ProfileEditor::refreshPropertyCombo() { - KTrader::OfferList list = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin")); - QStringList props; + KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin")); + TQStringList props; for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) { - QStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); - for (QStringList::const_iterator p = currProps.constBegin(); + TQStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); + for (TQStringList::const_iterator p = currProps.constBegin(); p != currProps.constEnd(); ++p) if (!props.contains(*p)) props.append(*p); @@ -152,7 +152,7 @@ void ProfileEditor::refreshAvailableList() new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName()); } -void ProfileEditor::profileExecuted(QListViewItem *item) +void ProfileEditor::profileExecuted(TQListViewItem *item) { if (!item || item->text(0) == "KDevelop") removeProfileButton->setEnabled(false); @@ -224,7 +224,7 @@ void ProfileEditor::fillPluginsList(Profile *profile) (*it)->property("X-KDevelop-Properties").toStringList().join(", ")); } -void ProfileEditor::propertyExecuted(QListBoxItem *item) +void ProfileEditor::propertyExecuted(TQListBoxItem *item) { removePropertyButton->setEnabled(item != 0); } @@ -236,10 +236,10 @@ void ProfileEditor::addProfile() KDialogBase dlg(KDialogBase::Plain, i18n("Add Profile"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); dlg.plainPage()->setMargin(0); - (new QVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); + (new TQVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); AddProfileWidget *prof = new AddProfileWidget(dlg.plainPage()); prof->nameEdit->setFocus(); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { Profile *profile = new Profile(currentProfile(), prof->nameEdit->text(), prof->genericNameEdit->text(), @@ -257,7 +257,7 @@ void ProfileEditor::removeProfile() Profile *profile = currentProfile(); if (profile->remove()) { - QListViewItem *item = profilesList->currentItem(); + TQListViewItem *item = profilesList->currentItem(); profilesList->setCurrentItem(item->parent()); profile->detachFromParent(); delete profile; @@ -309,7 +309,7 @@ void ProfileEditor::addEnabled() { if (!allList->currentItem() && allEdit->text().isEmpty()) return; - QString text; + TQString text; if (!allEdit->text().isEmpty()) { text = allEdit->text(); @@ -355,7 +355,7 @@ void ProfileEditor::addDisabled() { if (!allList->currentItem() && allEdit->text().isEmpty()) return; - QString text; + TQString text; if (!allEdit->text().isEmpty()) { text = allEdit->text(); diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h index 5ce014fd..3f4fff85 100644 --- a/src/profileengine/editor/profileeditor.h +++ b/src/profileengine/editor/profileeditor.h @@ -30,15 +30,15 @@ class KListViewItem; class ProfileEditor : public ProfileEditorBase { Q_OBJECT public: - ProfileEditor(QWidget *parent = 0, const char *name = 0); + ProfileEditor(TQWidget *parent = 0, const char *name = 0); public slots: virtual void removeProperty(); virtual void addProperty(); virtual void removeProfile(); virtual void addProfile(); - virtual void propertyExecuted(QListBoxItem *item); - virtual void profileExecuted(QListViewItem *item); + virtual void propertyExecuted(TQListBoxItem *item); + virtual void profileExecuted(TQListViewItem *item); virtual void delDisabled(); virtual void addDisabled(); diff --git a/src/profileengine/lib/profile.cpp b/src/profileengine/lib/profile.cpp index 62a7c586..f07c6376 100644 --- a/src/profileengine/lib/profile.cpp +++ b/src/profileengine/lib/profile.cpp @@ -18,21 +18,21 @@ ***************************************************************************/ #include "profile.h" -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <kstandarddirs.h> #include <kconfig.h> #include <kio/netaccess.h> -Profile::Profile(Profile *parent, const QString &name) +Profile::Profile(Profile *parent, const TQString &name) :m_parent(parent), m_name(name) { if (m_parent) m_parent->addChildProfile(this); - QString profileConfig = locate("data", "kdevelop/profiles" + dirName() + "/profile.config"); + TQString profileConfig = locate("data", "kdevelop/profiles" + dirName() + "/profile.config"); KConfig config(profileConfig); config.setGroup("Information"); @@ -49,7 +49,7 @@ Profile::Profile(Profile *parent, const QString &name) m_explicitDisable = config.readListEntry("List"); } -Profile::Profile(Profile *parent, const QString &name, const QString &genericName, const QString &description) +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) { if (m_parent) @@ -59,7 +59,7 @@ Profile::Profile(Profile *parent, const QString &name, const QString &genericNam Profile::~Profile() { - for (QValueList<Profile*>::iterator it = m_children.begin(); it != m_children.end(); ++it) + for (TQValueList<Profile*>::iterator it = m_children.begin(); it != m_children.end(); ++it) delete *it; } @@ -73,7 +73,7 @@ void Profile::removeChildProfile(Profile *profile) m_children.remove(profile); } -QString Profile::dirName() const +TQString Profile::dirName() const { if (m_parent) return m_parent->dirName() + "/" + m_name; @@ -83,7 +83,7 @@ QString Profile::dirName() const void Profile::save() { - QString profileConfig = locateLocal("data", "kdevelop/profiles" + dirName() + "/profile.config"); + TQString profileConfig = locateLocal("data", "kdevelop/profiles" + dirName() + "/profile.config"); KConfig config(profileConfig); config.setGroup("Information"); @@ -110,22 +110,22 @@ Profile::EntryList Profile::list(List type) EntryList list = parentList; for (EntryList::iterator it = list.begin(); it != list.end(); ++it) (*it).derived = true; - QStringList &personalList = listByType(type); - for (QStringList::const_iterator it = personalList.begin(); it != personalList.end(); ++it) + TQStringList &personalList = listByType(type); + for (TQStringList::const_iterator it = personalList.begin(); it != personalList.end(); ++it) list.append(Entry(*it, false)); return list; } -void Profile::addEntry(List type, const QString &value) +void Profile::addEntry(List type, const TQString &value) { - QStringList &list = listByType(type); + TQStringList &list = listByType(type); if (!list.contains(value)) list.append(value); } -void Profile::removeEntry(List type, const QString &value) +void Profile::removeEntry(List type, const TQString &value) { - QStringList &list = listByType(type); + TQStringList &list = listByType(type); list.remove(value); } @@ -142,7 +142,7 @@ void Profile::clearList( List type ) } } -QStringList &Profile::listByType(List type) +TQStringList &Profile::listByType(List type) { switch (type) { case Properties: @@ -155,7 +155,7 @@ QStringList &Profile::listByType(List type) } } -bool Profile::hasInEntryList(EntryList &list, QString value) +bool Profile::hasInEntryList(EntryList &list, TQString value) { for (EntryList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) if ((*it).name == value) @@ -165,8 +165,8 @@ bool Profile::hasInEntryList(EntryList &list, QString value) bool Profile::remove() { - QStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles" + dirName()); - if ((dirs.count() == 1) && dirs[0].startsWith(QDir::homeDirPath())) + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles" + dirName()); + if ((dirs.count() == 1) && dirs[0].startsWith(TQDir::homeDirPath())) return KIO::NetAccess::del(KURL::fromPathOrURL(dirs[0]), 0); return false; } @@ -177,17 +177,17 @@ void Profile::detachFromParent() m_parent->removeChildProfile(this); } -KURL::List Profile::resources(const QString &nameFilter) +KURL::List Profile::resources(const TQString &nameFilter) { - QStringList resources; - QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); - for (QStringList::const_iterator it = resourceDirs.begin(); it != resourceDirs.end(); ++it) + TQStringList resources; + TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); + for (TQStringList::const_iterator it = resourceDirs.begin(); it != resourceDirs.end(); ++it) { - QString dir = *it; + TQString dir = *it; dir = dir + "kdevelop/profiles" + dirName(); - QDir d(dir); - const QFileInfoList *infoList = d.entryInfoList(nameFilter, QDir::Files); + TQDir d(dir); + const QFileInfoList *infoList = d.entryInfoList(nameFilter, TQDir::Files); if (!infoList) continue; for (QFileInfoList::const_iterator infoIt = infoList->constBegin(); @@ -200,6 +200,6 @@ KURL::List Profile::resources(const QString &nameFilter) void Profile::addResource(const KURL &url) { - QString saveLocation = KGlobal::dirs()->saveLocation("data", "kdevelop/profiles"+dirName(), true); + TQString saveLocation = KGlobal::dirs()->saveLocation("data", "kdevelop/profiles"+dirName(), true); KIO::NetAccess::file_copy(url, KURL::fromPathOrURL(saveLocation), -1, true); } diff --git a/src/profileengine/lib/profile.h b/src/profileengine/lib/profile.h index 9d467984..c81db7e3 100644 --- a/src/profileengine/lib/profile.h +++ b/src/profileengine/lib/profile.h @@ -20,7 +20,7 @@ #define PROFILE_H #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> /** @short KDevelop profile @@ -32,11 +32,11 @@ public: /**An entry in the lists that store profile information*/ struct Entry { Entry() {} - Entry(const QString &_name, bool _derived): name(_name), derived(_derived) {} - QString name; + Entry(const TQString &_name, bool _derived): name(_name), derived(_derived) {} + TQString name; bool derived; }; - typedef QValueList<Entry> EntryList; + typedef TQValueList<Entry> EntryList; /**Lists which are held by a profile.*/ enum List { @@ -45,29 +45,29 @@ public: ExplicitDisable /**<A list of explicitly disabled plugins (names).*/ }; - Profile(Profile *parent, const QString &name); - Profile(Profile *parent, const QString &name, const QString &genericName, const QString &description); + Profile(Profile *parent, const TQString &name); + Profile(Profile *parent, const TQString &name, const TQString &genericName, const TQString &description); ~Profile(); - QValueList<Profile*> children() const { return m_children; } + TQValueList<Profile*> children() const { return m_children; } Profile *parent() const { return m_parent; } void save(); bool remove(); - QString name() const { return m_name; } - QString genericName() const { return m_genericName; } - QString description() const { return m_description; } + TQString name() const { return m_name; } + TQString genericName() const { return m_genericName; } + TQString description() const { return m_description; } EntryList list(List type); - void addEntry(List type, const QString &value); - void removeEntry(List type, const QString &value); + void addEntry(List type, const TQString &value); + void removeEntry(List type, const TQString &value); void clearList(List type); - bool hasInEntryList(EntryList &list, QString value); + bool hasInEntryList(EntryList &list, TQString value); - KURL::List resources(const QString &nameFilter); + KURL::List resources(const TQString &nameFilter); void addResource(const KURL &url); void detachFromParent(); @@ -75,22 +75,22 @@ public: protected: void addChildProfile(Profile *profile); void removeChildProfile(Profile *profile); - QString dirName() const; + TQString dirName() const; - QStringList &listByType(List type); + TQStringList &listByType(List type); private: Profile *m_parent; - QValueList<Profile*> m_children; + TQValueList<Profile*> m_children; - QString m_name; + TQString m_name; - QString m_genericName; - QString m_description; + TQString m_genericName; + TQString m_description; - QStringList m_properties; - QStringList m_explicitEnable; - QStringList m_explicitDisable; + TQStringList m_properties; + TQStringList m_explicitEnable; + TQStringList m_explicitDisable; }; #endif diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp index 199c8238..af8f2afe 100644 --- a/src/profileengine/lib/profileengine.cpp +++ b/src/profileengine/lib/profileengine.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include "profileengine.h" -#include <qdir.h> +#include <tqdir.h> #include <kurl.h> #include <kdebug.h> @@ -29,14 +29,14 @@ ProfileEngine::ProfileEngine() { - QStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles"); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles"); m_rootProfile = new Profile(0, "KDevelop"); - QString currPath = "/"; - QMap<QString, Profile*> passedPaths; + TQString currPath = "/"; + TQMap<TQString, Profile*> passedPaths; - for (QStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) + for (TQStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) processDir(*it, currPath, passedPaths, m_rootProfile); } @@ -45,17 +45,17 @@ ProfileEngine::~ProfileEngine() delete m_rootProfile; } -void ProfileEngine::processDir(const QString &dir, const QString &currPath, QMap<QString, Profile*> &passedPaths, Profile *root) +void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQMap<TQString, Profile*> &passedPaths, Profile *root) { // kdDebug() << "processDir: " << dir << " " << currPath << endl; - QDir qDir(dir); - QStringList entryList = qDir.entryList(QDir::Dirs); - for (QStringList::const_iterator eit = entryList.constBegin(); eit != entryList.constEnd(); ++eit) + TQDir qDir(dir); + TQStringList entryList = qDir.entryList(TQDir::Dirs); + for (TQStringList::const_iterator eit = entryList.constBegin(); eit != entryList.constEnd(); ++eit) { if ((*eit != "..") && (*eit != ".")) { - QString dirName = *eit; + TQString dirName = *eit; Profile *profile = 0; if (passedPaths.contains(currPath + dirName)) profile = passedPaths[currPath + dirName]; @@ -69,7 +69,7 @@ void ProfileEngine::processDir(const QString &dir, const QString &currPath, QMap } } -KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType offerType) +KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType) { ProfileListing listing; Profile *profile = 0; @@ -78,23 +78,23 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o if (!profile) return KTrader::OfferList(); - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } - QString constraint_add = ""; + 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 += QString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). + constraint_add += TQString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). arg((i++)==0?"":"or").arg((*it).name); if (!constraint_add.isEmpty()) constraint += " and ( " + constraint_add + " ) "; @@ -106,15 +106,15 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o << " " << constraint << endl << endl << endl;*/ //END debug - KTrader::OfferList list = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); - QStringList names; + KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); + TQStringList names; /* Wrong, this is not what we want to do. Profile::EntryList disableList = profile->list(Profile::ExplicitDisable); KTrader::OfferList::iterator it = list.begin(); while (it != list.end()) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); names.append(name); if (profile->hasInEntryList(disableList, name)) { @@ -129,9 +129,9 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o { if (names.contains((*it).name)) continue; - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); - constraint += QString::fromLatin1("and [Name] == '%1'").arg((*it).name); - KTrader::OfferList enable = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); + 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); list += enable; } @@ -149,23 +149,23 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o KTrader::OfferList ProfileEngine::allOffers(OfferType offerType) { - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } - return KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); + return KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); } void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile, - const QString &profileName) + const TQString &profileName) { if (profileName == "KDevelop") *profile = m_rootProfile; @@ -176,7 +176,7 @@ void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **pro } } -KURL::List ProfileEngine::resources(const QString &profileName, const QString &nameFilter) +KURL::List ProfileEngine::resources(const TQString &profileName, const TQString &nameFilter) { ProfileListing listing; Profile *profile = 0; @@ -188,12 +188,12 @@ KURL::List ProfileEngine::resources(const QString &profileName, const QString &n return resources(profile, nameFilter); } -KURL::List ProfileEngine::resources(Profile *profile, const QString &nameFilter) +KURL::List ProfileEngine::resources(Profile *profile, const TQString &nameFilter) { return profile->resources(nameFilter); } -KURL::List ProfileEngine::resourcesRecursive(const QString &profileName, const QString &nameFilter) +KURL::List ProfileEngine::resourcesRecursive(const TQString &profileName, const TQString &nameFilter) { ProfileListing listing; Profile *profile = 0; @@ -207,17 +207,17 @@ KURL::List ProfileEngine::resourcesRecursive(const QString &profileName, const Q return resources; } -void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, - const QString &profile2, QStringList &unload, KTrader::OfferList &load) +void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1, + const TQString &profile2, TQStringList &unload, KTrader::OfferList &load) { KTrader::OfferList offers1 = offers(profile1, offerType); KTrader::OfferList offers2 = offers(profile2, offerType); - QStringList offers1List; + TQStringList offers1List; for (KTrader::OfferList::const_iterator it = offers1.constBegin(); it != offers1.constEnd(); ++it) offers1List.append((*it)->desktopEntryName()); - QMap<QString, KService::Ptr> offers2List; + TQMap<TQString, KService::Ptr> offers2List; for (KTrader::OfferList::const_iterator it = offers2.constBegin(); it != offers2.constEnd(); ++it) offers2List[(*it)->desktopEntryName()] = *it; @@ -225,7 +225,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, // kdDebug() << "OLD PROFILE: " << offers1List << endl; // kdDebug() << "NEW PROFILE: " << offers2List << endl; - for (QStringList::const_iterator it = offers1List.constBegin(); + for (TQStringList::const_iterator it = offers1List.constBegin(); it != offers1List.constEnd(); ++it) { // kdDebug() << "checking: " << *it << endl; @@ -243,7 +243,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, load = offers2; } -Profile *ProfileEngine::findProfile(const QString & profileName) +Profile *ProfileEngine::findProfile(const TQString & profileName) { Profile *profile; ProfileListing listing; @@ -251,7 +251,7 @@ Profile *ProfileEngine::findProfile(const QString & profileName) return profile; } -void ProfileEngine::addResource(const QString &profileName, const KURL &url) +void ProfileEngine::addResource(const TQString &profileName, const KURL &url) { ProfileListing listing; Profile *profile = 0; diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index 5128803d..e790dece 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -19,7 +19,7 @@ #ifndef PROFILEENGINE_H #define PROFILEENGINE_H -#include <qmap.h> +#include <tqmap.h> #include <ktrader.h> @@ -28,7 +28,7 @@ /** Profile listing operation. Used to get a plain list of profiles -and store it in the QMap<QString, Profile*>. +and store it in the TQMap<TQString, Profile*>. */ class ProfileListing{ public: @@ -37,7 +37,7 @@ public: profiles[profile->name()] = profile; } - QMap<QString, Profile*> profiles; + TQMap<TQString, Profile*> profiles; }; /**Profile resource listing operation. @@ -45,17 +45,17 @@ Used to get a list of urls to the profile resources. Resource urls can be filtered by an @p filter parameter passed to the constructor. Filter can have values -as described in @ref QDir::setNameFilter function documentation.*/ +as described in @ref TQDir::setNameFilter function documentation.*/ class ProfileListingEx { public: - ProfileListingEx(const QString &filter): m_filter(filter) {} + ProfileListingEx(const TQString &filter): m_filter(filter) {} void operator() (Profile *profile) { resourceList += profile->resources(m_filter); } KURL::List resourceList; - QString m_filter; + TQString m_filter; }; /** @@ -100,29 +100,29 @@ public: }; /**@return The list of plugin offers for given profile and type.*/ - KTrader::OfferList offers(const QString &profileName, OfferType offerType); + KTrader::OfferList offers(const TQString &profileName, OfferType offerType); /**@return The list of all plugin offers for given type.*/ KTrader::OfferList allOffers(OfferType offerType); /**@return The list of URLs to the resources (files) with given @p extension. @param profileName A name of a profile to find resources in. - @param nameFilter Name filter for files. @see QDir::setNameFilter documentation + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation for name filters syntax.*/ - KURL::List resources(const QString &profileName, const QString &nameFilter); + KURL::List resources(const TQString &profileName, const TQString &nameFilter); /**@return The list of URLs to the resources (files) with given @p extension. This list is obtained by a recursive search that process given profile and all it's subprofiles. @param profileName A name of a profile to find resources in. - @param nameFilter Name filter for files. @see QDir::setNameFilter documentation + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation for name filters syntax.*/ - KURL::List resourcesRecursive(const QString &profileName, const QString &nameFilter); + KURL::List resourcesRecursive(const TQString &profileName, const TQString &nameFilter); /**Adds a resource for the profile. Resource will be copied to the user profile directory (like $HOME/.kde/share/apps/kdevelop/profiles/...). @param profileName A name of the profile. @param url The url to a file to copy as a profile resource.*/ - void addResource(const QString &profileName, const KURL &url); + void addResource(const TQString &profileName, const KURL &url); /**Gets the difference between @p profile1 and @p profile2. Difference is calculated as two lists of plugins to be unloaded and loaded @@ -134,8 +134,8 @@ public: @param load Will be filled with a list of plugins to load. @note Resulting lists are not cleared. Pass only clean lists in the common case.*/ - void diffProfiles(OfferType offerType, const QString &profile1, const QString &profile2, - QStringList &unload, KTrader::OfferList &load); + void diffProfiles(OfferType offerType, const TQString &profile1, const TQString &profile2, + TQStringList &unload, KTrader::OfferList &load); /**@return The root profile. Root profile is always named "KDevelop" and it defines an empty list of plugins. Applications built on KDevelop platform @@ -143,7 +143,7 @@ public: Profile *rootProfile() const { return m_rootProfile; } /**Finds a profile with given name. @return The profile found or 0 if it does not exist.*/ - Profile *findProfile(const QString &profileName); + Profile *findProfile(const TQString &profileName); /**Walks profiles tree and applies operation @p op to each profile found in the tree below @p root (@p root profile itself is not processed). @@ -158,7 +158,7 @@ public: profiles[profile->name()] = profile; } - QMap<QString, Profile*> profiles; + TQMap<TQString, Profile*> profiles; }; @endcode Use case for such operation - building a list of all profiles: @@ -177,8 +177,8 @@ public: template<class Operation> void walkProfiles(Operation &op, Profile *root) { - QValueList<Profile*> children = root->children(); - for (QValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> children = root->children(); + for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) { op(*it); walkProfiles<Operation>(op, *it); @@ -244,8 +244,8 @@ public: template<class Operation, class Result> void walkProfiles(Operation &op, Result *result, Profile *root) { - QValueList<Profile*> children = root->children(); - for (QValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> children = root->children(); + for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) { Result *newResult = op(result, *it); walkProfiles<Operation>(op, newResult, *it); @@ -253,9 +253,9 @@ public: } protected: - void processDir(const QString &dir, const QString &currPath, QMap<QString, Profile*> &passedPaths, Profile *root); + void processDir(const TQString &dir, const TQString &currPath, TQMap<TQString, Profile*> &passedPaths, Profile *root); - KURL::List resources(Profile *profile, const QString &nameFilter); + KURL::List resources(Profile *profile, const TQString &nameFilter); /**Gets a complete listing of available profiles and looks for a profile. @param listing Profiles listing will be saved here. @@ -263,7 +263,7 @@ protected: if no profile with that name is found. @param profileName The name of a profile to find.*/ void getProfileWithListing(ProfileListing &listing, Profile **profile, - const QString &profileName); + const TQString &profileName); private: Profile *m_rootProfile; |