summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/sid
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kfile-plugins/sid
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/sid')
-rw-r--r--kfile-plugins/sid/kfile_sid.cpp44
-rw-r--r--kfile-plugins/sid/kfile_sid.h6
2 files changed, 25 insertions, 25 deletions
diff --git a/kfile-plugins/sid/kfile_sid.cpp b/kfile-plugins/sid/kfile_sid.cpp
index 63697063..444e2ea8 100644
--- a/kfile-plugins/sid/kfile_sid.cpp
+++ b/kfile-plugins/sid/kfile_sid.cpp
@@ -23,9 +23,9 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qvalidator.h>
-#include <qwidget.h>
+#include <tqfile.h>
+#include <tqvalidator.h>
+#include <tqwidget.h>
#include <unistd.h>
#include <sys/types.h>
@@ -36,8 +36,8 @@ typedef KGenericFactory<KSidPlugin> SidFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_sid, SidFactory("kfile_sid"))
-KSidPlugin::KSidPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KSidPlugin::KSidPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -52,42 +52,42 @@ KSidPlugin::KSidPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Title", i18n("Title"), QVariant::String);
+ item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
setHint(item, KFileMimeTypeInfo::Name);
- item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String);
+ item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
setHint(item, KFileMimeTypeInfo::Author);
- item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String);
+ item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
setHint(item, KFileMimeTypeInfo::Description);
// technical group
group = addGroupInfo(info, "Technical", i18n("Technical Details"));
- item = addItemInfo(group, "Version", i18n("Version"), QVariant::Int);
+ item = addItemInfo(group, "Version", i18n("Version"), TQVariant::Int);
setPrefix(item, i18n("PSID v"));
- addItemInfo(group, "Number of Songs", i18n("Number of Songs"), QVariant::Int);
- item = addItemInfo(group, "Start Song", i18n("Start Song"), QVariant::Int);
+ addItemInfo(group, "Number of Songs", i18n("Number of Songs"), TQVariant::Int);
+ item = addItemInfo(group, "Start Song", i18n("Start Song"), TQVariant::Int);
}
bool KSidPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
{
if ( info.path().isEmpty() ) // remote file
return false;
- QFile file(info.path());
+ TQFile file(info.path());
if ( !file.open(IO_ReadOnly) )
return false;
int version;
int num_songs;
int start_song;
- QString name;
- QString artist;
- QString copyright;
+ TQString name;
+ TQString artist;
+ TQString copyright;
char buf[64] = { 0 };
@@ -138,7 +138,7 @@ bool KSidPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
return false;
copyright = buf;
- QString TODO("TODO");
+ TQString TODO("TODO");
kdDebug(7034) << "sid plugin readInfo\n";
KFileMetaInfoGroup general = appendGroup(info, "General");
@@ -166,7 +166,7 @@ bool KSidPlugin::writeInfo(const KFileMetaInfo& info) const
char copyright[32] = {0};
int file = 0;
- QString s;
+ TQString s;
KFileMetaInfoGroup group = info.group("General");
if (!group.isValid())
@@ -185,7 +185,7 @@ bool KSidPlugin::writeInfo(const KFileMetaInfo& info) const
strncpy(copyright, s.local8Bit(), 31);
kdDebug(7034) << "Opening sid file " << info.path() << endl;
- file = ::open(QFile::encodeName(info.path()), O_WRONLY);
+ file = ::open(TQFile::encodeName(info.path()), O_WRONLY);
//name
if (-1 == ::lseek(file, 0x16, SEEK_SET))
goto failure;
@@ -209,15 +209,15 @@ failure:
return false;
}
-QValidator*
-KSidPlugin::createValidator(const QString& /*mimetype*/, const QString& group,
- const QString& /*key*/, QObject* parent,
+TQValidator*
+KSidPlugin::createValidator(const TQString& /*mimetype*/, const TQString& group,
+ const TQString& /*key*/, TQObject* parent,
const char* name) const
{
kdDebug(7034) << k_funcinfo << endl;
// all items in "General" group are strings of max lenght 31
if (group == "General")
- return new QRegExpValidator(QRegExp(".{,31}"), parent, name);
+ return new TQRegExpValidator(TQRegExp(".{,31}"), parent, name);
// all others are read-only
return 0;
}
diff --git a/kfile-plugins/sid/kfile_sid.h b/kfile-plugins/sid/kfile_sid.h
index ad702ad1..6c221bd3 100644
--- a/kfile-plugins/sid/kfile_sid.h
+++ b/kfile-plugins/sid/kfile_sid.h
@@ -30,12 +30,12 @@ class KSidPlugin: public KFilePlugin
Q_OBJECT
public:
- KSidPlugin(QObject *parent, const char *name, const QStringList& args);
+ KSidPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
virtual bool writeInfo(const KFileMetaInfo& info) const;
- QValidator* createValidator(const QString& mimetype, const QString& group,
- const QString& key, QObject* parent,
+ TQValidator* createValidator(const TQString& mimetype, const TQString& group,
+ const TQString& key, TQObject* parent,
const char* name) const;
};