diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /tools/kfile-plugins/abiword | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'tools/kfile-plugins/abiword')
-rw-r--r-- | tools/kfile-plugins/abiword/kfile_abiword.cpp | 44 | ||||
-rw-r--r-- | tools/kfile-plugins/abiword/kfile_abiword.h | 9 |
2 files changed, 27 insertions, 26 deletions
diff --git a/tools/kfile-plugins/abiword/kfile_abiword.cpp b/tools/kfile-plugins/abiword/kfile_abiword.cpp index 2b1b0cad..f643a649 100644 --- a/tools/kfile-plugins/abiword/kfile_abiword.cpp +++ b/tools/kfile-plugins/abiword/kfile_abiword.cpp @@ -24,19 +24,19 @@ #include <kgenericfactory.h> #include <kfilterdev.h> -#include <qdom.h> -#include <qfile.h> -#include <qdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqdatetime.h> #include <kdebug.h> typedef KGenericFactory<AbiwordPlugin> AbiwordFactory; K_EXPORT_COMPONENT_FACTORY(kfile_abiword, AbiwordFactory( "kfile_abiword" )) -AbiwordPlugin::AbiwordPlugin(QObject *parent, const char *name, - const QStringList &args) +AbiwordPlugin::AbiwordPlugin(TQObject *tqparent, const char *name, + const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { init(); } @@ -51,11 +51,11 @@ void AbiwordPlugin::init() KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Author", i18n("Author"), QVariant::String); + item = addItemInfo(group, "Author", i18n("Author"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Author); - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Name); - item = addItemInfo(group, "Abstract", i18n("Abstract"), QVariant::String); + item = addItemInfo(group, "Abstract", i18n("Abstract"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Description); } @@ -65,13 +65,13 @@ bool AbiwordPlugin::readInfo( KFileMetaInfo& info, uint what) return false; //Find the last extension - QString strExt; - const int result=info.path().findRev('.'); + TQString strExt; + const int result=info.path().tqfindRev('.'); if (result>=0) { strExt=info.path().mid(result); } - QString strMime; // Mime type of the compressor (default: unknown) + TQString strMime; // Mime type of the compressor (default: unknown) if ((strExt==".gz")||(strExt==".GZ") //in case of .abw.gz (logical extension) ||(strExt==".zabw")||(strExt==".ZABW")) //in case of .zabw (extension used prioritary with AbiWord) { @@ -88,7 +88,7 @@ bool AbiwordPlugin::readInfo( KFileMetaInfo& info, uint what) } KFileMetaInfoGroup group = appendGroup(info, "DocumentInfo"); - QIODevice* in = KFilterDev::deviceForFile(info.path(),strMime); + TQIODevice* in = KFilterDev::deviceForFile(info.path(),strMime); if ( !in ) { kdError() << "Cannot create device for uncompressing! Aborting!" << endl; @@ -101,21 +101,21 @@ bool AbiwordPlugin::readInfo( KFileMetaInfo& info, uint what) delete in; return false; } - QDomDocument doc; + TQDomDocument doc; doc.setContent( in ); in->close(); - QDomElement docElem = doc.documentElement(); - QDomNode summary = docElem.namedItem("metadata"); - QDomNode m_item = summary.namedItem("m"); + TQDomElement docElem = doc.documentElement(); + TQDomNode summary = docElem.namedItem("metadata"); + TQDomNode m_item = summary.namedItem("m"); - QString author; - QString title; - QString abstract; + TQString author; + TQString title; + TQString abstract; while( !m_item.isNull() ) { kdDebug()<<" m_item.toElement().text: "<<m_item.toElement().text()<<endl; - QString key = m_item.toElement().attribute( "key" ); + TQString key = m_item.toElement().attribute( "key" ); if ( key.isEmpty() ) continue; else if ( key=="dc.creator" ) @@ -136,7 +136,7 @@ bool AbiwordPlugin::readInfo( KFileMetaInfo& info, uint what) return true; } -QString AbiwordPlugin::stringItem( const QString &name ) +TQString AbiwordPlugin::stringItem( const TQString &name ) { return name.isEmpty() ? i18n("*Unknown*") : name; } diff --git a/tools/kfile-plugins/abiword/kfile_abiword.h b/tools/kfile-plugins/abiword/kfile_abiword.h index 33ee9c63..4aa3a837 100644 --- a/tools/kfile-plugins/abiword/kfile_abiword.h +++ b/tools/kfile-plugins/abiword/kfile_abiword.h @@ -22,21 +22,22 @@ #include <kfilemetainfo.h> -class QStringList; -class QDomNode; +class TQStringList; +class TQDomNode; class AbiwordPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - AbiwordPlugin( QObject *parent, const char *name, const QStringList& args ); + AbiwordPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); private: void init(); - QString stringItem( const QString &name ); + TQString stringItem( const TQString &name ); }; #endif |