summaryrefslogtreecommitdiffstats
path: root/kfile-plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kfile-plugins
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins')
-rw-r--r--kfile-plugins/deb/kfile_deb.cpp42
-rw-r--r--kfile-plugins/deb/kfile_deb.h2
-rw-r--r--kfile-plugins/rpm/kfile_rpm.cpp46
-rw-r--r--kfile-plugins/rpm/kfile_rpm.h2
4 files changed, 46 insertions, 46 deletions
diff --git a/kfile-plugins/deb/kfile_deb.cpp b/kfile-plugins/deb/kfile_deb.cpp
index b66e062..3839764 100644
--- a/kfile-plugins/deb/kfile_deb.cpp
+++ b/kfile-plugins/deb/kfile_deb.cpp
@@ -25,14 +25,14 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qbuffer.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqbuffer.h>
#include <kfilterdev.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <karchive.h>
#include <ktar.h>
#include <kar.h>
@@ -43,8 +43,8 @@ typedef KGenericFactory<KDebPlugin> DebFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_deb, DebFactory( "kfile_deb" ))
-KDebPlugin::KDebPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KDebPlugin::KDebPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -53,10 +53,10 @@ KDebPlugin::KDebPlugin(QObject *parent, const char *name,
group = addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Name", i18n("Name"), QVariant::String);
- item = addItemInfo(group, "Version", i18n("Version"), QVariant::String);
- item = addItemInfo(group, "Summary", i18n("Summary"), QVariant::String);
- item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String);
+ item = addItemInfo(group, "Version", i18n("Version"), TQVariant::String);
+ item = addItemInfo(group, "Summary", i18n("Summary"), TQVariant::String);
+ item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int);
}
bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
@@ -64,7 +64,7 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
KAr debfile (info.path());
if ( !debfile.open( IO_ReadOnly ) ) {
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
@@ -75,7 +75,7 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
return false;
}
- QIODevice* filterDev = KFilterDev::device( static_cast<const KArchiveFile *>( controlentry )->device(), "application/x-gzip" );
+ TQIODevice* filterDev = KFilterDev::device( static_cast<const KArchiveFile *>( controlentry )->device(), "application/x-gzip" );
if ( !filterDev ) {
kdWarning(7034) << "Couldn't create filter device for control.tar.gz" << endl;
return false;
@@ -95,19 +95,19 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
Q_ASSERT( controlfile );
if (controlfile) {
KFileMetaInfoGroup group = appendGroup(info, "General");
- QByteArray control( static_cast<const KArchiveFile *>(controlfile)->data() );
+ TQByteArray control( static_cast<const KArchiveFile *>(controlfile)->data() );
// Now process control array
- QBuffer controldev(control);
+ TQBuffer controldev(control);
controldev.open( IO_ReadOnly );
while (!controldev.atEnd()) {
char linebuf[100];
controldev.readLine(linebuf, sizeof( linebuf ));
- QString line(linebuf);
- int fieldstart = line.find(QRegExp(":"), 0) + 2;
+ TQString line(linebuf);
+ int fieldstart = line.find(TQRegExp(":"), 0) + 2;
if (fieldstart == 1) break;
- QString fieldname = line.mid(0, fieldstart - 2);
- QString fielddata = line.mid(fieldstart, line.length() - fieldstart - 1);
+ TQString fieldname = line.mid(0, fieldstart - 2);
+ TQString fielddata = line.mid(fieldstart, line.length() - fieldstart - 1);
if (fieldname == "Package") appendItem(group, "Name", fielddata);
else if (fieldname == "Version") appendItem(group, "Version", fielddata);
diff --git a/kfile-plugins/deb/kfile_deb.h b/kfile-plugins/deb/kfile_deb.h
index 9fd1bb0..cfa5376 100644
--- a/kfile-plugins/deb/kfile_deb.h
+++ b/kfile-plugins/deb/kfile_deb.h
@@ -29,7 +29,7 @@ class KDebPlugin: public KFilePlugin
Q_OBJECT
public:
- KDebPlugin( QObject *parent, const char *name, const QStringList& args );
+ KDebPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
diff --git a/kfile-plugins/rpm/kfile_rpm.cpp b/kfile-plugins/rpm/kfile_rpm.cpp
index 049b017..9089b4b 100644
--- a/kfile-plugins/rpm/kfile_rpm.cpp
+++ b/kfile-plugins/rpm/kfile_rpm.cpp
@@ -21,7 +21,7 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -36,8 +36,8 @@ typedef KGenericFactory<KRpmPlugin> RpmFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_rpm, RpmFactory( "kfile_rpm" ))
-KRpmPlugin::KRpmPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KRpmPlugin::KRpmPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -46,38 +46,38 @@ KRpmPlugin::KRpmPlugin(QObject *parent, const char *name,
group = addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Name", i18n("Name"), QVariant::String);
- item = addItemInfo(group, "Version", i18n("Version"), QVariant::String);
- item = addItemInfo(group, "Release", i18n("Release"), QVariant::Int);
- item = addItemInfo(group, "Summary", i18n("Summary"), QVariant::String);
+ item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String);
+ item = addItemInfo(group, "Version", i18n("Version"), TQVariant::String);
+ item = addItemInfo(group, "Release", i18n("Release"), TQVariant::Int);
+ item = addItemInfo(group, "Summary", i18n("Summary"), TQVariant::String);
setAttributes ( item, KFileMimeTypeInfo::Description );
- item = addItemInfo(group, "Group", i18n("Group"), QVariant::String);
- item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ item = addItemInfo(group, "Group", i18n("Group"), TQVariant::String);
+ item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int);
setUnit ( item, KFileMimeTypeInfo::Bytes );
- item = addItemInfo(group, "Vendor", i18n("Vendor"), QVariant::String );
- item = addItemInfo(group, "Packager", i18n("Packager"), QVariant::String );
- item = addItemInfo(group, "Archive Offset", i18n("Archive Offset"), QVariant::Int);
- item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::String);
+ item = addItemInfo(group, "Vendor", i18n("Vendor"), TQVariant::String );
+ item = addItemInfo(group, "Packager", i18n("Packager"), TQVariant::String );
+ item = addItemInfo(group, "Archive Offset", i18n("Archive Offset"), TQVariant::Int);
+ item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String);
setAttributes( item, KFileMimeTypeInfo::MultiLine );
group = addGroupInfo(info, "All tags", i18n("All tags"));
- addVariableInfo(group, QVariant::String, 0);
+ addVariableInfo(group, TQVariant::String, 0);
}
bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what)
{
- QFile file(info.path());
+ TQFile file(info.path());
int pass;
KFileMetaInfoGroup general, all;
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream dstream(&file);
- dstream.setByteOrder(QDataStream::BigEndian);
+ TQDataStream dstream(&file);
+ dstream.setByteOrder(TQDataStream::BigEndian);
general = appendGroup(info, "General");
if (what == KFileMetaInfo::Everything) all = appendGroup(info, "All tags");
@@ -102,7 +102,7 @@ bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what)
if (entries < 500) while (entries--) { // Just in case something goes wrong, limit to 500
uint32_t tag, type, offset, count;
- QString tagname;
+ TQString tagname;
dstream >> tag >> type >> offset >> count;
offset += storepos;
@@ -126,18 +126,18 @@ bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what)
case RPM_INT32_TYPE: uint32_t int32tag;
dstream >> int32tag;
if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int32tag));
- if ( all.isValid() ) appendItem(all, QString("%1").arg( tag ), QString("%1").arg( int32tag ));
+ if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int32tag ));
break;
case RPM_INT16_TYPE: uint16_t int16tag;
dstream >> int16tag;
if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int16tag));
- if ( all.isValid() ) appendItem(all, QString("%1").arg( tag ), QString("%1").arg( int16tag ));
+ if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int16tag ));
break;
case RPM_I18NSTRING_TYPE: // Fallthru
- case RPM_STRING_TYPE: QString strtag; char in;
+ case RPM_STRING_TYPE: TQString strtag; char in;
while ( ( in = file.getch() ) != '\0' ) strtag += in;
if ( !tagname.isEmpty() ) appendItem(general, tagname, strtag);
- if( all.isValid() ) appendItem(all, QString("%1").arg( tag ), strtag);
+ if( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), strtag);
break;
}
file.at(oldPos); // Restore old position
diff --git a/kfile-plugins/rpm/kfile_rpm.h b/kfile-plugins/rpm/kfile_rpm.h
index 797fc49..3911665 100644
--- a/kfile-plugins/rpm/kfile_rpm.h
+++ b/kfile-plugins/rpm/kfile_rpm.h
@@ -29,7 +29,7 @@ class KRpmPlugin: public KFilePlugin
Q_OBJECT
public:
- KRpmPlugin( QObject *parent, const char *name, const QStringList& args );
+ KRpmPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);