summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/oblique/kdatacollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/oblique/kdatacollection.cpp')
-rw-r--r--noatun-plugins/oblique/kdatacollection.cpp56
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;
}