diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /noatun-plugins/oblique/kdatacollection.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/oblique/kdatacollection.cpp')
-rw-r--r-- | noatun-plugins/oblique/kdatacollection.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/noatun-plugins/oblique/kdatacollection.cpp b/noatun-plugins/oblique/kdatacollection.cpp index 9e2ddac..ed57aea 100644 --- a/noatun-plugins/oblique/kdatacollection.cpp +++ b/noatun-plugins/oblique/kdatacollection.cpp @@ -23,46 +23,46 @@ #include <kglobal.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqfile.h> +#include <tqfileinfo.h> KDataCollection::KDataCollection( - KConfig *config, const QString &group, const QString &entry, - const char *datadir, const QString &dir + KConfig *config, const TQString &group, const TQString &entry, + const char *datadir, const TQString &dir ) { init(config, group, entry, datadir, dir); } KDataCollection::KDataCollection( - KConfig *config, const QString &group, const QString &entry, - const QString &dir + KConfig *config, const TQString &group, const TQString &entry, + const TQString &dir ) { init(config, group, entry, "appdata", dir); } KDataCollection::KDataCollection( - KConfig *config, const QString &group, const QString &dir + KConfig *config, const TQString &group, const TQString &dir ) { init(config, group, dir, "appdata", dir); } -KDataCollection::KDataCollection(KConfig *config, const QString &dir) +KDataCollection::KDataCollection(KConfig *config, const TQString &dir) { init(config, "KDataCollection", dir, "appdata", dir); } -KDataCollection::KDataCollection(const QString &dir) +KDataCollection::KDataCollection(const TQString &dir) { init(KGlobal::config(), "KDataCollection", dir, "appdata", dir); } void KDataCollection::init( - KConfig *config, const QString &group, const QString &entry, - const char *datadir, const QString &dir + KConfig *config, const TQString &group, const TQString &entry, + const char *datadir, const TQString &dir ) { mConfig = config; @@ -72,19 +72,19 @@ void KDataCollection::init( mDatadir = datadir; } -QStringList KDataCollection::names() const +TQStringList KDataCollection::names() const { KConfigGroup g(mConfig, mGroup); // these are the entries I have - QStringList n = g.readListEntry(mEntry); - QStringList fs = KGlobal::dirs()->findAllResources(mDatadir, mDir+"/*", false, true); - QStringList total; + TQStringList n = g.readListEntry(mEntry); + TQStringList fs = KGlobal::dirs()->findAllResources(mDatadir, mDir+"/*", false, true); + TQStringList total; - for (QStringList::Iterator i(fs.begin()); i != fs.end(); ++i) + for (TQStringList::Iterator i(fs.begin()); i != fs.end(); ++i) { - QFileInfo fi(*i); - QString name = fi.fileName(); + TQFileInfo fi(*i); + TQString name = fi.fileName(); if (!n.contains(name)) { total.append(name); @@ -94,28 +94,28 @@ QStringList KDataCollection::names() const return total; } -void KDataCollection::remove(const QString &name) +void KDataCollection::remove(const TQString &name) { KConfigGroup g(mConfig, mGroup); - QString location = file(name); + TQString location = file(name); if (location.isEmpty()) return; if (location == saveFile(name, false)) { - QFile(location).remove(); + TQFile(location).remove(); // is there a system one too? location = file(name, false); if (location.isEmpty()) return; } - QStringList n = g.readListEntry(mEntry); + TQStringList n = g.readListEntry(mEntry); if (n.contains(name)) return; n.append(name); g.writeEntry(mEntry, n); } -QString KDataCollection::file(const QString &name, bool create) +TQString KDataCollection::file(const TQString &name, bool create) { - QString path = ::locate(mDatadir, mDir+"/"+name); + TQString path = ::locate(mDatadir, mDir+"/"+name); if (path.isEmpty() && create) { @@ -124,20 +124,20 @@ QString KDataCollection::file(const QString &name, bool create) return path; } -QString KDataCollection::saveFile(const QString &name, bool create) +TQString KDataCollection::saveFile(const TQString &name, bool create) { if (!KGlobal::dirs()->isRestrictedResource(mDatadir, mDir+"/"+name)) { - QString s = KGlobal::dirs()->saveLocation(mDatadir, mDir, create); + TQString s = KGlobal::dirs()->saveLocation(mDatadir, mDir, create); if (s.length() && create) { s += "/" + name; - QFile(s).open(IO_ReadWrite); // create it + TQFile(s).open(IO_ReadWrite); // create it } return s; } - return QString::null; + return TQString::null; } |