summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/rpm/kfile_rpm.cpp
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/rpm/kfile_rpm.cpp
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/rpm/kfile_rpm.cpp')
-rw-r--r--kfile-plugins/rpm/kfile_rpm.cpp46
1 files changed, 23 insertions, 23 deletions
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