diff options
Diffstat (limited to 'src/profileengine/lib/profile.cpp')
-rw-r--r-- | src/profileengine/lib/profile.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
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); } |